SMS API v1.1 Release Notes

Date of Release: March 22, 2023

This release brings significant changes and improvements to the SMS portal and API, including revamped campaign creation and modification, addition of a Template Type field in the template form, and changes to the SMS API request parameters. Additionally, the message body data is now deleted from the database after 45 days. To broadcast this change, a note has been added to the SMS Report page.

Campaign Management

To ensure easy setup and effective management of your SMS campaigns, the following updates have been made to the EnableX portal.

  • Global Campaign: A campaign can be set up as a global campaign where country restrictions on sending SMS are not implemented. This can be configured while creating a new campaign or modifying an existing campaign. However, blacklisted country restrictions remain in effect.
  • Template Category: SMS templates can be categorized into pre-defined category names for better management and easy access while sending SMS using the EnableX portal.
  • SMS Message Retention: The message body of all messages is retained for 45 days.

SMS API Updates

The SMS API has been updated in the following areas:

  • Updated JSON Payload: Many existing keys in the JSON payload of the Send-SMS API have been removed and some new keys have been added to it.
Old PayloadNew Payload
ImageImage
  • Mandatory use of Template-ID: A message template must have a Template ID and the template of the message body must be pre-approved before it is used. You need not pass the message body in the API call, as the body is retrieved from the specified Template ID. With this change, the following keys are no longer supported and removed from the JSON payload of Send-SMS API call.

    • body
    • direct
    • recipient[n].body
  • Prioritized Recipient Array: In a single request, if the JSON payload to send an SMS uses both to and recipients, then the recipient array is used and to is disregarded.

  • Custom Data Object: To send SMS, a new data object has been introduced in the JSON payload. You can define custom data for placeholder variables of the template in the new object. This works only with phones numbers defined in the array and not with the recipient array. The custom data is merged only once with the body of the template and the merged content is sent out in SMS to all phone numbers.

{
....
"to": [ "+91xxxxxx", "+91xxxxxxxxx" ],
"data": {
"event": "Arts & Crafts Fair",
"venue": "Dilli Haat",
"start_date": "Mar 26, 2023",
"end_date": "Mar 31, 2023"
},
"template_id": "37081401",
....
}
  • Country Restrictions: If a campaign is set for a specific country, then that country`s restrictions come into effect. All phone numbers used in to or recipient must be of the same country as defined in the campaign. All other phone numbers are rejected.