TrackMe API Docs

Send an OTP via email, SMS, or WhatsApp.

OTPs are six digits, valid for 10 minutes, and single-use. Limited to 5 send attempts INCLUDING failures per destination and purpose per 15 minutes; the sixth attempt returns 429 with retryAfterSeconds. With channel omitted, email destinations use email and phones try SMS first, then WhatsApp as fallback. An explicit channel disables fallback. Phone syntax must be international E.164; local 05... fails validation (422). Taqnyat account permissions and approved sender determine destination coverage. Provider rejections, including country/IP restrictions, return 409 OTP_DELIVERY_FAILED. sent:true means accepted by the provider, not confirmed handset delivery. An unavailable fallback does not mask the primary delivery failure.

POST
/api/v1/auth/otp/send

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/auth/otp/send" \  -H "Content-Type: application/json" \  -d '{    "destination": "[email protected]",    "purpose": "verify_email",    "channel": "email"  }'
{  "data": {    "sent": true,    "destination": "[email protected]",    "purpose": "verify_email"  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}
{  "error": {    "code": "OTP_DELIVERY_FAILED",    "message": "Verification code could not be sent. Please try again later."  },  "meta": {    "requestId": "example-request-id"  }}
{  "error": {    "code": "VALIDATION_ERROR",    "message": "One or more fields are invalid.",    "fields": [      {        "path": "email",        "rule": "email",        "message": "Must be a valid email address."      }    ]  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}
{  "error": {    "code": "RATE_LIMITED",    "message": "Too many requests — slow down and retry after the indicated delay.",    "retryAfterSeconds": 60  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}