API to send SMS

Our Send SMS API allows you to send unique one-way sms to anyone without having to create any engagement on our platform. You no longer have to log in to our website if all you want to do is blast sms to your contacts.

This is fairly easy. But if you want to create a standard sms blast in the platform where you can continually subscribe new or existing contacts, you may want to check out our customized SMS API workaround that does not require you to have any knowledge about APIs.

HTTP Method & Headers

The HTTP method is POST using this URL:

https://start.engagespark.com/api/v1/messages/sms

You’ll need to set the following HTTP Headers:

Key Value
Authorization Token {API_KEY}
Content-type application/json

Replace {API_KEY} with your actual API Key from your account. Find it in your profile under Account Settings > API Key (https://ui.engagespark.com/#/api/docs).

Request Body Definition

Below are the only details we need and you need to provide in order for you to successfully send an SMS using the API:

Key Description Data Type Required Example
organization_id The id of user’s organization. Find it in your organization profile (https://ui.engagespark.com/#/organizations/details). Integer Yes 0123
recipient_type This indicates the type of the recipient (mobile_number or contact_id) String Yes mobile_number
mobile_numbers The mobile number of the recipient if recipient_type is mobile_number. The mobile number must be in international format (with country code e.g., 63). Please do not include a + sign. List[string] Yes [“639123456789”]
contact_ids The contact id of the recipient number if recipient_type is contact_id. List[integer] Yes [10203]
message The content of the message to be sent to the recipient. String Yes Sample message to you.
sender_id The organization’s caller/sender ID or organization’s local phone number (virtual number). Most countries require sender IDs to be pre-registered. If you set an ID here and you receive the message with an ID other than the one you set, you may want to contact us to pre-register one for branding purposes. Click here to know more about sender IDs. String Optional, but recommended. Otherwise, it will be sent with the local telco’s random sender like INFOSMS or NXSSMS. engageSPARK

Sample JSON (recipient_type is mobile_number):

{
"organization_id": 1234,
"recipient_type": "mobile_number",
"mobile_numbers": ["639123456789"],
"message": "Sample message to you.",
"sender_id": "engageSPARK"
}

Sample JSON (recipient_type is contact_id):

{
"organization_id": 1234,
"recipient_type": "contact_id",
"contact_ids": [10203],
"message": "Sample message to you.",
"sender_id": "engageSPARK"
}

You can send messages via API to individual or bulk mobile numbers and new or existing contacts in your account. If you want to send sms to multiple contacts just do this:

“mobile_numbers”: [“639123456789″,”639193456789″,”639153456789″,”639173456789”],
Or
“contact_ids”: [10203,11203,12203,13203],

Note: For the Philippines, telcos have a 5 sms per mobile number per minute (5 sms/number/minute) capping rule. If you are sending more than 5 sms to a single number within a minute, some messages may not get through and will be lost.

Phone Number Formats

Phone numbers in the API need to have an international dialing code.

For example, for a number from the Philippines (with the dialing code 63), 6312345678 would be correct, whereas 12345678 would be missing the dialing code. If you are not sure about the dialing code of the country you want to send calls or SMS to, check this Wikipedia article on dialing codes.

Have questions or need a little extra help?

Get in touch with us via:

Or drop us a message here: