Go to account

OTP

Get All OTPs

Retrieve a paginated list of all OTP records for your account. Filter by phone number or status to narrow results.

GET

/v1/otp/otps

Authorization

Header

X-Emisri-Api-Key: your_secret_key

Required

yes

Query parameters

FieldTypeRequiredDescription
pagenumbernoPage number to retrieve. Defaults to 1.
sizenumbernoNumber of records per page. Defaults to 20.
phonestringnoFilter OTPs by recipient phone number in international format (e.g. 2348012345678). Matches against the destination field on each OTP.
statusstringnoFilter by OTP status. Accepted values: PENDING, VERIFIED, EXPIRED, REVOKED.

Response · 200 OK

application/json

FieldTypeRequiredDescription
successbooleantrue when the request completed successfully.
dataobjectThe response payload.
metaobjectRequest metadata.

OTP object

FieldTypeRequiredDescription
otpIdstringUnique ID assigned to the OTP.
destinationstringThe phone number this OTP was sent to.
senderstringThe Sender ID the OTP was dispatched from.
channelstringDelivery channel used to send the OTP (e.g. sms).
codeLengthnumberNumber of digits in the generated OTP code.
statusstringCurrent status of the OTP. See Status Values table below.
expiresAtstringISO 8601 timestamp of when the OTP expires.
verifiedAtstring | nullISO 8601 timestamp of when the OTP was verified, or null if not yet verified.
revokedAtstring | nullISO 8601 timestamp of when the OTP was revoked, or null if not revoked.
createdAtstringISO 8601 timestamp of when the OTP was created.

Status values

Use any of these values with the status query parameter to filter results.

ValueDescription
PENDINGOTP has been sent and is awaiting verification.
VERIFIEDOTP was successfully verified by the user.
EXPIREDOTP passed its expiry window without being verified.
REVOKEDOTP was manually invalidated via the revoke endpoint.