Need help?
Go to account
OTP
Request OTP
Generate and dispatch a one-time password to a phone number. The OTP is valid for a limited window — use the Verify OTP endpoint to confirm it before expiry.
POST
/v1/otp/request
Authorization
Header
X-Emisri-Api-Key: your_secret_key
Required
yes
Request body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
| destination | string | yes | Recipient phone number in international format without the + sign (e.g. 2348012345678). |
| sender | string | yes | Your registered transactional Sender ID. OTPs can only be sent with a transactional sender. |
| channel | string | yes | Delivery channel. Accepted value: SMS. |
| otp_time_to_live | number | yes | OTP validity duration in minutes before it expires. |
| codeLength | number | yes | Number of digits in the generated OTP code. |
| otp_placeholder | string | no | A placeholder value shown in the message template during testing. Replaced by the real OTP code at send time. |
| text | string | yes | The SMS message body. Use {otp_code} as the placeholder for the generated OTP — it will be replaced before dispatch. |
Response · 200 OK
application/json
| Field | Type | Required | Description |
|---|---|---|---|
| success | boolean | — | true when the OTP was dispatched successfully. |
| message | string | — | Human-readable summary of the result. |
| data | object | — | The response payload. |
| meta | object | — | Request metadata. |