Authentication
Include your API key on every request, along with a JSON content type. Requests without a valid key are rejected.
application/jsonkey header may return a generic 500 response instead of a JSON error body.
Send OTP
Creates a one-time password and sends it by SMS or WhatsApp. The code is valid for 5 minutes. Confirm it with Verify OTP.
Request body
+213…)."sms" or "whatsapp". Defaults to sms.4 or 6 digits. Defaults to 4.en, fr, or ar. Defaults to en.Try it
Send a request to see the response.
Example response
{ "success": "SMS sent successfully." }
Errors
Error codes 15
| Status | Message | Cause |
|---|---|---|
| 405 | Method Not Allowed | Not a POST request. |
| 400 | Invalid message type. Must be 'sms' or 'whatsapp'. | type is neither value. |
| 400 | Invalid request, missing parameters. | country or phone missing. |
| 400 | Invalid phone number. | Phone invalid for the country. |
| 400 | Only Algeria (DZ) country code is allowed for SMS type. | SMS was requested with a country other than Algeria. |
| 400 | Only Algeria (DZ) country code is allowed. | Phone number is not an Algerian number. |
| 401 | Unauthorized, missing Key. | API key missing or not recognized. |
| 402 | Insufficient funds to send SMS. | Account balance is too low. |
| 404 | Invalid API key. | API key does not match an account. |
| 404 | Project not found. | Project does not exist or is not yours. |
| 404 | User not found. | Account could not be found. |
| 404 | Country not found. | Country is not supported for billing. |
| 429 | Too many OTP requests. Please try again after an hour. | More than 3 requests in one hour for that phone. |
| 500 | Failed to send SMS. | Message could not be delivered. |
| 500 | An error occurred while processing the request. | Unexpected server error. |
Notes
- The OTP stays valid for 5 minutes.
- You can send at most 3 OTPs per phone number per hour (your own verified number is exempt).
Verify OTP
Checks the code the user entered. On success, returns the verified user and creates their record the first time.
Request body
Try it
Send a request to see the response.
Example response
{
"user": {
"uid": "f1e2d3c4-...",
"identifier": "+213555123456",
"country": "DZ",
"createdAt": "2026-09-18T10:00:00.000Z",
"lastLogin": "2026-09-18T10:02:13.000Z",
"projectId": "my-project-id",
"customerId": "<userId>",
"type": "sms"
}
}
Errors
Error codes 10
| Status | Message | Cause |
|---|---|---|
| 405 | Method Not Allowed | Not a POST request. |
| 400 | Invalid request, missing parameters. | phone, otp, or projectId missing. |
| 400 | Invalid phone number. | Phone invalid for the country. |
| 400 | Invalid OTP. | Code does not match the stored OTP. |
| 400 | OTP has expired. | Past the 5-minute window. |
| 401 | Unauthorized, missing Key. | API key missing or not recognized. |
| 404 | Invalid API key. | API key does not match an account. |
| 404 | Project not found. | Project does not exist or is not yours. |
| 404 | OTP not found or expired. | No OTP was found for this phone number. |
| 500 | An error occurred while processing the request. | Unexpected server error. |
Notes
- Only the latest OTP for that phone number is checked.
- On first success, a user record is created for that phone. Later verifications update the last login time.
- A successful check does not invalidate the OTP early — it remains usable until it expires.
country is missing, the request may fail with a generic 500 instead of a clear error message.
Send notification
Sends an SMS notification using one of your approved templates and the values you provide for its placeholders.
Request body
+213…).{ "name": "Ali" }. Up to 5 fields; each value max 40 characters.Try it
Send a request to see the response.
Example response
{
"success": "SMS sent successfully.",
"encoding": "GSM-7",
"smsLength": 47,
"pduCount": 1,
"cost": 7.5
}
Errors
Error codes 16
| Status | Message | Cause |
|---|---|---|
| 405 | Method Not Allowed | Not a POST request. |
| 400 | Invalid request, missing parameters. | Missing country, phone, projectId, or templateId. |
| 400 | Only Algeria (DZ) country code is allowed. | Country is not Algeria. |
| 400 | Invalid phone number. | Phone invalid. |
| 400 | Missing template fields. | Empty/missing placeholder values. Body includes missing[]. |
| 400 | Invalid template fields. (too_many_fields) | More than 5 fields. Includes details. |
| 400 | Invalid template fields. (field_value_too_long) | A value exceeds 40 chars. Includes details. |
| 400 | Rendered message is empty. | Body blank after substitution. |
| 402 | Insufficient funds to send SMS. | Account balance is too low. |
| 403 | Template not approved. | Template is not approved yet. Response includes status. |
| 404 | Invalid API key. | API key does not match an account. |
| 404 | Project not found. | Project does not exist or is not yours. |
| 404 | Template not found. | Template does not exist or is not yours. |
| 404 | User not found. | Account could not be found. |
| 404 | Country not found. | Country is not supported for billing. |
| 500 | Failed to send SMS. | Message could not be delivered. |
Notes
- The template must be approved before you can send it.
- Placeholders look like
{{name}}. Every required placeholder must have a non-empty value. - You can send at most 5 fields; each value can be up to 40 characters.
- Cost is based on SMS segments. The response includes encoding, length, segment count, and cost. See SMS segments (PDU).
500 instead of a JSON error body.
SMS segments (PDU)
Learn how SMS segment (PDU) count is calculated from your message text — encoding first, then length, then number of segments.
How we calculate
- 1. Choose encoding — If every character is in the GSM 7-bit default alphabet or its extension table, use GSM-7. If any character is outside that set (Arabic, emoji, …), use Unicode (UCS-2) for the whole message.
- 2. Measure length — GSM-7: each basic character = 1 septet; each extended character
^ { } \ [ ] ~ | €= 2 septets (escape + symbol). Unicode: length = number of UTF-16 code units (an emoji often counts as 2). - 3. Count segments — GSM-7: 1 PDU if length ≤ 160, otherwise
ceil(length / 153). Unicode: 1 PDU if length ≤ 70, otherwiseceil(length / 67). The lower multi-part sizes leave room for the concatenation header.
Limits
Examples
€ costs 2 → length 11 → 1 PDUGSM 7-bit characters
Characters allowed in GSM-7. Click one to insert it into the tester. Anything outside this set forces Unicode.
Basic alphabet (1 septet each)
Extended alphabet (2 septets each)
Escape + characterTry it
Type a message to see encoding, length, and PDU count.
References
-
3GPP TS 23.038
(ETSI TS 123 038) — Alphabets and language-specific information. Formerly GSM 03.38.
GSM 7-bit default alphabet, extension table (escape
0x1B), and UCS-2. Single segment: up to 160 GSM-7 characters or 70 UCS-2 characters in 140 octets. - 3GPP TS 23.040 (ETSI TS 123 040) — Technical realization of the Short Message Service. Formerly GSM 03.40. TP-User-Data up to 140 octets. Concatenated SMS (clause 9.2.3.24.1): 153 GSM-7 or 67 UCS-2 characters per segment with a standard 6-octet UDH.
Country codes
Set country to a two-letter code such as "DZ". Do not use the dialing prefix — write "DZ", not "213" or "+213".
Which codes can I use?
- SMS OTP and SMS notifications — only Algeria (
DZ). The phone number must be an Algerian number (+213…). - WhatsApp OTP — any country from the list below, as long as the phone number is valid for that country.
- Verify OTP — use the same country code you used when the OTP was sent.
All countries (245)
+247+93+358+355+213+1+376+244+1+1+54+374+297+61+43+994+1+973+880+1+375+32+501+229+1+975+591+599+387+267+55+246+1+673+359+226+257+855+237+1+238+1+236+235+56+86+61+61+57+269+682+506+385+53+599+357+420+243+45+253+1+1+670+593+20+503+240+291+372+268+251+500+298+679+358+33+594+689+241+220+995+49+233+350+30+299+1+590+1+502+44+224+245+592+509+504+852+36+354+91+62+98+964+353+44+972+39+225+1+81+44+962+7+254+686+383+965+996+856+371+961+266+231+218+423+370+352+853+261+265+60+960+223+356+692+596+222+230+262+52+691+373+377+976+382+1+212+258+95+264+674+977+31+687+64+505+227+234+683+672+850+389+1+47+968+92+680+970+507+675+595+51+63+48+351+1+974+242+262+40+7+250+590+290+1+1+590+508+1+685+378+239+966+221+381+248+232+65+1+421+386+677+252+27+82+211+34+94+249+597+47+46+41+963+290+886+992+255+66+228+690+676+1+216+90+993+1+688+1+256+380+971+44+1+598+998+678+39+58+84+681+212+967+260+263No countries match your filter.