SMS API

You can send both Transactional (Ex: OTP) and Marketing SMS using the SMS API. There are two predefined SMS API templates. One for Transactional SMS and one for Marketing SMS.

Transactional SMS

The API call must include the following parameters.

  • template_key: The unique secret key for the template.

  • sender_id (optional): Sender ID is a name that appears as the message sender on recipients' devices.

  • mobile: Mobile Number of the recipient in +449876543210 format.

  • message: The actual message that needs to be delivered.

Marketing SMS (to single mobile number)

The API call must include the following parameters.

  • template_key: The unique secret key for the template.

  • sender_id (optional): Sender ID is a name that appears as the message sender on recipients' devices.

  • mobile: Mobile Number of the recipient in +449876543210 format.

  • message: The actual message that needs to be delivered.

Marketing SMS (to multiple numbers, i.e. bulk sms)

The API call must include the following parameters.

  • template_key: The unique secret key for the template.

  • sender_id (optional): Sender ID is a name that appears as the message sender on recipients' devices.

  • tags: Your contacts will be filtered using the tags mentioned in your API call and an SMS will be sent to all of them.

  • condition (AND or OR): Used to filter contacts. AND = contact must have ALL tags you mention in API call. OR = contact must have ANY (one or more) of the tags you mention in API call. If nothing is mentioned OR is considered.

  • message: The actual message that needs to be delivered.

Some points to remember.

  1. By default AWS sets your monthly SMS spending limit to USD 1. You must put in a request to increase your spending limit.

  2. SMS is only sent to mobile numbers in E.164 format (Ex: +442071838750).

  3. Leave Sender ID blank if you do not have one. You can request a Sender ID here.

  4. SMS can be sent to over 200 countries.

  5. Every 160 characters count as 1 SMS.

  6. SMS Pricing is available here.