Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Bearer token via Authorization header

Headers

idempotency-key
string

Idempotency-Key: 1-255 printable ASCII characters. Same key with a different request body is a 422 idempotency_key_reused. A retryable in-flight duplicate is a 409 with Retry-After and x-should-retry: true; a terminal duplicate is a 409 with x-should-retry: false. A replay returns the current resource state with Idempotent-Replayed: true.

Required string length: 1 - 255
Pattern: ^[\x21-\x7E]{1,255}$
Example:

"b3f6a9f0-6f1a-4e9a-9e7a-9c9b6b6a5a3f"

Path Parameters

id
string<uuid>
required
Example:

"550e8400-e29b-41d4-a716-446655440000"

Body

application/json
body
string
required

SMS body text, up to 1600 characters (longer bodies are rejected with 400). A number's own limit may be lower and is answered 422 body_too_long.

Required string length: 1 - 1600
to
string
required

Recipient phone number, as E.164 or a US 10/11-digit number. Destinations the number cannot send to are rejected with 422 unsupported_destination, non-numbers with 422 invalid_recipient.

Required string length: 1 - 32
Example:

"+15551230001"

deliveryReport
boolean
default:false
deprecated

Deprecated: best effort and ignored on most lines. Hosted SIM numbers return no carrier delivery report, so their messages end at sent and no sms.send.delivered event follows. Defaults to false.

Response

Outbound message queued

data
object
required