Skip to main content

Send SMS

Queue a transactional SMS for immediate delivery to recipients in Saudi Arabia and Egypt.

  • OTP and verification codes
  • Appointment reminders
  • Order status updates
  • Account notifications

Endpoint

POST /sms/send

Returns: 202 Accepted

Prerequisites

Verified Sender Name Required

The from sender name must be registered and approved in the Arsel Dashboard under Settings > SMS Senders. Sender name registration is required by telecom regulators in KSA and Egypt. Messages with unregistered sender names will be rejected.

Headers

HeaderValueRequired
AuthorizationBearer <your-api-key>Yes
Content-Typeapplication/jsonYes

Body Parameters

ParameterTypeRequiredDescription
fromstringYesRegistered sender name. Alphanumeric, 3-11 characters.
tostring[]YesArray of phone numbers in international format.
contentstringYesMessage body. Supports {{variables}}.
variablesobjectNoKey-value pairs for {{variable}} replacement in content.
categorystringNoLabel for grouping messages in analytics. Max 100 characters.

Phone Number Format

All recipients in a single request must be from the same country. Mixing KSA and Egypt numbers in one request is not allowed.

CountryFormatExample
Saudi Arabia (KSA)+9665XXXXXXXX+966512345678
Egypt+201XXXXXXXXX+201012345678

Character Encoding and Message Parts

SMS messages are automatically split into parts based on content encoding:

EncodingCharactersSingle SMSPer Part (Multi-part)
GSM (Latin, digits, basic symbols)A-Z, 0-9, common punctuation160 characters153 characters
Unicode (Arabic, emoji, special chars)Arabic script, CJK, emoji70 characters67 characters

The encoding is detected automatically based on message content. If any character requires Unicode, the entire message uses Unicode encoding.


Response

{
"id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a",
"to": ["+966512345678"],
"from": "Arsel",
"queued_recipients": 1,
"invalid_recipients": 0,
"created_at": "2026-03-08T12:00:00.000Z"
}
FieldTypeDescription
idstringUnique SMS ID. Use this to check delivery status.
tostring[]Recipient phone numbers
fromstringSender name
queued_recipientsnumberNumber of recipients successfully queued
invalid_recipientsnumberNumber of invalid phone numbers skipped
created_atstringISO 8601 timestamp
tip

Check invalid_recipients in the response. Invalid phone numbers are silently skipped and not queued for delivery.


Examples

Basic SMS

curl -X POST "https://api.arsel.sa/api/v1/sms/send" \
-H "Authorization: Bearer be_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"from": "Arsel",
"to": ["+966512345678"],
"content": "Your verification code is 483920. It expires in 5 minutes."
}'

With Template Variables

curl -X POST "https://api.arsel.sa/api/v1/sms/send" \
-H "Authorization: Bearer be_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"from": "MyStore",
"to": ["+966512345678", "+966598765432"],
"content": "Hi {{name}}, your order {{order_id}} has been shipped and will arrive by {{date}}.",
"variables": {
"name": "Ahmed",
"order_id": "ORD-12345",
"date": "March 10"
},
"category": "shipping-updates"
}'

Arabic Content (Unicode)

curl -X POST "https://api.arsel.sa/api/v1/sms/send" \
-H "Authorization: Bearer be_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"from": "Arsel",
"to": ["+966512345678"],
"content": "مرحباً {{name}}، رمز التحقق الخاص بك هو {{code}}. صالح لمدة 5 دقائق.",
"variables": {
"name": "أحمد",
"code": "839201"
}
}'

Error Responses

{
"status_code": 422,
"name": "validation_error",
"message": "All recipients must be from the same country"
}