Skip to main content
GET
Get an SMS

Authorizations

Authorization
string
header
required

Your project API key, sent as Authorization: Bearer otp_live_.... Create keys on the API Keys page of the dashboard.

Path Parameters

sid
string
required

The SMS sid returned when you sent it.

Pattern: ^SM[a-fA-F0-9]{24}$
Example:

"SM6650c4b7c2d3e4f5a6b7c8d9"

Response

The SMS.

sid
string
required

Unique SMS ID.

Pattern: ^SM[a-f0-9]{24}$
Example:

"SM6650c4b7c2d3e4f5a6b7c8d9"

status
enum<string>
required

queued → processing → sent when the carrier accepts the message, or failed after retries. enqueue_failed means the message was saved but never queued.

Available options:
queued,
processing,
sent,
failed,
enqueue_failed
to
string
required

Destination phone number in international format. OTPBay normalizes it to E.164, so +1 (415) 555-2671 becomes +14155552671.

Example:

"+14155552671"

from
string | null
required

Sender ID the message was sent from.

Example:

"Acme"

body
string
required
Example:

"Your Acme order 1042 has shipped."

sms_segments
integer
required

Number of billed segments.

Example:

1

cost
string
required

Price of the message (per-segment price × segments).

Pattern: ^\d+\.\d{2}$
Example:

"0.04"

metadata
object
required

Your own key-value data, returned in responses and webhooks. At most 32 keys of 1–64 characters. Values are strings (up to 512 characters), numbers or booleans.

Example:
date_created
string<date-time>
required
processed_at
string<date-time> | null
required

When the carrier accepted the message.

last_error
string

Latest delivery error. Only present when there is one.