SENDO SMS API

SENDO SMS message sending API to integrate your events requested by backend flows, client-side applications or scheduled automations. Send SMS messages to a client or several clients in the same request, define a callback URL to receive the status of each event.


SMS

Send SMS

POSThttps://api.sendo.cloud/api/sms/send

This endpoint is used to send messages to a unique destination.

Body attributes


FieldTypeDescriptionDefault ValueOptionalComments
appOriginstringOrigin from where request is sendnoneNo
campaign_external_idstringExternal ID of the campaignnoneYes
urlstringurl for use in the messagenoneYesTo include a url in a message, it must be sent as a variable, for example: Hello {{url}}.
senderIdstringShort code to usenoneNo
destinationstringNumber to send the message. See Destination DefinitionnoneNo
codingintMessage codification to use. See Coding Definition0Yes
contentstringMessage content (max. 500 characters)noneNo
priorityintMessage priority (a higher value indicates a higher priority) See Priority DefinitionnoneYes
validityPeriodintValid period in hours for receiving DLRnoneNo
obfuscatedbooleanDetermine whether or not to encrypt the messagefalseYes
dlrbooleanDetermines whether or not to receive DLRfalseYes
dlrWebhookstringURL of webhook to send DLR eventnoneNoOnly required if dlr is enabled
dlrMethodstringMethod of webhook to send DLR eventnoneNo- Only required if dlr is enabled
- Only POST method allowed

NOTE: The URL you enter in the body of the request will be shortened to the following format: s3n.me/v4cv0. NOTE: When using url variable, the field url must be sent to prevent unreadable content.

Request body.


curl -X 'POST'  
 'http://35.185.103.32:3000/api/sms/send'
-H 'accept: application/json'
-H 'Content-Type: application/json'
-d '{
"appOrigin": "https://my.domain.com or My APP",
"campaign_external_id": "TEST",
"senderId": "3636",
"destination": "9999999",
"coding": 0,
"content": "Hello world",
"priority": 0,
"validityPeriod": 0,
"obfuscated": false,
"dlr": false,
"dlrWebhook": "https://my.domain.com/receive",
"dlrMethod": "POST"
}'

Response .
CodeDescription
200Successful
{
  "message_id": "8fe793e2-3a5e-452e-a92a-363666248098"
}

Server responses.


Send SMS Batch

POSThttps://api.sendo.cloud/api/sms/send-batch

This endpoint is used to send low priority messages to a more than one destination.

Required attributes


FieldTypeDescription
File.jsonFile to upload, format must be JSON

File format

{
"appOrigin": "YOURBRAND-APP",
"senderId": "CL 3333 MV 3636",
"destinations": [593919191919],
"coding": 0,
"content": "Lorem ipsum dolor sit amet,",
"validityPeriod": 2,
"dlr": false,
"obfuscated": true,
"callback_url": "https://fine-gray-seal-hose.cyclic.app/response"
}

Request body.


curl -X 'POST' 
  'http://35.185.103.32:3000/api/sms/send-batch' 
  -H 'accept: application/json' 
  -H 'Content-Type: multipart/form-data' 
  -F 'file=@fileName.json;type=application/json'

Responses.

{
  "bulkId": "8fe793e2-3a5e-452e-a92a-363666248098"
}

Server responses.


Webhook

Callback response

Method   POST

To receive the ids of the messages generated by the transaction in the request, set the callback_url field with a valid URL Send SMS Batch API

The id format is generated using the UUID v4 standard.

Callback Response

"Messages"
  {
  "status": string,
  "bulk_id": string,
  "messages": [Array]
}

Example Response

"Messages"
  {
  "status": "success",
  "bulk_id": "eacb2a06-b218-4503-855e-1f0f6202bd07",
  "messages": [
    {
      "destination": "593919191919",
      "id": "d1989cc0-9fdc-4f0d-81b4-7e4ab147ed0b"
    },
     {
      "destination": "593698636989",
      "id": "17bc3fb3-8404-4736-b599-83d80d6bf47c"
    },
    {
      "destination": "777777",
      "id": null,
      "error": "777777 is not a valid phone number"
    }
  ]
}

The webhook expects an HTTP response with a 200 response code with no body.

DLR response

To receive a final message status update, set the property dlr, dlrWebhook and dlrMethod in Send SMS API or Send SMS Batch API

DLR Response

"MessageBatchHook"
 {
    "status": string,
    "bulk_id": string,
    "message_id": string
}

Example Response

"MessageBatchHook"
 {
    "status": "success",
    "bulk_id": "0d284743-99e9-43af-b24d-dbea8ee82541",
    "message_id": "d3a90127-c26e-4238-a8fc-3d130a557493"
}

The webhook expects an HTTP code response which might be:

CodeDescription
200Success with return data
201Success with no return data
204Success with no return data

The SMPP protocol supports delivery of reports (DLR) to determine the result of the message sent. Each error code returned will indicate the status at the time of attempting to deliver the message, and are associated with both the SMS Gateway and the SMSC platform. See more.

MO forwarding

If you want to receive MO from your customers, you can send a request to the following endpoint:

POSThttps://api.sendo.cloud/api/mo-forwarding

Required attributes


FieldTypeDescriptionExample
mo_urlstringURL to forward MOhttps://YOUR_DOMAIN/MO_API

CodeDescription
200OK

MO Structure

The following structure will be send to the url gived in mo_url.

{
short_code: "001"
from: "593999999999"
message: "Hello World"
application_id: 0
}

The endpoint provided must return a 200 status code to confirm the reception of the MO.


Definitions

Coding

When sending messages, it is important to consider the encoding of data for both receiving and sending. Standard encoding values are listed below.

CodingSender IDCharacter SetBits per CharacterCharacters per Single MessageMax per Concat. Part
0 DefaultShort Code long CodeASCII7160*153
0 Default8XX (Toll-Free)GSM7160*153
1Short Code long CodeASCII8**140**136**
18XX (Toll-Free)Latin-98140134
3Alllatin-18140134
8AllUTF-16167067

Priority

PriorityDescriptionValue to use
Level 0

Lowest priority. This value is recommended to set to the bulk process.

0
Level 1This value must be set to the OTP flow1
Level 2Intermediate priority2
Level 3High priority3

Destination

Destinations numbers are formatted following pattern:
[country code] [subscriber number including area code]
Maximum length: 15 digits.

Example: 593123456789, 505123456789