v1 · REST / JSON
API Reference
REST/JSON API for sending SMS OTPs to Syrian phone numbers.
https://aman-gate.com/apiIntroduction
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
| Status | Meaning |
|---|---|
| 201 | OTP sent successfully |
| 400 | Validation error: check the request body |
| 401 | Missing or invalid token |
| 402 | No active subscription or quota exceeded |
| 403 | IP not whitelisted |
| 429 | Too many failed requests: wait for the Retry-After header |
Send OTP
Send a one-time password to a phone number via SMS.
Requires an active subscription and an approved message template. Failed deliveries are not charged.
Request body
| Field | Type | Description |
|---|---|---|
gsm | string | Phone number in international format, e.g. 963911000000. required |
template_id | integer | ID of an approved message template from your account. required |
code | string | The OTP code to inject into the template, e.g. "482910". required |
language | integer | 0 = 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
}'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 →