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

FieldTypeRequiredDescription
destinationstringyesRecipient phone number in international format without the + sign (e.g. 2348012345678).
senderstringyesYour registered transactional Sender ID. OTPs can only be sent with a transactional sender.
channelstringyesDelivery channel. Accepted value: SMS.
otp_time_to_livenumberyesOTP validity duration in minutes before it expires.
codeLengthnumberyesNumber of digits in the generated OTP code.
otp_placeholderstringnoA placeholder value shown in the message template during testing. Replaced by the real OTP code at send time.
textstringyesThe SMS message body. Use {otp_code} as the placeholder for the generated OTP — it will be replaced before dispatch.

Response · 200 OK

application/json

FieldTypeRequiredDescription
successbooleantrue when the OTP was dispatched successfully.
messagestringHuman-readable summary of the result.
dataobjectThe response payload.
metaobjectRequest metadata.