OTP
The OTP object
An OTP as the API and events show it. Prices are in millionths of a credit.
{
"id": "7c1e0b52-9d2f-7a41-8e33-52d0f1c7ab90",
"to": "+447700900123",
"status": "sent",
"channel": "telegram",
"channels": ["telegram", "sms"],
"telegram_status": "sent",
"price_micros": 15000,
"checks_left": 5,
"payload": "signup-4821",
"expires_at": "2026-11-02T09:25:02.123456Z",
"created_at": "2026-11-02T09:15:02.123456Z"
}idstring
Its id.
tostring
The number, in international format.
statusstring
Where it stands; see below.
channelstring
The channel carrying the code now:
telegram or sms.channelsstring[]
The channels it may try, in order.
telegram_statusstring
What Telegram last said:
sent, delivered, read, expired, revoked. Absent if it never went by Telegram.sms_message_idstring
The message that carried it by SMS. Absent if none did.
sms_statusstring
That message's status.
price_microsinteger
What you paid so far, after any refund.
checks_leftinteger
Wrong codes left before it fails.
payloadstring
Your own value, if you sent one.
errorstring
Why it failed, if it did.
expires_atstring
When the code stops working.
created_atstring
When it was started.
delivered_atstring
When the channel reported it arrived.
verified_atstring
When the right code came back.
Statuses#
| status | Meaning |
|---|---|
pending | Created, not sent yet |
sent | Handed to the channel |
delivered | The channel reports it arrived |
read | Telegram reports the person opened it |
verified | The right code came back |
failed | No channel could deliver it, or too many wrong codes |
expired | Its time ran out unverified |