Rate this page:

How to send SMS

Sending messages with Voximplant could be extremely useful when informing customers about price movements, changes in policies, etc. And don’t forget about the customer verification purposes. Most phone numbers support SMS but you can check How to choose a suitable number article to be 100% sure.

Enabling SMS functionality

SMS messaging needs to be enabled for a phone number via the /ControlSms HTTP API before sending or receiving SMS. If SMS is supported and enabled, SMS can be sent from a phone number using the /SendSmsMessage HTTP API and received using the InboundSmsCallback property of the HTTP callback. Each inbound SMS message is billed according to the pricing.

After you’ve bought a suitable number, go to Numbers —> My phone numbers. There is an SMS Enabled checkbox which is not selected by default. To enable it, choose Edit chose Edit from the phone number's menu, the Edit number dialog will appear. Here, toggle Disable/Enable SMS and click Save. That’s it.

This action can also be performed via HTTP API. Use the /ControlSms method for this purpose.

Disabling SMS

Disabling SMS

Sending one-way SMS

To send one-way SMS, use the /A2PSendSms method with the following parameters:

  • src_number – the source phone number
  • dst_numbers – the destination phone numbers separated by the ';' symbol
  • text – the message text, up to 1600 characters. We split long messages greater than 160 GSM-7 characters or 70 UTF-16 characters into multiple segments. Each segment is billed as one message

Let’s see how to send a message with the text "Test one-way messages" 447443332211 to the phone numbers 447443332212 and 447443332213.

Sending one-way SMS

Sending one-way SMS

Sending two-way SMS

To send two-way SMS, use the /SendSmsMessage method with the following parameters:

  • source – the source phone number
  • destination – the destination phone number
  • sms_body – 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 billed as one message

Let’s see how to send a message with the text "Test message" from the phone number 447443332211 to the phone number 447443332212:

Sending two-way SMS

Sending two-way SMS

Frangments_count in the response is the number of fragments into which the message was divided.