Skip to main content
GET
Get OTP status

Authorizations

Authorization
string
header
required

Your Robase API key. Starts with robe_. Include as Authorization: Bearer robe_...

Path Parameters

id
string<uuid>
required

OTP ID returned from send

Response

OTP details

id
string<uuid>
required
workspace_id
string<uuid>
required
phone_number
string
required
country_code
string
required

ISO 3166-1 alpha-2 country code

credit_cost
integer
required
status
enum<string>
required

The OTP's state. There is no delivered value: a carrier receipt is reported through delivered_at, a delivered hop in timeline, and the otp.delivered webhook, while status stays where it was (normally sent).

Available options:
pending,
sent,
verified,
expired,
failed
code_length
integer
required
ttl_seconds
integer
required
attempt_count
integer
required

Verification attempts made so far

max_attempts
integer
required

Attempt budget before the OTP is burned

Example:

5

expired_at
string<date-time>
required

When the code stops being verifiable

created_at
string<date-time>
required
sent_at
string<date-time>
delivered_at
string<date-time>

When the first delivery receipt arrived, from the carrier for the SMS leg or from WhatsApp for a WhatsApp leg. Absent until then, and absent for good on routes that send no receipt. This, not status, is how a polled OTP shows delivery.

verified_at
string<date-time>
failed_at
string<date-time>

When the OTP was marked failed. Absent otherwise.

failure_reason
string

Reason token behind a failed status. See TimelineItem.

metadata
object
channel
enum<string>

Channel(s) this OTP was sent on. Codes from before WhatsApp OTP read sms.

Available options:
sms,
whatsapp,
both
whatsapp_status
enum<string>

The WhatsApp leg's own state. Present only when channel is whatsapp or both. Unlike status, this field does take delivered.

Available options:
pending,
sent,
delivered,
failed
timeline
object[]

Hops the OTP took, oldest first.