client.sms. The same client you use for voice sends SMS, MMS and RCS, so there is nothing extra to install or configure.
Node.js
Install and set up
Python
Install and set up
Go
Install and set up
Java
Install and set up
Ruby
Install and set up
C#
Install and set up
PHP
Install and set up
How the SDKs map to the API
- One namespace. Messaging lives under
client.sms, grouped by resource:messages,numbers,coverage,conversations,optOuts,webhooks,broadcasts,rcsSenders,brandsandcampaigns(snake_case or PascalCase in languages that use it). - One method per endpoint. Each method is named after the operation, for example
sendMessage/send_messagefor Send a message. The full list is in the method reference below. - Same credentials. The client sends your Auth ID and Auth Token as
X-Auth-IDandX-Auth-Tokenon every request. - Phone numbers in paths. Pass E.164 numbers such as
+14155550123as-is. The SDKs URL-encode them for you. - Typed responses. Responses are returned as typed objects, so field names follow each language’s conventions (
idempotencyKeyin JSON isidempotency_keyin Python and Ruby).
Send a message
Handle errors
Every non-2xx response raises a typed error named after its status, carrying the status code and the API’s{"error": "..."} body. The Messaging errors are BadRequestError (400), UnauthorizedError (401), PaymentRequiredError (402), NotFoundError (404), ConflictError (409), ContentTooLargeError (413), UnprocessableEntityError (422), InternalServerError (500), BadGatewayError (502) and ServiceUnavailableError (503). See Errors for when each one is returned.
Method reference
Every Messaging API operation has one method in each SDK. Each language has its own method reference page that lists every operation and the method that calls it, and each operation links to its API reference page, which shows a complete example in every language.Node.js
Node.js method reference
Python
Python method reference
Go
Go method reference
Java
Java method reference
Ruby
Ruby method reference
C#
C# method reference
PHP
PHP method reference