SMS API
You can send Transactional, Marketing, and One Time Password (OTP) SMS's using the SMS API. There are three predefined SMS API templates. One each for Transactional, Marketing, and OTP 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.

OTP SMS

The OTP SMS includes two parts, Send API and Verify API.
Send API 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.
  • origination_number (Optional): Origination Number as given by AWS.
  • mobile: Mobile Number of the recipient in +449876543210 format.
Verify API must include the following parameters.
  • template_key: The unique secret key for the template.
  • mobile: Mobile Number of your end user to which OTP was sent in +449876543210 format.
  • OTP: OTP received from your end user.

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. 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. 2.
    SMS is only sent to mobile numbers in E.164 format (Ex: +442071838750).
  3. 3.
    Leave Sender ID blank if you do not have one. You can request a Sender ID here.
  4. 4.
    SMS can be sent to over 200 countries.
  5. 5.
    Every 160 characters count as 1 SMS.
  6. 6.
    SMS Pricing is available here.

Need help? Write to [email protected]

Last modified 2mo ago