v1 · REST / JSON

API Reference

REST/JSON API for sending SMS OTPs to Syrian phone numbers.

Base URLhttps://aman-gate.com/api

Introduction

The Aman Gate API lets you send one-time passwords via SMS to Syrian numbers. All requests and responses use application/json. You need an active subscription, or an approved sandbox, to send OTPs.

Create a free account →

Authentication

Every request must include your API token in the Authorization header. Find it in the Developer section of your dashboard.

Authorization: Token <your_api_token>

If you configured an IP whitelist, calls from other addresses are rejected with 403.

Error codes

StatusMeaning
201OTP sent successfully
400Validation error: check the request body
401Missing or invalid token
402No active subscription or quota exceeded
403IP not whitelisted
429Too many failed requests: wait for the Retry-After header

Send OTP

Send a one-time password to a phone number via SMS.

POST /otp/send/

Requires an active subscription and an approved message template. Failed deliveries are not charged.

Request body

FieldTypeDescription
gsmstringPhone number in international format, e.g. 963911000000. required
template_idintegerID of an approved message template from your account. required
codestringThe OTP code to inject into the template, e.g. "482910". required
languageinteger0 = Arabic, 1 = English. Default: 1. optional

Code examples

curl -X POST https://aman-gate.com/api/otp/send/ \
  -H "Authorization: Token MY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
      "gsm": "963911000000",
      "template_id": 1,
      "code": "482910",
      "language": 1
  }'
Replace MY_TOKEN with your API token.

Responses

201 CreatedOTP sent successfully

{
  "id": 1427,
  "gsm": "963911000000",
  "template": 1,
  "template_name": "Login OTP",
  "template_code": "123456",
  "message": "Your verification code is: 123456",
  "status": "sent",
  "provider_response": "OK",
  "created_at": "2026-03-25T03:00:00Z",
  "sandbox": false
}

400 Bad RequestValidation error

{
  "gsm": [
    "GSM must be a valid 12-digit Syrian mobile number starting with 9639."
  ]
}

402 Payment RequiredNo subscription or quota exceeded

{
  "detail": "You have used all 3 sandbox OTPs. Please subscribe to continue."
}

Sandbox

New accounts can request a sandbox with 3 free test messages. Sandbox sends use the same endpoint and are flagged with "sandbox": true in the response.

Need an API key or have questions?

Contact us →