Endpoint
POST /v1/rest/sms/send
Request Headers
| Header |
Value |
apikey |
YOUR_API_KEY |
Content-Type |
application/json |
Accept |
application/json |
Request Body Parameters
All requests to the EasySendSMS API should use the application/json content type
and the POST method. Ensure that the request body is in JSON format and that you
use raw JSON data in your POST requests. We do not support the GET method. All
data must be sent in the request body as JSON when using the POST method.
| Parameter |
Description |
Presence |
| from |
Sender Name that the message will appear from. Max Length of 15 if numeric. Max Length of 11 if alphanumeric. To prefix the plus sign ("+") to the sender's address when the message is displayed on their cell phone, please prefix the plus sign to your sender's address while submitting the message (note the plus sign should be URL encoded). Additional restrictions on this field may be enforced by the SMSC. |
Required |
| to |
Mobile number of the recipient that the message will be sent to, e.g., 19876543210 (Do not use + or 00 before the country code). You can use a comma in the to parameter to send to multiple numbers, with a maximum of 30 numbers in each request. |
Required |
| text |
The message to be sent. It can be English as plain text or any other language as Unicode, max message length 5 parts. For concatenated (long) messages, every 153 characters are counted as one message for plain text and 67 characters for Unicode, as the rest of the characters will be used by the system for packing extra information for re-assembling the message on the cell phone. |
Required |
| type |
Indicates the type of message. Values for type include: 0: Plain text (GSM 3.38 Character encoding), 1: Unicode (For any other language). |
Required |
| scheduled |
The scheduled date and time for sending the message, formatted in ISO 8601. Example: 2023-12-31T19:35:00. The time zone used is UTC, so please ensure that the date and time are provided according to UTC. |
Optional |
Message Type Support
The EasySendSMS REST API supports various message types and
can handle multiple recipients in a single request, ensuring your messages are
delivered promptly and reliably.
Bulk SMS Sending
A request containing multiple destination numbers will be aborted immediately if any error other than "Invalid mobile number" [Code: 4012] is encountered.
If an "Invalid mobile number" [Code: 4012] is found, that destination number will be skipped, and the request will proceed with the next number.
A maximum of 30 numbers can be submitted per request. Duplicate numbers will be ignored.
SMS Send API Examples
Below are example requests and responses for sending SMS messages using the EasySendSMS REST API.
Example 1: Standard Text Message (Single Recipient)
This example shows how to send a standard plain text message to a single mobile number.
Request
curl -X POST \
-H "apikey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"from": "SenderName",
"to": "12345678900",
"text": "Hello, this is a test message!",
"type": "0"
}' \
"https://restapi.easysendsms.app/v1/rest/sms/send"
Success Response
{
"status": "OK",
"scheduled": "Now",
"messageIds": [
"OK: 69991a73-a560-429f-9c5a-3251dc1522bb"
]
}
Example 2: Unicode Message (Arabic)
This example demonstrates how to send a message containing Unicode characters, such as Arabic. Note that the type parameter is set to 1.
Request
curl -X POST \
-H "apikey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"from": "SenderName",
"to": "12345678900",
"text": "مرحبا، هذه رسالة اختبار!",
"type": "1"
}' \
"https://restapi.easysendsms.app/v1/rest/sms/send"
Success Response
{
"status": "OK",
"scheduled": "Now",
"messageIds": [
"OK: 8f3d9b7a-5c1e-4b9a-8d2f-1c7e9a0b3d1c"
]
}
Example 3: Scheduled Message
This example shows how to schedule an SMS to be sent at a future date and time. The scheduled parameter must be a valid ISO 8601 timestamp in UTC.
Request
curl -X POST \
-H "apikey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"from": "SenderName",
"to": "12345678900",
"text": "This is a scheduled message for the team meeting.",
"type": "0",
"scheduled": "2026-03-15T10:00:00Z"
}' \
"https://restapi.easysendsms.app/v1/rest/sms/send"
Success Response
{
"status": "OK",
"scheduled": "2026-03-15T10:00:00Z",
"messageIds": [
"OK: a1b2c3d4-e5f6-7890-1234-567890abcdef"
]
}
Example 4: Bulk Message (Multiple Recipients)
This example shows how to send the same message to multiple recipients in a single API call. The to parameter accepts a comma-separated list of up to 30 numbers.
Request
curl -X POST \
-H "apikey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"from": "PromoAlert",
"to": "12345678901,12345678902,12345678903",
"text": "Flash sale ends tonight! Use code SAVE50 for 50% off.",
"type": "0"
}' \
"https://restapi.easysendsms.app/v1/rest/sms/send"
Success Response
{
"status": "OK",
"scheduled": "Now",
"messageIds": [
"OK: 1e1a7c30-a160-429f-9c5a-3251dc1522cc",
"OK: 2f2b8d41-b271-430a-ad6b-4362ed2633dd",
"OK: 3g3c9e52-c382-441b-be7c-5473fe3744ee"
]
}
Example 5: Partial Success (with Invalid Number)
This example demonstrates how the API handles a request with both valid and invalid recipient numbers. The API will skip the invalid number (1234) and successfully send the message to the valid number.
Request
curl -X POST \
-H "apikey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"from": "SenderName",
"to": "12345678900,1234",
"text": "Hello, this is a test message!",
"type": "0"
}' \
"https://restapi.easysendsms.app/v1/rest/sms/send"
Partial Success Response
{
"status": "OK",
"scheduled": "Now",
"messageIds": [
"OK: 69991a73-a560-429f-9c5a-3251dc1522bb",
"ERR: 4012"
]
}
Example 6: General Error Response
This is an example of a generic error response, which occurs when a request fails due to issues like an invalid mobile number.
Error Response
{
"error": 4012,
"description": "Invalid mobile number."
}