MsgPlus logo MsgPlus عربي Dashboard

SMS API in Syria: the developer guide to sending verification codes

Everything a developer needs to connect an app to SMS delivery to Syrian numbers through MsgPlus: authentication, endpoints, number formats, encoding, error codes and responses.

Syria · OTP · SMS Last updated:

Authentication

Every request needs two headers: your API key in Authorization: Bearer, and the current Unix time in seconds in X-Timestamp. Requests more than 5 minutes away from server time are rejected, which protects against replays.

# Send a verification code to a Syrian number
curl -X POST https://sms.msgplus.tech/api/v1/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Timestamp: $(date +%s)" \
  -H "Content-Type: application/json" \
  -d '{
    "sender_name": "MyApp",
    "template_id": 1,
    "numbers": ["963941234567"],
    "vars": { "code": "482916" }
  }'

API endpoints

EndpointPurpose
POST /api/v1/sendSend a verification code to one or more numbers using an approved template
GET /api/v1/sms/{id}/statusStatus of a sent message
POST /api/v1/sms/estimateEstimate parts and cost before sending
GET /api/v1/balanceRemaining balance
GET /api/v1/templatesTemplates available to your account
GET /api/v1/sendersApproved sender names

Accepted Syrian number formats

The API accepts the common formats and converts them to the international 9639XXXXXXXX form before sending to Syriatel. Numbers may contain spaces, dashes or Arabic digits.

InputResult
0991234567963991234567
+963991234567963991234567
00963991234567963991234567
991234567963991234567
+963 0991234567963991234567
0781234567Rejected (not a Syrian mobile number)

Encoding and message length

  • Arabic messages use Unicode: 70 characters per single part, 67 per part for long messages.
  • English messages use GSM-7: 160 characters per part.
  • Cost = number of recipients × number of parts, so keep the code template short to stay in one part.
  • Use POST /api/v1/sms/estimate to see the number of parts before sending.

Error codes

HTTPReason
202Accepted and queued for delivery
400X-Timestamp header missing or too far from server time
401API key missing or invalid
403Sender name or template not approved for your account
422Invalid number, missing template variables, or insufficient balance
429Rate limit per minute exceeded

Production tips

  • Send from your server only; never put the API key in a mobile app.
  • Keep your server clock synced (NTP) to avoid X-Timestamp errors.
  • Test in sandbox mode first: simulated messages that are not sent and use no balance.
  • Failed messages are refunded automatically, and you can follow every number in the SMS log.
Download the Postman collection →

Frequently asked questions

How do I send an SMS to a Syrian number with an API?

Send a POST request to https://sms.msgplus.tech/api/v1/send with your API key in Authorization and an X-Timestamp header, plus the sender name, template ID, number and variables.

Which Syrian number format does the API need?

Any common format: 09XXXXXXXX, +9639XXXXXXXX or 009639XXXXXXXX; MsgPlus converts it to 9639XXXXXXXX.

Does the API support Arabic messages?

Yes, in Unicode with 70 characters per single part.

Can I send to several numbers in one request?

Yes, the numbers field accepts a list.

Is there a test environment?

Yes, sandbox mode simulates sending without delivering messages or using balance.

Read next MsgPlus: the OTP verification SMS gateway for Syria

Start sending OTP codes in Syria today

Create your MsgPlus account, get your sender name approved, and send your first verification code over Syriatel in minutes.