Send an OTP
Sends a 6-digit code to the recipient over WhatsApp. The code is delivered to the end user only — it is never in the response. Keep the returned id and pass it back to /v1/otp/verify as requestId, along with the code the user typed.
Scope required: otp:send.
Cost. Each successful send deducts 5 DA from your balance. If WhatsApp rejects the message, this call returns 422 and the 5 DA is refunded before the response is sent — a failed delivery never costs you anything.
Rate limits. 5 sends per recipient per hour, 200 sends per account per hour. Either returns 422 BUSINESS_RULE_VIOLATION.
Defaults. ttlSeconds = 300 (range 60–900), maxAttempts = 5 (range 1–10), language = "en" (en | fr | ar). Out-of-range values are rejected with 422 — they are not clamped.
On success the returned status is always SENT, with sentAt and expiresAt populated.
Request
- Base URL: https://api.dzverify.com
- URL: https://api.dzverify.com/v1/otp/send
- Auth: API key in header X-API-Key
Request body
Example request
{
"recipient": "+213612345678",
"language": "en",
"ttlSeconds": 300,
"maxAttempts": 5
}Response
OTP sent. Status is SENT, with sentAt and expiresAt.
Example response
{
"data": {
"id": "01HZX5N7M4J2K8Q4R0T5V7Y9AB",
"recipient": "+213612345678"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.