Skip to navigation

SendSmsMessage

View as Markdown

Sends an SMS message between two phone numbers. The source phone number should be purchased from Voximplant and support SMS (which is indicated by the is_sms_supported property in the objects returned by the [GetPhoneNumbers] Management API) and SMS should be enabled for it via the [ControlSms] Management API. SMS messages can be received via HTTP callbacks, see this article for details.

Allowed roles: Owner, Admin, Developer, CallsSMS.

Example request: Send the SMS message with the text “Test message” from the phone number 447443332211 to the phone number 447443332212.

Authentication

AuthorizationBearer

Voximplant Management API uses signed JWT tokens generated from your service-account private key. Pass the token in the Authorization header as a Bearer value:

Authorization: Bearer $VOXIMPLANT_TOKEN

See Authorization for ready-to-copy snippets in bash, Python, Node.js and Go that turn your credentials.json into a token.

Query parameters

sourcestringRequired
The source phone number
destinationstringRequired
The destination phone number
sms_bodystringRequired

The message text, up to 765 characters. We split long messages greater than 160 GSM-7 characters or 70 UTF-16 characters into multiple segments. Each segment is charged as one message

store_bodybooleanOptional
Whether to store outgoing message texts. Default value is false

Response

Successful response
resultintegerOptional
message_idintegerOptional
Message ID
fragments_countintegerOptional
The number of fragments the message is divided into