Channel Manager
Inspect Channel Manager's messaging, voice, and setup HTTP contracts using operation blocks rendered from its separate public OpenAPI schema.
Channel Manager has its own API host and its own credential model: scoped OAuth2 tokens issued for a setup. Use the host assigned to your deployment and request only the scopes the operation requires. The public schema linked here is the US contract. Its availability does not establish enrollment or deployment in another region.
Use this page to look up a request or response. For a task, start with one of these guides:
Launch an SMS Outreach Campaign when your sender is approved and a number is assigned.
Integrate Channel Manager Through the API for access, setup, registration, and the SMS, email, iMessage, WhatsApp, and voice workflows.
Measure an SMS outreach campaign for response rate, time to first response, and opt-out rate.
The operation blocks below render the canonical request and response contracts. The health probe is excluded from this customer reference.
List emails matching the request filters. At least one of use_case_id or setup_id is required so the query stays on a leading index. Other filters (to_address, created_after, created_before, state) narrow within that scope. Sort via repeated sort_by query params; each entry is +field or -field (allowed field: created_at). Default: -created_at. Cursor opaque — round-trip continuation_token unchanged with the same sort_by.
Filter by inbound or outbound direction.
Filter to this email use case. At least one of use_case_id or setup_id is required.
Filter to emails sent from this SES setup. At least one of use_case_id or setup_id is required.
Filter to emails delivered to one or more recipient addresses (set semantics: any match).
[]Filter to emails that are replies to this specific outbound/inbound.
Inclusive lower bound on created_at.
Exclusive upper bound on created_at.
Sort axes, applied left-to-right. +field ascending, -field
descending. Defaults to [("created_at", -1)] (newest first).
[]The maximum number of emails to return.
50Opaque continuation token from a prior response. Treat as a black box — the server decodes it.
Successful Response
Whether there are more emails to retrieve.
Opaque token to pass back on the next page request. Null when there are no more results.
Query parameter failed validation, neither use_case_id nor setup_id was supplied, or continuation_token is unparseable.
GET /v1/email?setup_id=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"items": [
{
"direction": "text",
"id": "123e4567-e89b-12d3-a456-426614174000",
"ses_use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"setup_id": "123e4567-e89b-12d3-a456-426614174000",
"from_address": "text",
"to_address": "text",
"subject": "text",
"state": "sent",
"created_at": "2026-01-01T00:00:00.000Z",
"has_attachment": true,
"replied_to_inbound_email_id": "123e4567-e89b-12d3-a456-426614174000",
"open_count": 1,
"click_count": 1
}
],
"has_more": true,
"continuation_token": null
}Send one email through SES, from an inline HTML body or a stored template.
raw_html mode needs subject and body_html; template mode needs template_id and template_parameters covering every declared variable. Unsubscribe links are injected by the send path, never the caller. The use case's setup must be DNS-verified.
Requires the email:send OAuth2 scope on the target setup.
[]Successful Response
Identifier of the sent email.
When the email was sent.
Attachment filenames in send order.
Received email this message replies to, if any.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this use case.
Use case not found, or has no live SES binding.
Recipient is on the per-use-case or per-setup unsubscribe list.
Body or any attachment exceeds the size limit (5 MiB per attachment).
Body or attachment failed validation: invalid HTML template, invalid filename, empty attachment, more than 5 attachments, SES rejected the message, or reply_to_inbound_email_id does not reference an inbound email under the same use case + setup.
POST /v1/email/ HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 310
{
"use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"to_address": "name@gmail.com",
"mode": "template",
"template_parameters": "text",
"template_id": "123e4567-e89b-12d3-a456-426614174000",
"subject": "text",
"body_html": "text",
"attachments": [
"text"
],
"reply_to_inbound_email_id": "123e4567-e89b-12d3-a456-426614174000"
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2026-01-01T00:00:00.000Z",
"attachment_filenames": [
"text"
],
"replied_to_inbound_email_id": "123e4567-e89b-12d3-a456-426614174000"
}List SES events matching the request filters. At least one of use_case_id or setup_id is required so the underlying emails join lands on a leading index. Other filters (email_id, event_type, event_at_after, event_at_before) narrow within that scope. Sort via repeated sort_by query params; each entry is +field or -field (allowed field: event_at). Default: -event_at. Cursor opaque — round-trip continuation_token unchanged with the same sort_by.
Filter to events for emails sent through this use case.
Filter to events for emails sent from this SES setup.
Narrow to one or more emails' event timelines (set semantics: any match).
[]Inclusive lower bound on event_at.
Exclusive upper bound on event_at.
Sort axes applied left-to-right; +field/-field. Default -event_at (newest first).
[]The maximum number of events to return.
50Opaque continuation token from a prior response; treat as a black box.
Successful Response
Whether there are more events to retrieve.
Opaque token to pass back on the next page request; null when no more results.
Query parameter failed validation, neither use_case_id nor setup_id was supplied, or continuation_token is unparseable.
GET /v1/email/event?setup_id=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"email_id": "123e4567-e89b-12d3-a456-426614174000",
"event_type": "Reject",
"event_at": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z"
}
],
"has_more": true,
"continuation_token": null
}List a SES use case's email templates, summary fields only.
Requires the email:template:read OAuth2 scope on the target setup.
Successful Response
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this use case.
SES use case not found, or soft-deleted.
Validation Error
GET /v1/email/template?ses_use_case_id=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"email_templates": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"ses_use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}
]
}Create a reusable subject/body Jinja template owned by a SES use case.
Requires the email:template:write OAuth2 scope on the target setup.
Email use case that owns this template.
Name unique within the email use case.
^[A-Za-z0-9 _-]+$Optional description of the template's purpose.
Jinja template for the email subject.
Jinja template for the email body.
Successful Response
Identifier of the template.
Name of the template.
Optional description of the template's purpose.
Email use case that owns this template.
Jinja template for the email subject.
Jinja template for the email body.
Variables the caller must provide for the subject.
Variables the caller must provide for the body.
When the template was created.
When the template was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this use case.
SES use case not found, or soft-deleted.
Template name already exists within the SES use case.
Subject or body template failed validation: Jinja syntax error, subject references unsubscribe variables, or body's unsubscribe-variable usage does not match the use case's unsubscribable flag.
POST /v1/email/template HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 142
{
"ses_use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"subject_template": "text",
"body_template": "text"
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"ses_use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"subject_template": "text",
"body_template": "text",
"required_subject_variables": [
"text"
],
"required_body_variables": [
"text"
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Delete an email template.
Requires the email:template:write scope on its setup.
Successful Response
No content
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Email template not found.
Validation Error
DELETE /v1/email/template/{email_template_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Fetch one email template, including its declared subject and body variables.
Requires the email:template:read OAuth2 scope on the target setup.
Successful Response
Identifier of the template.
Name of the template.
Optional description of the template's purpose.
Email use case that owns this template.
Jinja template for the email subject.
Jinja template for the email body.
Variables the caller must provide for the subject.
Variables the caller must provide for the body.
When the template was created.
When the template was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Email template not found.
Validation Error
GET /v1/email/template/{email_template_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"ses_use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"subject_template": "text",
"body_template": "text",
"required_subject_variables": [
"text"
],
"required_body_variables": [
"text"
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Patch an email template's name, description, or subject/body.
Requires the email:template:write OAuth2 scope on the target setup.
Replacement name when provided.
^[A-Za-z0-9 _-]+$Replacement description; null clears it.
Replacement Jinja subject template.
Replacement Jinja body template.
Successful Response
Identifier of the template.
Name of the template.
Optional description of the template's purpose.
Email use case that owns this template.
Jinja template for the email subject.
Jinja template for the email body.
Variables the caller must provide for the subject.
Variables the caller must provide for the body.
When the template was created.
When the template was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Email template not found.
New template name already exists within the SES use case.
No fields provided, or subject/body template failed validation: Jinja syntax error, subject references unsubscribe variables, or body's unsubscribe-variable usage does not match the use case's unsubscribable flag.
PUT /v1/email/template/{email_template_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 85
{
"name": "text",
"description": "text",
"subject_template": "text",
"body_template": "text"
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"ses_use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"subject_template": "text",
"body_template": "text",
"required_subject_variables": [
"text"
],
"required_body_variables": [
"text"
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Render the unsubscribe confirmation page.
Verifies the token but writes nothing — the form POSTs back to record the unsubscribe, so a scanner pre-fetching the link can't opt anyone out. 403 on a forged token.
Confirmation form (HTML). GET never mutates.
Token failed parse or HMAC verification.
Validation Error
GET /v1/email/unsubscribe/{token} HTTP/1.1
Accept: */*
No content
Record an unsubscribe from the RFC 8058 one-click handshake or the confirmation form.
Idempotent: repeat clicks collapse to one row. A tombstoned target is a silent success page, not an error. Returns 403 on a forged token before any lookup.
Unsubscribe recorded (or silently skipped for tombstoned target).
Token failed parse or HMAC verification.
Validation Error
POST /v1/email/unsubscribe/{token} HTTP/1.1
Accept: */*
No content
Fetch one email by id, inbound or outbound.
Requires the email:read OAuth2 scope on the target setup.
Successful Response
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Email not found.
Validation Error
GET /v1/email/{email_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"direction": "text",
"id": "123e4567-e89b-12d3-a456-426614174000",
"ses_use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"setup_id": "123e4567-e89b-12d3-a456-426614174000",
"from_address": "text",
"to_address": "text",
"subject": "text",
"received_at": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z",
"in_reply_to_email_id": "123e4567-e89b-12d3-a456-426614174000",
"attachment_filenames": [
"text"
],
"body_kind": "html"
}Redirect to a presigned URL for one email attachment.
The filename must be listed on the row, so a caller can't sign a URL for an arbitrary key under the email's S3 prefix. 404 if the email or filename is unknown.
Requires the email:read OAuth2 scope on the target setup.
Successful Response
Redirect to a short-lived S3 presigned URL for the attachment.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Email not found, or attachment with this filename does not exist on the email.
Validation Error
GET /v1/email/{email_id}/attachment/{filename} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Return an inbound or outbound email's body.
The response is HTML or plain text, according to the email's body format.
Requires the email:read OAuth2 scope on the target setup.
Successful Response
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Email not found.
Validation Error
GET /v1/email/{email_id}/body HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Redirect to a download URL for an inbound email's original MIME message.
Outbound emails return 404. Requires the email:read scope on the setup.
Successful Response
Redirect to a short-lived S3 presigned URL for the raw MIME bundle.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
No inbound email with this id (outbound emails retain no raw bundle).
Validation Error
GET /v1/email/{email_id}/raw HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
List inbound + outbound iMessages, interleaved chronologically. At least one of use_case_id, peer_number, or our_number is required so the query stays on a leading index per leg. Optional direction=inbound|outbound prunes one leg. Sort via repeated sort_by query params; each entry is +field or -field (allowed field: occurred_at, the UNION-projected column that maps to sent_at on outbound and received_at on inbound). Default: -occurred_at. Cursor opaque — round-trip continuation_token unchanged with the same sort_by.
SendBlue setup whose messages are listed.
Filter to one top-level use case.
E.164 peer; matches inbound from_number and outbound to_number.
E.164 line of ours; matches inbound to_number and outbound from_number.
Restrict to one direction. None returns both, interleaved.
Sort axes applied left-to-right; +occurred_at / -occurred_at. Default -occurred_at.
[]Maximum number of messages to return per page.
50Opaque continuation token from a prior response; the server decodes it.
Successful Response
Whether another page of messages is available.
Opaque token to pass back on the next page request. Null when there are no more results.
Query parameter failed validation, none of use_case_id / peer_number / our_number was supplied, or continuation_token is unparseable.
GET /v1/imessage?setup_id=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"from_number": "text",
"to_number": "text",
"content": "text",
"has_media": true,
"service": "iMessage",
"occurred_at": "2026-01-01T00:00:00.000Z",
"direction": "inbound"
}
],
"has_more": true,
"continuation_token": null
}Send text or one media attachment through an iMessage use case.
Before the recipient replies, send at most six text-only messages per line,
each up to 300 characters and without links or contact details. Opted-out
recipients cannot be messaged. Requires the imessage:send scope on the setup.
""Successful Response
A sent iMessage with its delivery outcome.
Message identifier.
Use case associated with the message.
Sender's E.164 phone number.
Recipient's E.164 phone number.
Text content. Empty string for media-only messages.
Whether the message has media available at GET /v1/imessage/{id}/media.
Messaging service used, if known.
When sending was requested or the inbound message was received.
Message direction; always outbound.
outboundWhen the provider reported the message sent or delivered, if available.
When delivery failure was reported, if any.
Provider's failure description, if any.
Whether the message was sent as SMS instead, if known.
When the provider sent the message, if available.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this use case.
Use case not found, or has no live SendBlue binding.
media file exceeds the 20 MiB limit.
Body / media failed validation: empty content + no media, invalid filename, empty media file, no live SendBlue lines available, a SendBlue before-the-first-reply limit (message count, length, media, or a link / phone number / email address), or SendBlue rejected the send.
POST /v1/imessage/ HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 101
{
"use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"to_number": "text",
"content": "",
"media": "text"
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"from_number": "text",
"to_number": "text",
"content": "text",
"has_media": true,
"service": "iMessage",
"occurred_at": "2026-01-01T00:00:00.000Z",
"direction": "outbound",
"delivered_at": "2026-01-01T00:00:00.000Z",
"errored_at": "2026-01-01T00:00:00.000Z",
"error_message": "text",
"was_downgraded": true,
"sent_at": "2026-01-01T00:00:00.000Z"
}Fetch one iMessage by id, inbound or outbound.
Requires the imessage:read OAuth2 scope on the target setup.
Successful Response
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
iMessage not found in either the inbound or outbound table.
Validation Error
GET /v1/imessage/{message_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"from_number": "text",
"to_number": "text",
"content": "text",
"has_media": true,
"service": "iMessage",
"occurred_at": "2026-01-01T00:00:00.000Z",
"direction": "inbound"
}Redirect to a download URL for an iMessage attachment.
Return 404 when the message has no attachment. Requires the imessage:read scope on the setup.
Successful Response
Redirect to a short-lived (5-minute) S3 presigned URL for the media artifact.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
iMessage not found, or the row exists but carries no media artifact.
Validation Error
GET /v1/imessage/{message_id}/media HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Create an OAuth2 client and return its ID and secret.
The secret is shown only in this response. Requires the clients:admin scope.
Display name for the client.
^[A-Za-z0-9 _-]+$Human-readable purpose of the client.
Scopes the client may request; wildcard patterns are allowed.
Setup IDs the client may access, or * for all setups.
Successful Response
Identifier to use when requesting tokens.
The raw secret — returned ONCE here and never again. Store it now.
Display name of the client.
Human-readable purpose of the client.
Scopes the client may request.
Setup IDs the client may access, or * for all setups.
One or more allowed_setup_ids do not exist.
Request body failed validation (name pattern, or empty scopes/setups).
POST /v1/oauth/client HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 123
{
"name": "text",
"description": "text",
"granted_scopes": [
"text"
],
"allowed_setup_ids": [
"123e4567-e89b-12d3-a456-426614174000"
]
}{
"client_id": "123e4567-e89b-12d3-a456-426614174000",
"client_secret": "text",
"name": "text",
"description": "text",
"granted_scopes": [
"text"
],
"allowed_setup_ids": [
"text"
]
}Revoke an OAuth2 client (tombstone for audit); it can no longer obtain tokens.
Requires the clients:admin OAuth2 scope (resource-less; exact-name grant only — not matched by a wildcard scope).
Successful Response
No content
OAuth2 client not found (already revoked, or never existed).
Validation Error
DELETE /v1/oauth/client/{client_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Patch an OAuth2 client's grants. The secret is never changed here — rotate it instead.
Requires the clients:admin OAuth2 scope (resource-less; exact-name grant only — not matched by a wildcard scope).
New display name when provided.
^[A-Za-z0-9 _-]+$New human-readable purpose when provided.
Replacement scopes; wildcard patterns are allowed.
Replacement setup IDs, or * for all setups.
Successful Response
Identifier of the updated client.
Display name of the client.
Human-readable purpose of the client.
Scopes the client may request.
Setup IDs the client may access, or * for all setups.
OAuth2 client not found, or an allowed_setup_id does not exist.
No fields supplied, or a field failed validation.
PUT /v1/oauth/client/{client_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 123
{
"name": "text",
"description": "text",
"granted_scopes": [
"text"
],
"allowed_setup_ids": [
"123e4567-e89b-12d3-a456-426614174000"
]
}{
"client_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"granted_scopes": [
"text"
],
"allowed_setup_ids": [
"text"
]
}Replace an OAuth2 client's secret and return the replacement once.
The previous secret stops working immediately. Requires the clients:admin scope.
Successful Response
The new raw secret — returned ONCE here and never again. Store it now.
OAuth2 client not found.
Validation Error
POST /v1/oauth/client/{client_id}/rotate-secret HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"client_secret": "text"
}Exchange client credentials for a 1-hour access token (client_credentials grant).
Authenticate via HTTP Basic or client credentials in the form body. The token includes only scopes granted to the client; no refresh token is issued.
OAuth2 grant type; must be client_credentials.
Space-delimited requested scopes (RFC 6749 §3.3); down-scoped to the grant.
Client identifier when authenticating through form fields.
Client secret when authenticating through form fields.
Successful Response
Bearer token for authenticated API requests.
Token scheme; always bearer.
Number of seconds until the token expires.
Space-delimited scopes granted to this token.
Missing client credentials.
Invalid client credentials.
Malformed token request (e.g. unsupported grant_type).
POST /v1/oauth/token HTTP/1.1
Authorization: Basic username:password
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 78
"grant_type='text'&scope='text'&client_id='text'&client_secret='text'"{
"access_token": "text",
"token_type": "text",
"expires_in": 1,
"scope": "text"
}Pick a random From number from an outbound-voice use case's pool.
Requires the outbound-voice:send OAuth2 scope on the target setup.
Top-level use case to pick a sender for; must be outbound_voice.
Successful Response
Identifier of this phone number.
Twilio setup that owns this phone number.
Voice and SMS use cases assigned to this number; empty when unassigned.
E.164 phone number.
ISO 3166-1 alpha-2 country code.
Phone number type — local, mobile, toll-free, or national.
When this phone number was created.
Missing, expired, or invalid bearer token.
Token lacks outbound-voice:send scope / access to this setup.
Use case not found (or not bound to outbound_voice), or has no assigned phone numbers.
Validation Error
POST /v1/outbound-voice/phone-number/select HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 54
{
"use_case_id": "123e4567-e89b-12d3-a456-426614174000"
}{
"id": "text",
"setup_id": "text",
"use_case_ids": [
"text"
],
"phone_number": "text",
"country": "text",
"number_type": "local",
"capabilities": [
"voice"
],
"created_at": "2026-01-01T00:00:00.000Z"
}Create a SendBlue subaccount with one synchronously-assigned line and register webhooks.
503 when SendBlue has no area-code inventory: it would leak an unusable subaccount that has no teardown API.
Requires the sendblue-setup:create OAuth2 scope (resource-less — satisfied only by a first-party "*" setup grant).
Request body for POST /v1/sendblue-setup.
Operator-facing label for this subaccount.
Name passed to SendBlue when creating the child account. SendBlue
auto-prefixes the parent-account email at creation time, so the value
we read back on subaccount_company_name is <parent-email>-<name>.
Successful Response
A SendBlue subaccount setup.
Identifier of this SendBlue setup.
Operator-facing label.
When this SendBlue setup was created.
When this SendBlue setup was last changed.
Validation Error
SendBlue parent-account auth failed, SendBlue upstream error, or AWS Secrets Manager failure.
SendBlue has no available line inventory to assign; retry later.
POST /v1/sendblue-setup HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 46
{
"friendly_name": "text",
"company_name": "text"
}{
"id": "text",
"friendly_name": "text",
"phone_numbers": [
{
"id": "text",
"phone_number": "text",
"blocked_at": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Fetch one SendBlue setup with its sendable (unblocked) lines.
Requires the sendblue-setup:read OAuth2 scope on the target setup.
Successful Response
A SendBlue subaccount setup.
Identifier of this SendBlue setup.
Operator-facing label.
When this SendBlue setup was created.
When this SendBlue setup was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
SendBlue setup not found.
Validation Error
GET /v1/sendblue-setup/{setup_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"friendly_name": "text",
"phone_numbers": [
{
"id": "text",
"phone_number": "text",
"blocked_at": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}List a SendBlue setup's phone lines, including blocked lines.
Optionally filter by status. Requires the sendblue-phone-number:read scope on the setup.
Successful Response
Every line under the setup matching the requested status filter.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
SendBlue setup not found.
Validation Error
GET /v1/sendblue-setup/{setup_id}/phone-number HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"items": [
{
"id": "text",
"phone_number": "text",
"blocked_at": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}
]
}Unassign a SendBlue line from an iMessage use case.
Requires the sendblue-phone-number:write OAuth2 scope on the target setup.
Successful Response
No content
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Setup, phone number, iMessage use case, or assignment not found.
Phone number or binding belongs to a different SendBlue setup.
DELETE /v1/sendblue-setup/{setup_id}/phone-number/{phone_number_id}/use-case/{use_case_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Assign a SendBlue line to an iMessage use case.
A line serves at most one use case. 404 if the use case has no SendBlue binding or belongs to a different setup.
Requires the sendblue-phone-number:write OAuth2 scope on the target setup.
Successful Response
No content
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Setup, phone number, or iMessage use case not found.
Phone number is blocked, or already assigned to this use case.
Phone number or binding belongs to a different SendBlue setup.
PUT /v1/sendblue-setup/{setup_id}/phone-number/{phone_number_id}/use-case/{use_case_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Create a SES setup: tenant, domain identity, and custom MAIL FROM.
The customer publishes the returned DNS records, then refreshes verification via GET. 409 on a domain that already has a setup.
Requires the ses-setup:create OAuth2 scope (resource-less — satisfied only by a first-party "*" setup grant).
SES tenant name, unique within the AWS account.
^[A-Za-z0-9_-]+$Domain for sending and receiving; normalized to lowercase IDNA.
Successful Response
Response for POST /v1/ses-setup and GET /v1/ses-setup/{id}. On a tombstoned
setup deleted_at is set and dns_records[].verified reflects the last cached
state, not live SES.
Identifier of this SES setup.
Email domain configured for this setup.
Wall-clock time of the last refresh, or null if never checked.
When this SES setup was created.
When this SES setup was last changed.
When the setup was deleted, if applicable; DNS results are then last-known values.
SES tenant or email identity with this name already exists.
Request body failed validation (tenant_name pattern, or domain_identity is not a valid domain name).
POST /v1/ses-setup HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 47
{
"tenant_name": "text",
"domain_identity": "text"
}{
"id": "text",
"domain_identity": "text",
"dns_checked_at": "2026-01-01T00:00:00.000Z",
"dns_records": [
{
"address": "text",
"record": "text",
"type": "CNAME",
"verified": true
}
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"deleted_at": "2026-01-01T00:00:00.000Z"
}Delete an SES setup and its email domain configuration.
Active use cases must be deleted first. Requires the ses-setup:write scope on the setup.
Successful Response
No content
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
SES setup not found (already deleted, or never existed).
Live use cases still reference this setup; delete them first.
Validation Error
DELETE /v1/ses-setup/{setup_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Fetch a SES setup with a live DNS refresh that self-heals a FAILED DKIM / MAIL FROM axis (see module docstring). Tombstoned setups return cached state.
Requires the ses-setup:read OAuth2 scope on the target setup.
Successful Response
Response for POST /v1/ses-setup and GET /v1/ses-setup/{id}. On a tombstoned
setup deleted_at is set and dns_records[].verified reflects the last cached
state, not live SES.
Identifier of this SES setup.
Email domain configured for this setup.
Wall-clock time of the last refresh, or null if never checked.
When this SES setup was created.
When this SES setup was last changed.
When the setup was deleted, if applicable; DNS results are then last-known values.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
SES setup not found.
Validation Error
GET /v1/ses-setup/{setup_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"domain_identity": "text",
"dns_checked_at": "2026-01-01T00:00:00.000Z",
"dns_records": [
{
"address": "text",
"record": "text",
"type": "CNAME",
"verified": true
}
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"deleted_at": "2026-01-01T00:00:00.000Z"
}List inbound + outbound SMS messages, interleaved chronologically. At least one of use_case_id or peer_phone_number is required so the query stays on a leading index per leg. Optional direction=inbound|outbound prunes one leg. Sort via repeated sort_by query params; each entry is +field or -field (allowed field: created_at). Default: -created_at. Cursor opaque — round-trip continuation_token unchanged with the same sort_by.
Twilio setup whose messages are listed.
Restrict results to one SMS use case.
Filter by inbound or outbound direction.
Filter by recipient on outbound or sender on inbound messages.
Filter to MMS when true or text-only SMS when false.
Exclusive upper bound on message creation time.
Inclusive lower bound on message creation time.
Sort axes, applied left-to-right. +field ascending, -field
descending. Defaults to [("created_at", -1)] (newest first).
[]The maximum number of SMS messages to return.
50Opaque continuation token from a prior response. Treat as a black box — the server decodes it.
Successful Response
Whether another page of results is available.
Opaque token for the next page, or null when complete.
Query parameter failed validation, neither use_case_id nor peer_phone_number was supplied, or continuation_token is unparseable.
GET /v1/sms?setup_id=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"items": [
{
"direction": "outbound",
"id": "123e4567-e89b-12d3-a456-426614174000",
"use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"from_number": "text",
"to_number": "text",
"body": "text",
"num_segments": 1,
"status": "pending",
"num_attachments": 1,
"handed_off_at": "2026-01-01T00:00:00.000Z",
"delivered_at": "2026-01-01T00:00:00.000Z",
"errored_at": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}
],
"has_more": true,
"continuation_token": null
}Send an SMS or MMS from one of the use case's numbers.
A2P and toll-free senders only reach recipients who've opted in, and never anyone who's opted out.
Requires the sms:send OAuth2 scope on the target setup.
[]Successful Response
Identifier of the sent message.
SMS use case used to send this message.
Sender number, once the sending line is known.
Recipient phone number.
Text content, or null for a media-only MMS.
Number of segments the message was split into; null until the message is sent.
Current delivery status.
Names of the message's MMS attachments.
When the message was handed off to the carrier, if it has been.
When delivery was confirmed, if available.
When a send or delivery failure was reported, if any.
When this SMS or MMS message was created.
When this SMS or MMS message was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this use case.
SMS use case not found.
Request rejected: no phone number assigned, no verified A2P campaign for a US long-code sender pool, no recorded opt-in for a US/CA toll-free or US long-code sender pool, message content does not match the registered use case, invalid recipient, recipient opted out, destination region not permitted, or A2P brand suspended.
POST /v1/sms/ HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 125
{
"use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"to_phone_number": "text",
"message": "text",
"media_attachments": [
"text"
]
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"from_number": "text",
"to_number": "text",
"body": "text",
"num_segments": 1,
"status": "pending",
"attachment_names": [
"text"
],
"handed_off_at": "2026-01-01T00:00:00.000Z",
"delivered_at": "2026-01-01T00:00:00.000Z",
"errored_at": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Send the registered consent message and record the recipient's opt-in.
Requires a verified A2P campaign or approved toll-free verification. Repeated
sends to the same recipient have no additional effect; an active opt-out blocks
the send. Requires the sms:consent:write scope on the setup.
SMS use case whose consent message is sent.
Recipient's E.164 phone number.
Successful Response
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this use case.
SMS use case not found.
The recipient has a live setup-wide opt-out (a prior STOP); an opt-in cannot reverse it.
Neither a verified A2P campaign nor an approved US/CA toll-free verification backs the SMS use case, or Twilio rejected the destination (invalid / landline / opted out / region not permitted / brand suspended).
POST /v1/sms/opt-in HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 79
{
"use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"to_phone_number": "text"
}No content
List setup-wide SMS opt-outs (STOP records) for the setup given by the required setup_id query parameter. Live rows only by default; pass include_deleted=true for the cleared/audit history. Optional user_phone_number exact-match filter. Sort via repeated sort_by query params; each entry is +field or -field (allowed field: created_at). Default: -created_at. Cursor opaque — round-trip continuation_token unchanged with the same sort_by.
Twilio setup whose opt-outs are listed.
Optional exact-match filter — the opted-out recipient's E.164 number.
Include cleared (soft-deleted) opt-outs. Default False → live rows only.
falseSort axes, applied left-to-right. +field ascending, -field
descending. Defaults to [("created_at", -1)] (newest first).
[]The maximum number of opt-outs to return.
50Opaque continuation token from a prior response. Treat as a black box — the server decodes it.
Successful Response
Whether another page of results is available.
Opaque token for the next page, or null when complete.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
A query parameter failed validation, or continuation_token is unparseable.
GET /v1/sms/opt-out?setup_id=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"setup_id": "123e4567-e89b-12d3-a456-426614174000",
"phone_number": "text",
"opted_out_use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"opted_out_message_id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2026-01-01T00:00:00.000Z",
"deleted_at": "2026-01-01T00:00:00.000Z",
"delete_reason": "text"
}
],
"has_more": true,
"continuation_token": null
}Redirect to a presigned URL for the public MMS media Twilio fetches.
Unauthenticated: attachment_id is an unguessable capability hash, so there's no DB lookup and a forged id resolves to a 404 at S3. The public copy is ephemeral.
Successful Response
Redirect to a short-lived S3 presigned URL for the public media object.
Validation Error
GET /v1/sms/public/{attachment_id} HTTP/1.1
Accept: */*
No content
Operator-clear a setup-wide SMS opt-out, recording the reason for audit.
The only way to re-enable sending after a STOP. 409 while a live toll-free opt-out for the recipient remains: route them through START/UNSTOP first.
Requires the sms:consent:write OAuth2 scope on the target setup.
Twilio setup whose opt-out is cleared.
Opted-out recipient's E.164 phone number.
Required, non-empty: this is the audit record of why the STOP was reversed.
Opt-out cleared; the recipient can be sent to again on this setup.
No content
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
No live setup-wide opt-out exists for this setup and phone number.
A live toll-free opt-out exists for this recipient under the setup; clear it via a recipient-initiated START/UNSTOP first.
Validation Error
POST /v1/sms/remove-setup-opt-out HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 94
{
"setup_id": "123e4567-e89b-12d3-a456-426614174000",
"user_phone_number": "text",
"reason": "text"
}No content
Fetch one SMS or MMS by id, inbound or outbound.
Requires the sms:read OAuth2 scope on the target setup.
Successful Response
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
SMS message not found in either the inbound or outbound table.
Validation Error
GET /v1/sms/{message_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"direction": "outbound",
"id": "123e4567-e89b-12d3-a456-426614174000",
"use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"from_number": "text",
"to_number": "text",
"body": "text",
"num_segments": 1,
"status": "pending",
"attachment_names": [
"text"
],
"handed_off_at": "2026-01-01T00:00:00.000Z",
"delivered_at": "2026-01-01T00:00:00.000Z",
"errored_at": "2026-01-01T00:00:00.000Z",
"error_message": "text",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Redirect to a presigned URL for one MMS attachment, the retained private copy.
The name must be listed on the row, so a caller can't sign a URL for an arbitrary key. 404 if the message or name is unknown.
Requires the sms:read OAuth2 scope on the target setup.
Successful Response
Redirect to a short-lived S3 presigned URL for the attachment.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
SMS message not found, or no attachment with this name on the message.
Validation Error
GET /v1/sms/{sms_id}/attachment/{attachment_name} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Create a Twilio setup: subaccount, customer profile, and Trust Hub entities, then submit for review.
All-or-nothing; a failure unwinds every Twilio resource. STIR/CNAM/regulatory bundles come later, once the profile is approved.
Requires the twilio-setup:create OAuth2 scope (resource-less — satisfied only by a first-party "*" setup grant).
Request body for POST /v1/twilio-setup.
Human label for this setup.
Legal business name as registered.
Legal structure of the business.
Industry vertical for Twilio Trust Hub classification.
Relationship to Twilio (direct customer or ISV/reseller).
direct_customerPossible values: Type of registration ID (e.g. EIN, DUNS, VAT).
Registration number matching the identifier type.
Geographic region where the business operates.
Business website URL.
Successful Response
Response for a single Twilio setup. Returned by create, get, update, and list.
Identifier of this Twilio setup.
Human-readable label for this Twilio setup.
When this Twilio setup was created.
When this Twilio setup was last changed.
Twilio's pre-submission evaluation returned noncompliant for the supplied business info.
POST /v1/twilio-setup HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 573
{
"friendly_name": "text",
"business_name": "text",
"business_type": "Sole Proprietorship",
"business_industry": "AGRICULTURE",
"business_identity": "direct_customer",
"business_registration_identifier": "EIN",
"business_registration_number": "text",
"business_regions_of_operation": "AFRICA",
"website_url": "text",
"business_address": {
"street": "text",
"city": "text",
"region": "text",
"postal_code": "text",
"iso_country": "text"
},
"authorized_representative": {
"first_name": "text",
"last_name": "text",
"email": "name@gmail.com",
"phone_number": "text",
"business_title": "text",
"job_position": "Director"
}
}{
"id": "text",
"friendly_name": "text",
"customer_profile": {
"status": "pending-review",
"last_failure": [
"text"
]
},
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Fetch a Twilio setup's current review status from the database (advanced by webhooks).
Requires the twilio-setup:read OAuth2 scope on the target setup.
Successful Response
Response for a single Twilio setup. Returned by create, get, update, and list.
Identifier of this Twilio setup.
Human-readable label for this Twilio setup.
When this Twilio setup was created.
When this Twilio setup was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Twilio setup not found.
Validation Error
GET /v1/twilio-setup/{setup_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"friendly_name": "text",
"customer_profile": {
"status": "pending-review",
"last_failure": [
"text"
]
},
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Update a rejected Twilio business profile and submit it again for review.
Profiles in other states return 409. Invalid business information returns 422. Requires the twilio-setup:write scope on the setup.
Request body for PUT /v1/twilio-setup/{id}.
Legal business name as registered.
Legal structure of the business.
Industry vertical for Twilio Trust Hub classification.
Relationship to Twilio (direct customer or ISV/reseller).
direct_customerPossible values: Type of registration ID (e.g. EIN, DUNS, VAT).
Registration number matching the identifier type.
Geographic region where the business operates.
Business website URL.
Successful Response
Response for a single Twilio setup. Returned by create, get, update, and list.
Identifier of this Twilio setup.
Human-readable label for this Twilio setup.
When this Twilio setup was created.
When this Twilio setup was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Twilio setup not found.
Customer profile is not in TWILIO_REJECTED status — Trust Hub bundles cannot be edited while approved or under review.
Twilio's pre-submission evaluation returned noncompliant for the supplied business info / authorized rep / address. Failure details on customer_profile_last_failure (also returned in the response body).
PUT /v1/twilio-setup/{setup_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 550
{
"business_name": "text",
"business_type": "Sole Proprietorship",
"business_industry": "AGRICULTURE",
"business_identity": "direct_customer",
"business_registration_identifier": "EIN",
"business_registration_number": "text",
"business_regions_of_operation": "AFRICA",
"website_url": "text",
"business_address": {
"street": "text",
"city": "text",
"region": "text",
"postal_code": "text",
"iso_country": "text"
},
"authorized_representative": {
"first_name": "text",
"last_name": "text",
"email": "name@gmail.com",
"phone_number": "text",
"business_title": "text",
"job_position": "Director"
}
}{
"id": "text",
"friendly_name": "text",
"customer_profile": {
"status": "pending-review",
"last_failure": [
"text"
]
},
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}List a setup's Trust Hub and regulatory bundles.
Filter by bundle kind or by country and number type; these filters cannot be
combined. The response includes only bundle categories the caller may read.
Requires at least one of the
compliance:voice:read, compliance:sms:read, or
compliance:regulatory:read scopes on the setup.
Client-facing classification of a Twilio setup bundle, surfaced in place of the raw Twilio policy SID (a vendor identifier). Mirrors the read-scope split in list_twilio_setup_bundles: shaken_stir + cnam are voice, a2p_messaging_profile is sms, everything else is a Regulatory Compliance regulation.
^\w{2}$Successful Response
Bundles matching the filter, with status + last_failure; empty when none created yet.
Twilio setup not found.
Mutually exclusive query params (policy_sid alongside iso_country/number_type) or only one of (iso_country, number_type) supplied.
GET /v1/twilio-setup/{setup_id}/bundle HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"items": [
{
"id": "text",
"setup_id": "text",
"bundle_kind": "shaken_stir",
"status": "pending-review",
"entities": [
{
"entity_kind": "end_user",
"entity_type": "text",
"attributes": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"last_failure": [
"text"
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}
]
}Read a setup's A2P 10DLC brand registration state. 404 if none.
A verified brand with an SMS use case also returns its available campaign categories.
Requires the compliance:sms:read OAuth2 scope on the target setup.
Successful Response
The status and available campaign categories of an A2P brand registration.
Twilio setup whose business is registered.
A2P brand category selected for registration.
Identity vetting outcome.
SEC / sanctions vetting outcome; always skipped for low-volume-standard brands.
Number of brand resubmissions; Twilio permits at most three.
When this A2P brand registration was created.
When this A2P brand registration was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Twilio setup or A2P brand registration not found.
Validation Error
GET /v1/twilio-setup/{setup_id}/bundle/a2p-brand-registration HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"setup_id": "text",
"brand_type": "standard",
"primary_vetting_status": "pending",
"secondary_vetting_status": "pending",
"primary_vetting_errors": [
{
"registrationerrorcode": 1,
"registrationerrordescription": "text"
}
],
"secondary_vetting_errors": [
{
"registrationerrorcode": 1,
"registrationerrordescription": "text"
}
],
"resubmit_count": 1,
"allowed_campaign_usecases": [
{
"code": "text",
"name": "text",
"description": "text",
"post_approval_required": true
}
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Create or resubmit a setup's A2P 10DLC brand registration.
First call creates; a call against an unverified brand resubmits (Twilio caps resubmits at 3). Needs an approved customer profile and an A2P Messaging Profile bundle. 409 in any other brand state.
Requires the compliance:sms:write OAuth2 scope on the target setup.
Request body for POST /v1/twilio-setup/{id}/bundle/a2p-brand-registration.
Standard or Low-Volume Standard. Non-profit / government brands MUST be Standard (LVS → 422 here despite Twilio's silent acceptance).
Successful Response
The status and available campaign categories of an A2P brand registration.
Twilio setup whose business is registered.
A2P brand category selected for registration.
Identity vetting outcome.
SEC / sanctions vetting outcome; always skipped for low-volume-standard brands.
Number of brand resubmissions; Twilio permits at most three.
When this A2P brand registration was created.
When this A2P brand registration was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Twilio setup not found.
Customer profile not approved, A2P Messaging Profile bundle missing, or existing brand row is in a non-resubmittable state.
Tier mismatch (LVS for non-profit / government), brand_type change attempted on resubmit, resubmit limit exceeded, or Twilio rejected the create / update with an actionable 400.
POST /v1/twilio-setup/{setup_id}/bundle/a2p-brand-registration HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 25
{
"brand_type": "standard"
}{
"setup_id": "text",
"brand_type": "standard",
"primary_vetting_status": "pending",
"secondary_vetting_status": "pending",
"primary_vetting_errors": [
{
"registrationerrorcode": 1,
"registrationerrordescription": "text"
}
],
"secondary_vetting_errors": [
{
"registrationerrorcode": 1,
"registrationerrordescription": "text"
}
],
"resubmit_count": 1,
"allowed_campaign_usecases": [
{
"code": "text",
"name": "text",
"description": "text",
"post_approval_required": true
}
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Create or resubmit the A2P Messaging Profile bundle, the Trust Hub prerequisite for brand registration.
First call creates; a rejected bundle resubmits after a content change. Approved or in-review bundles are locked (409). Standard tier only.
Requires the compliance:sms:write OAuth2 scope on the target setup.
Request body for POST /v1/twilio-setup/{id}/bundle/a2p-messaging-profile.
Legal structure of the brand.
Required when company_type == 'public', omitted otherwise. Bad values surface as a noncompliant evaluation, not a validation error.
Required when company_type == 'public'; must be omitted otherwise.
Email TCR uses for brand correspondence.
Successful Response
Single Trust Hub trust product / regulatory bundle attached to a setup.
Identifier of this bundle.
Twilio setup that owns this bundle.
Which kind of bundle this is (shaken_stir, cnam, a2p_messaging_profile, or regulatory), derived from the underlying Twilio policy.
Current verification status.
Human-readable failure strings from the latest noncompliant eval or webhook rejection. NULL when healthy.
When this bundle was created.
When this bundle was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Twilio setup not found.
Customer profile is not approved, bundle is in a non-rejected state (approved / in-review / pending-review), or the supplied attributes match the stored values (nothing to change).
Twilio's pre-submission evaluation returned noncompliant for the supplied messaging-profile attributes.
POST /v1/twilio-setup/{setup_id}/bundle/a2p-messaging-profile HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 111
{
"company_type": "private",
"stock_exchange": "text",
"stock_ticker": "text",
"brand_contact_email": "name@gmail.com"
}{
"id": "text",
"setup_id": "text",
"bundle_kind": "shaken_stir",
"status": "pending-review",
"entities": [
{
"entity_kind": "end_user",
"entity_type": "text",
"attributes": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"last_failure": [
"text"
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Create or resubmit the CNAM caller-ID-name bundle for US/CA outbound calls.
First call creates; a rejected bundle resubmits with a new display name. Approved or in-review bundles are locked (409).
Requires the compliance:voice:write OAuth2 scope on the target setup.
Request body for POST /v1/twilio-setup/{id}/bundle/cnam.
Caller ID name shown on the recipient's device (max 15 chars).
Successful Response
Single Trust Hub trust product / regulatory bundle attached to a setup.
Identifier of this bundle.
Twilio setup that owns this bundle.
Which kind of bundle this is (shaken_stir, cnam, a2p_messaging_profile, or regulatory), derived from the underlying Twilio policy.
Current verification status.
Human-readable failure strings from the latest noncompliant eval or webhook rejection. NULL when healthy.
When this bundle was created.
When this bundle was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Twilio setup not found.
Customer profile is not approved, bundle is in a non-rejected state (approved / in-review / pending-review), or the supplied display_name matches the stored value (nothing to change).
Twilio's pre-submission evaluation returned noncompliant for the supplied display_name.
POST /v1/twilio-setup/{setup_id}/bundle/cnam HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 23
{
"display_name": "text"
}{
"id": "text",
"setup_id": "text",
"bundle_kind": "shaken_stir",
"status": "pending-review",
"entities": [
{
"entity_kind": "end_user",
"entity_type": "text",
"attributes": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"last_failure": [
"text"
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Submit or resubmit a regulatory bundle for Twilio review.
Requires an approved business profile. Provide the required business details
and one JPEG, PNG, or PDF file per document (up to 5 MiB each). Only rejected
bundles can be resubmitted.
Requires the compliance:regulatory:write scope on the setup.
^\w{2}$[]Successful Response
Single Trust Hub trust product / regulatory bundle attached to a setup.
Identifier of this bundle.
Twilio setup that owns this bundle.
Which kind of bundle this is (shaken_stir, cnam, a2p_messaging_profile, or regulatory), derived from the underlying Twilio policy.
Current verification status.
Human-readable failure strings from the latest noncompliant eval or webhook rejection. NULL when healthy.
When this bundle was created.
When this bundle was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Twilio setup not found, no regulation for this country and number type, or it has no end_user or supporting_document requirements (no bundle to submit).
Customer profile is not approved, or a bundle for this regulation exists in a non-rejected state (pending-review / in-review / twilio-approved).
A file exceeds 5 MiB.
A file's Content-Type is not JPEG/PNG/PDF.
Invalid end_users / supporting_documents JSON, file count mismatch, invalid address sub-shape, or Twilio's pre-submission evaluation returned noncompliant.
POST /v1/twilio-setup/{setup_id}/bundle/regulatory HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 110
{
"iso_country": "text",
"number_type": "local",
"end_users": "text",
"supporting_documents": "text",
"files": [
"text"
]
}{
"id": "text",
"setup_id": "text",
"bundle_kind": "shaken_stir",
"status": "pending-review",
"entities": [
{
"entity_kind": "end_user",
"entity_type": "text",
"attributes": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"last_failure": [
"text"
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Submit the SHAKEN/STIR bundle for a setup, once.
No resubmit path: once a bundle row exists this 409s. Fix a rejected bundle by updating the customer profile, which re-triggers Twilio review.
Requires the compliance:voice:write OAuth2 scope on the target setup.
Successful Response
Single Trust Hub trust product / regulatory bundle attached to a setup.
Identifier of this bundle.
Twilio setup that owns this bundle.
Which kind of bundle this is (shaken_stir, cnam, a2p_messaging_profile, or regulatory), derived from the underlying Twilio policy.
Current verification status.
Human-readable failure strings from the latest noncompliant eval or webhook rejection. NULL when healthy.
When this bundle was created.
When this bundle was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Twilio setup not found.
Customer profile is not approved, or a SHAKEN/STIR bundle already exists. Bundle is not editable post-creation; fix rejections via the customer profile.
Twilio's pre-submission evaluation returned noncompliant for the customer profile.
POST /v1/twilio-setup/{setup_id}/bundle/shaken-stir HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"setup_id": "text",
"bundle_kind": "shaken_stir",
"status": "pending-review",
"entities": [
{
"entity_kind": "end_user",
"entity_type": "text",
"attributes": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"last_failure": [
"text"
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}List a setup's provisioned phone numbers, optionally filtered by country or use case.
Pass use_case_id="unassigned" for numbers with no assignment.
Requires the twilio-phone-number:read OAuth2 scope on the target setup.
Filter by ISO 3166-1 alpha-2 country code
^\w{2}$Filter by top-level use case UUID, or the literal "unassigned" for numbers with no assignments.
Successful Response
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Twilio setup not found.
Validation Error
GET /v1/twilio-setup/{setup_id}/phone-number HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"items": [
{
"id": "text",
"setup_id": "text",
"use_case_ids": [
"text"
],
"phone_number": "text",
"country": "text",
"number_type": "local",
"capabilities": [
"voice"
],
"created_at": "2026-01-01T00:00:00.000Z"
}
]
}Purchase a phone number for a Twilio setup.
Required compliance bundles must be approved. An address-requirement mismatch
returns 422. Requires the twilio-phone-number:write scope on the setup.
E.164 phone number to purchase.
ISO 3166-1 alpha-2. Drives Trust Hub gating and the Regulatory Compliance lookup.
^\w{2}$Phone number type. national reuses the .local subresource with a
prefix filter (see NATIONAL_PREFIXES).
Successful Response
Identifier of this phone number.
Twilio setup that owns this phone number.
Voice and SMS use cases assigned to this number; empty when unassigned.
E.164 phone number.
ISO 3166-1 alpha-2 country code.
Phone number type — local, mobile, toll-free, or national.
When this phone number was created.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Twilio setup not found.
Phone number is already owned, the customer profile is not approved, or required Trust Hub / regulatory bundles are missing or unapproved.
Body country / number_type does not match the setup, or the chosen number's address requirements do not match the setup.
POST /v1/twilio-setup/{setup_id}/phone-number HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 62
{
"phone_number": "text",
"country": "text",
"number_type": "local"
}{
"id": "text",
"setup_id": "text",
"use_case_ids": [
"text"
],
"phone_number": "text",
"country": "text",
"number_type": "local",
"capabilities": [
"voice"
],
"created_at": "2026-01-01T00:00:00.000Z"
}Search Twilio for purchasable phone numbers of a country and type.
Results are narrowed to numbers the setup can actually provision given its address. area_code applies only to local numbers (422 otherwise).
Requires the twilio-phone-number:read OAuth2 scope on the target setup.
ISO 3166-1 alpha-2 country code.
^\w{2}$Phone number type: local, mobile, toll-free, or national.
Area code filter. Only valid when number_type='local' (NANP concept).
Maximum results to return
10Successful Response
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Twilio setup not found.
Customer profile is not approved.
Query parameter failed validation (e.g. area_code on a non-local number_type).
GET /v1/twilio-setup/{setup_id}/phone-number/available?country=text&number_type=local HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"items": [
{
"phone_number": "text",
"friendly_name": "text",
"locality": "text",
"region": "text",
"postal_code": "text",
"iso_country": "text"
}
]
}Release a phone number from a Twilio setup.
Unassign it from all use cases first. A toll-free verification under review also blocks release.
Requires the twilio-phone-number:write OAuth2 scope on the target setup.
Successful Response
No content
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Twilio setup or phone number not found under the setup.
Phone number still has use-case assignments; unassign them first.
Validation Error
DELETE /v1/twilio-setup/{setup_id}/phone-number/{phone_number_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Read a phone number's toll-free verification state. 404 if none.
Requires the compliance:sms:read OAuth2 scope on the target setup.
Successful Response
Toll-Free Verification attached to a phone number.
Toll-free number being verified.
Current verification status; approved is terminal.
Business name submitted for verification.
Business website submitted for verification.
Legal structure of the business.
Business registration number; NULL only for SOLE_PROPRIETOR.
Issuing authority; NULL for SOLE_PROPRIETOR.
ISO 3166-1 alpha-2 country of registration; NULL for SOLE_PROPRIETOR.
Summary of how the toll-free number will be used.
Example message submitted for review.
Uploaded opt-in proof image filenames; public URLs are derived server-side and not exposed here.
Method recipients use to consent to messages.
SMS sent to confirm a recipient's opt-in.
Expected monthly messaging volume.
Additional information supplied to the reviewer, if any.
Business's privacy policy URL.
Business's terms and conditions URL.
Whether the campaign carries age-gated content.
Whether a rejected verification can be edited before resubmission; null otherwise.
When this toll-free verification was created.
When this toll-free verification was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Twilio setup, phone number, or verification not found.
Validation Error
GET /v1/twilio-setup/{setup_id}/phone-number/{phone_number_id}/tollfree-verification HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"phone_number_id": "text",
"status": "pending-review",
"business_name": "text",
"business_website": "text",
"business_type": "PRIVATE_PROFIT",
"business_registration_number": "text",
"business_registration_authority": "EIN",
"business_registration_country": "text",
"use_case_categories": [
"TWO_FACTOR_AUTHENTICATION"
],
"use_case_summary": "text",
"production_message_sample": "text",
"opt_in_proof_filenames": [
"text"
],
"opt_in_type": "VERBAL",
"opt_in_confirmation_message": "text",
"message_volume": "10",
"additional_information": "text",
"privacy_policy_url": "text",
"terms_and_conditions_url": "text",
"age_gated_content": true,
"rejection_reasons": [
{
"code": 1,
"description": "text"
}
],
"edit_allowed": true,
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Submit or resubmit verification for a US or Canadian toll-free number.
Provide opt-in proof images. Only a rejected verification can be
resubmitted; one already under review returns 409. Requires the
compliance:sms:write scope on the setup.
[]^\w{2}$Successful Response
Toll-Free Verification attached to a phone number.
Toll-free number being verified.
Current verification status; approved is terminal.
Business name submitted for verification.
Business website submitted for verification.
Legal structure of the business.
Business registration number; NULL only for SOLE_PROPRIETOR.
Issuing authority; NULL for SOLE_PROPRIETOR.
ISO 3166-1 alpha-2 country of registration; NULL for SOLE_PROPRIETOR.
Summary of how the toll-free number will be used.
Example message submitted for review.
Uploaded opt-in proof image filenames; public URLs are derived server-side and not exposed here.
Method recipients use to consent to messages.
SMS sent to confirm a recipient's opt-in.
Expected monthly messaging volume.
Additional information supplied to the reviewer, if any.
Business's privacy policy URL.
Business's terms and conditions URL.
Whether the campaign carries age-gated content.
Whether a rejected verification can be edited before resubmission; null otherwise.
When this toll-free verification was created.
When this toll-free verification was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Twilio setup or phone number not found.
Verification is in a non-rejected state (pending-review / in-review / twilio-approved).
An opt-in proof file exceeds 5 MiB.
An opt-in proof file's Content-Type is not JPEG/PNG.
Phone number is not US or CA toll-free, or invalid form input.
POST /v1/twilio-setup/{setup_id}/phone-number/{phone_number_id}/tollfree-verification HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 589
{
"business_name": "text",
"business_website": "https://example.com",
"use_case_categories": [
"TWO_FACTOR_AUTHENTICATION"
],
"use_case_summary": "text",
"production_message_sample": "text",
"opt_in_type": "VERBAL",
"opt_in_confirmation_message": "text",
"message_volume": "10",
"business_type": "PRIVATE_PROFIT",
"terms_and_conditions_url": "https://example.com",
"privacy_policy_url": "https://example.com",
"age_gated_content": true,
"opt_in_proof_files": [
"text"
],
"additional_information": "text",
"business_registration_number": "text",
"business_registration_authority": "EIN",
"business_registration_country": "text"
}{
"phone_number_id": "text",
"status": "pending-review",
"business_name": "text",
"business_website": "text",
"business_type": "PRIVATE_PROFIT",
"business_registration_number": "text",
"business_registration_authority": "EIN",
"business_registration_country": "text",
"use_case_categories": [
"TWO_FACTOR_AUTHENTICATION"
],
"use_case_summary": "text",
"production_message_sample": "text",
"opt_in_proof_filenames": [
"text"
],
"opt_in_type": "VERBAL",
"opt_in_confirmation_message": "text",
"message_volume": "10",
"additional_information": "text",
"privacy_policy_url": "text",
"terms_and_conditions_url": "text",
"age_gated_content": true,
"rejection_reasons": [
{
"code": 1,
"description": "text"
}
],
"edit_allowed": true,
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Stream an uploaded opt-in proof image. Unauthenticated — Twilio's TFV reviewer fetches it.
Streams the bytes directly rather than redirecting, so the URL stays valid across a multi-day review window. 404 for any key the verification didn't write.
The opt-in proof image bytes, streamed from S3 with stored Content-Type.
Setup or phone number not found, or no opt-in proof with this filename exists.
Validation Error
GET /v1/twilio-setup/{setup_id}/phone-number/{phone_number_id}/tollfree-verification/opt-in-proof/{filename} HTTP/1.1
Accept: */*
No content
Unassign a phone number from a use case.
Inbound-voice unassignment clears the number's voice_url and fallback. SMS unassignment detaches it from the Messaging Service pool.
Requires the twilio-phone-number:write OAuth2 scope on the target setup.
Successful Response
No content
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Setup, phone number, use case, or assignment not found.
Validation Error
DELETE /v1/twilio-setup/{setup_id}/phone-number/{phone_number_id}/use-case/{use_case_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Assign a phone number to a use case (idempotent).
Inbound-voice assignment rewrites the number's voice_url and fallback. SMS assignment adds the number to the Messaging Service pool, gated by TFV approval (US/CA toll-free) or a verified A2P campaign (US long-code).
Requires the twilio-phone-number:write OAuth2 scope on the target setup.
Successful Response
No content
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Setup, phone number, or use case not found; or use case has no Twilio binding bound to this setup.
Phone number is already assigned to another use case on this channel, or required Trust Hub bundles are missing.
Use case channel is not Twilio-served, or input failed validation.
PUT /v1/twilio-setup/{setup_id}/phone-number/{phone_number_id}/use-case/{use_case_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Return the business and document requirements for buying a phone number.
Select a country and number type. A combination with no requirements returns 404.
Requires the compliance:regulatory:read scope on the setup.
^\w{2}$Successful Response
Twilio regulation + full requirements; walk requirements to assemble the
POST /bundle/regulatory payload.
Display name of the regulation.
Country where the number can be purchased.
Type of phone number covered by the regulation.
Always "business".
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Twilio setup not found, no regulation matches the (iso_country, number_type) tuple, or the regulation has no end_user or supporting_document requirements (no bundle needed).
Validation Error
GET /v1/twilio-setup/{setup_id}/regulation?iso_country=text&number_type=local HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"friendly_name": "text",
"iso_country": "text",
"number_type": "local",
"end_user_type": "text",
"requirements": {
"end_user": [
{
"name": "text",
"type": "text",
"requirement_name": "text",
"detailed_fields": [
{
"machine_name": "text",
"friendly_name": "text",
"description": "text",
"value_type": "String"
}
]
}
],
"supporting_document": [
{
"name": "text",
"type": "text",
"requirement_name": "text",
"description": "text",
"accepted_documents": [
{
"name": "text",
"type": "text",
"detailed_fields": [
{
"machine_name": "text",
"friendly_name": "text",
"description": "text",
"value_type": "String"
}
]
}
]
}
]
}
}Check a Twilio webhook signature for this setup.
Return valid: true or valid: false for the supplied URL, parameters, and signature. Requires the twilio-setup:verify-webhook scope on the setup.
The exact URL Twilio signed, byte-for-byte — a mismatch fails validation.
The inbound request's X-Twilio-Signature header value.
Successful Response
Whether signature is valid for this setup's subaccount auth token.
Missing, expired, or invalid bearer token.
Token lacks twilio-setup:verify-webhook scope / access to this setup.
Twilio setup not found.
Validation Error
POST /v1/twilio-setup/{setup_id}/verify-webhook HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 86
{
"callback_url": "text",
"params": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"signature": "text"
}{
"valid": true
}List use cases for a setup.
Filter by entity, channel, or deletion state. Requires the use-case:read scope on the setup.
Filter to use cases bound to this setup.
Filter to use cases belonging to this entity.
Filter by channel.
Include soft-deleted use cases (audit trail). Defaults to live only.
falseSuccessful Response
Query parameter failed validation.
GET /v1/use-case?setup_id=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"items": [
{
"id": "text",
"entity_name": "text",
"name": "text",
"description": "text",
"environment": "staging",
"region": "us-east-1",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"deleted_at": "2026-01-01T00:00:00.000Z",
"channel": "text",
"twilio_setup_id": "text",
"inbound_voice_url": "text",
"fallback_forwarding_number": "text",
"webhook_url": "text",
"allowed_forwarding_numbers": [
"text"
],
"hold_music_enabled": true,
"phone_numbers": [
"text"
]
}
]
}Create a use case on a setup; the channel selects the body variant.
Mints the channel's backing resource: a Messaging Service for SMS, a SES
configuration set for email. Voice needs none — channel-manager renders the
media leg from the setup's shared TwiML App. Email requires a DNS-verified
SES setup. Requires the use-case:write OAuth2 scope on the target setup.
Successful Response
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
Twilio setup, SES setup, or SendBlue setup not found.
Customer profile not approved, SES setup DNS not verified, or (entity_name, name) / configuration set name / sender address already in use.
Request body failed validation (e.g. sender domain does not match the SES setup's domain identity, or marketing email_type without unsubscribable=true).
POST /v1/use-case HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 328
{
"entity_name": "text",
"name": "text",
"description": "text",
"environment": "staging",
"region": "us-east-1",
"channel": "text",
"twilio_setup_id": "123e4567-e89b-12d3-a456-426614174000",
"inbound_voice_url": "https://example.com",
"fallback_forwarding_number": "text",
"webhook_url": "https://example.com",
"allowed_forwarding_numbers": [
"text"
]
}{
"id": "text",
"entity_name": "text",
"name": "text",
"description": "text",
"environment": "staging",
"region": "us-east-1",
"created_at": "2026-01-01T00:00:00.000Z",
"channel": "text",
"twilio_setup_id": "text",
"inbound_voice_url": "text",
"fallback_forwarding_number": "text",
"webhook_url": "text",
"webhook_secret": "text",
"allowed_forwarding_numbers": [
"text"
]
}Soft-delete a use case and its channel binding, tearing down the backing vendor resource.
409 while phone numbers or lines are still assigned (unassign first), or while email templates still exist.
Requires the use-case:write OAuth2 scope on the target setup.
Successful Response
No content
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this use case.
Use case not found (already deleted, or never existed).
Twilio-served or iMessage use case still has phone numbers assigned. Unassign them before deleting.
Validation Error
DELETE /v1/use-case/{use_case_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Return an active use case with its channel-specific settings.
Deleted or unknown use cases return 404. Requires the use-case:read scope on the setup.
Successful Response
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this use case.
Use case not found (or soft-deleted).
Validation Error
GET /v1/use-case/{use_case_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"entity_name": "text",
"name": "text",
"description": "text",
"environment": "staging",
"region": "us-east-1",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"deleted_at": "2026-01-01T00:00:00.000Z",
"channel": "text",
"twilio_setup_id": "text",
"inbound_voice_url": "text",
"fallback_forwarding_number": "text",
"webhook_url": "text",
"allowed_forwarding_numbers": [
"text"
],
"hold_music_enabled": true,
"phone_numbers": [
"text"
]
}Update a use case's editable settings.
The request channel must match the existing use case. Changes to an inbound voice URL apply to its assigned numbers; a changed webhook URL returns a new signing secret once. Requires the use-case:write scope on the setup.
Successful Response
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this use case.
Use case not found (or soft-deleted).
Body channel does not match the use case's immutable channel.
Request body failed validation (no updatable field besides channel, description too long, invalid webhook_url, or sender_email_alias out of range).
PUT /v1/use-case/{use_case_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 191
{
"description": "text",
"channel": "text",
"inbound_voice_url": "https://example.com",
"fallback_forwarding_number": "text",
"webhook_url": "https://example.com",
"allowed_forwarding_numbers": [
"text"
]
}{
"id": "text",
"entity_name": "text",
"name": "text",
"description": "text",
"environment": "staging",
"region": "us-east-1",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"channel": "text",
"twilio_setup_id": "text",
"inbound_voice_url": "text",
"fallback_forwarding_number": "text",
"webhook_url": "text",
"webhook_secret": "text",
"allowed_forwarding_numbers": [
"text"
],
"hold_music_enabled": true
}Delete an SMS use case's A2P 10DLC campaign.
A campaign under review cannot be deleted; retry after review is complete.
Requires the compliance:sms:write OAuth2 scope on the target setup.
Campaign deleted.
No content
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this use case.
A2P campaign not found for this SMS use case.
Campaign is IN_PROGRESS and cannot be deleted.
Validation Error
DELETE /v1/use-case/{use_case_id}/a2p-campaign HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Read an SMS use case's A2P 10DLC campaign state. 404 if none.
Requires the compliance:sms:read OAuth2 scope on the target setup.
Successful Response
A2P 10DLC campaign details and review status.
SMS use case this campaign belongs to.
Twilio setup under which this campaign is registered.
TCR campaign use-case code (e.g. "MARKETING", "2FA").
Purpose and expected content of the campaign.
Examples of messages this campaign will send.
How recipients consent to receive campaign messages.
Whether campaign messages may contain URLs.
Whether campaign messages may contain phone numbers.
Whether campaign content is age restricted.
Whether the campaign promotes direct lending.
Confirmation message sent when a recipient opts in.
Keywords recipients may text to opt in.
Confirmation message sent when a recipient opts out.
Keywords recipients may text to opt out.
Reply sent when a recipient asks for help.
Keywords recipients may text to request help.
Privacy policy URL shown for the campaign.
Terms and conditions URL shown for the campaign.
Current campaign review or suspension status.
When this A2P campaign was created.
When this A2P campaign was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this use case.
A2P campaign not found for this SMS use case.
Validation Error
GET /v1/use-case/{use_case_id}/a2p-campaign HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"sms_use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"setup_id": "123e4567-e89b-12d3-a456-426614174000",
"us_app_to_person_usecase": "text",
"description": "text",
"message_samples": [
"text"
],
"message_flow": "text",
"has_embedded_links": true,
"has_embedded_phone": true,
"age_gated": true,
"direct_lending": true,
"opt_in_message": "text",
"opt_in_keywords": [
"text"
],
"opt_out_message": "text",
"opt_out_keywords": [
"text"
],
"help_message": "text",
"help_keywords": [
"text"
],
"privacy_policy_url": "text",
"terms_and_conditions_url": "text",
"status": "IN_PROGRESS",
"errors": [
{
"code": 1,
"description": "text"
}
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Create the A2P 10DLC campaign that gates long-code SMS for an SMS use case.
Needs a verified brand registration on the setup. 409 if a campaign already exists. 422 if the requested use-case code isn't allowed for the brand.
Requires the compliance:sms:write OAuth2 scope on the target setup.
Message content and consent details for a new A2P campaign.
Campaign use-case code allowed for this setup's verified brand.
Short description of what this SMS campaign does.
2-5 sample messages, each 20-1024 chars.
How consumers opt in to receive messages (40-2048 chars).
Whether campaign messages contain URLs.
Whether campaign messages contain phone numbers.
Whether the campaign requires age gating (e.g. federally legal but age-restricted content).
Whether the campaign supports direct lending offers.
Opt-in confirmation copy. Required unconditionally (Twilio treats it as optional): we send it as the FIRST message on the use case, before any other.
Keywords that trigger text-to-join opt-in (e.g. "START"). Empty when the campaign offers no keyword opt-in (e.g. consent collected via web/paper form).
Auto-reply confirmation sent when an end user opts out.
Keywords that trigger opt-out. MUST include the full CTIA set — "STOP", "STOPALL", "UNSUBSCRIBE", "CANCEL", "END", "QUIT".
Auto-reply sent when an end user asks for help.
Keywords that trigger help. MUST include "HELP" (CTIA requirement).
Public URL of the campaign's privacy policy.
Public URL of the campaign's terms & conditions.
Successful Response
A2P 10DLC campaign details and review status.
SMS use case this campaign belongs to.
Twilio setup under which this campaign is registered.
TCR campaign use-case code (e.g. "MARKETING", "2FA").
Purpose and expected content of the campaign.
Examples of messages this campaign will send.
How recipients consent to receive campaign messages.
Whether campaign messages may contain URLs.
Whether campaign messages may contain phone numbers.
Whether campaign content is age restricted.
Whether the campaign promotes direct lending.
Confirmation message sent when a recipient opts in.
Keywords recipients may text to opt in.
Confirmation message sent when a recipient opts out.
Keywords recipients may text to opt out.
Reply sent when a recipient asks for help.
Keywords recipients may text to request help.
Privacy policy URL shown for the campaign.
Terms and conditions URL shown for the campaign.
Current campaign review or suspension status.
When this A2P campaign was created.
When this A2P campaign was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this use case.
SMS use case not found.
A2P Messaging Profile bundle missing or not approved, brand registration missing or not in a vetted state, or a campaign already exists for this SMS use case.
us_app_to_person_usecase not in the brand's allowed set, missing CTIA-required STOP/HELP keywords, or Twilio rejected the create with an actionable 400.
POST /v1/use-case/{use_case_id}/a2p-campaign HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 439
{
"us_app_to_person_usecase": "text",
"description": "text",
"message_samples": [
"text"
],
"message_flow": "text",
"has_embedded_links": true,
"has_embedded_phone": true,
"age_gated": true,
"direct_lending": true,
"opt_in_message": "text",
"opt_in_keywords": [
"text"
],
"opt_out_message": "text",
"opt_out_keywords": [
"text"
],
"help_message": "text",
"help_keywords": [
"text"
],
"privacy_policy_url": "https://example.com",
"terms_and_conditions_url": "https://example.com"
}{
"sms_use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"setup_id": "123e4567-e89b-12d3-a456-426614174000",
"us_app_to_person_usecase": "text",
"description": "text",
"message_samples": [
"text"
],
"message_flow": "text",
"has_embedded_links": true,
"has_embedded_phone": true,
"age_gated": true,
"direct_lending": true,
"opt_in_message": "text",
"opt_in_keywords": [
"text"
],
"opt_out_message": "text",
"opt_out_keywords": [
"text"
],
"help_message": "text",
"help_keywords": [
"text"
],
"privacy_policy_url": "text",
"terms_and_conditions_url": "text",
"status": "IN_PROGRESS",
"errors": [
{
"code": 1,
"description": "text"
}
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Update an A2P campaign's message and consent information.
A failed campaign can be resubmitted when its rejection is remediable.
Campaigns under review return 409. Requires the compliance:sms:write scope on the setup.
Updatable subset of campaign fields. Twilio's update_async signature is fixed at these 7 fields — no other field is mutable post-create.
Purpose and expected content of the campaign.
How recipients consent to receive campaign messages.
Two to five examples of messages the campaign will send.
Whether campaign messages may contain URLs.
Whether campaign messages may contain phone numbers.
Whether campaign content is age restricted.
Whether the campaign promotes direct lending.
Successful Response
A2P 10DLC campaign details and review status.
SMS use case this campaign belongs to.
Twilio setup under which this campaign is registered.
TCR campaign use-case code (e.g. "MARKETING", "2FA").
Purpose and expected content of the campaign.
Examples of messages this campaign will send.
How recipients consent to receive campaign messages.
Whether campaign messages may contain URLs.
Whether campaign messages may contain phone numbers.
Whether campaign content is age restricted.
Whether the campaign promotes direct lending.
Confirmation message sent when a recipient opts in.
Keywords recipients may text to opt in.
Confirmation message sent when a recipient opts out.
Keywords recipients may text to opt out.
Reply sent when a recipient asks for help.
Keywords recipients may text to request help.
Privacy policy URL shown for the campaign.
Terms and conditions URL shown for the campaign.
Current campaign review or suspension status.
When this A2P campaign was created.
When this A2P campaign was last changed.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this use case.
A2P campaign not found for this SMS use case.
Campaign is IN_PROGRESS or SUSPENDED — not updatable in the current state.
Caller tried to change a boolean on a VERIFIED campaign, or the row's errors contain a non-remediable code.
PUT /v1/use-case/{use_case_id}/a2p-campaign HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 162
{
"description": "text",
"message_flow": "text",
"message_samples": [
"text"
],
"has_embedded_links": true,
"has_embedded_phone": true,
"age_gated": true,
"direct_lending": true
}{
"sms_use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"setup_id": "123e4567-e89b-12d3-a456-426614174000",
"us_app_to_person_usecase": "text",
"description": "text",
"message_samples": [
"text"
],
"message_flow": "text",
"has_embedded_links": true,
"has_embedded_phone": true,
"age_gated": true,
"direct_lending": true,
"opt_in_message": "text",
"opt_in_keywords": [
"text"
],
"opt_out_message": "text",
"opt_out_keywords": [
"text"
],
"help_message": "text",
"help_keywords": [
"text"
],
"privacy_policy_url": "text",
"terms_and_conditions_url": "text",
"status": "IN_PROGRESS",
"errors": [
{
"code": 1,
"description": "text"
}
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Clear a voice use case's hold music. 404 when it has none; 400 for non-voice use cases.
Requires the use-case:write OAuth2 scope on the target setup.
Successful Response
No content
Use case is not a voice channel.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this use case.
Use case not found (or soft-deleted), or it has no hold music.
Validation Error
DELETE /v1/use-case/{use_case_id}/hold-music HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Upload a voice use case's hold music (MP3 or WAV, 10 KiB to 5 MiB), replacing any earlier one.
400 for non-voice use cases.
Requires the use-case:write OAuth2 scope on the target setup.
Successful Response
No content
Use case is not a voice channel.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this use case.
Use case not found (or soft-deleted).
hold_music is not MP3 / WAV, or not 10 KiB to 5 MiB.
PUT /v1/use-case/{use_case_id}/hold-music HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 21
{
"hold_music": "text"
}No content
Rotate a messaging use case's webhook signing secret.
Return the new secret once; the old secret remains valid for 30 minutes.
Voice use cases are not supported. Requires the use-case:write scope on the setup.
Successful Response
The freshly-minted signing secret. Returned ONCE — never re-readable via the API; the caller stores it on its receiver to verify future signatures.
When the previous secret stops being accepted; until then the webhooks dual-sign both, so a receiver reconfigured before this still verifies.
Use case is a voice channel (no webhook secret).
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this use case.
Use case not found (or soft-deleted).
Validation Error
POST /v1/use-case/{use_case_id}/webhook-secret HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"webhook_secret": "text",
"old_secret_lasts_until": "2026-01-01T00:00:00.000Z"
}List calls for a setup, newest first, with optional filters and pagination.
Requires the voice:read scope on the setup.
Twilio setup whose calls are listed.
Restrict results to one voice use case.
Filter by inbound or outbound direction.
Filter by the other party's E.164 phone number.
Exclusive upper bound on call creation time.
Inclusive lower bound on call creation time.
Sort axes left-to-right; +field asc, -field desc. Default -created_at.
[]Maximum number of calls to return.
50Opaque cursor from a prior response; round-trip it, don't construct it.
Successful Response
Whether another page of results is available.
Opaque token for the next page, or null when complete.
Missing, expired, or invalid bearer token.
Token lacks voice:read scope / access to this setup.
Malformed sort_by, or unparseable continuation_token.
GET /v1/voice-call/?setup_id=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"items": [
{
"call_ref": "123e4567-e89b-12d3-a456-426614174000",
"use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"direction": "inbound",
"phone_number": "text",
"peer_number": "text",
"recording_available": true,
"created_at": "2026-01-01T00:00:00.000Z",
"started_at": "2026-01-01T00:00:00.000Z",
"ended_at": "2026-01-01T00:00:00.000Z"
}
],
"has_more": true,
"continuation_token": null
}Create a call for an outbound-voice use case and select its caller ID.
A repeated idempotency key returns the existing call. Requires the
voice:call scope on the setup.
Outbound-voice use case whose sender pool the call is placed from.
Retry-dedup key; a repeat returns the existing call rather than a second one.
Successful Response
Identifier used for subsequent call-control requests.
The From number selected from the use case's pool.
Missing, expired, or invalid bearer token.
Token lacks voice:call scope / access to this setup.
Use case not found (or not outbound_voice), or has no assigned phone numbers.
Validation Error
POST /v1/voice-call/ HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 79
{
"use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"idempotency_key": "text"
}{
"call_ref": "123e4567-e89b-12d3-a456-426614174000",
"phone_number": "text"
}End a voice call and disconnect its participants.
Requires the voice:call scope on the setup.
Successful Response
Missing, expired, or invalid bearer token.
Token lacks voice:call scope / access to this setup.
Call not found.
Validation Error
DELETE /v1/voice-call/{call_ref} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Return a call and its participants.
Requires the voice:read scope on the call's setup.
Successful Response
Identifier of the voice call.
Voice use case associated with this call.
Twilio setup that owns this call.
Direction of the voice call.
Phone number used by the voice use case.
Other party's phone number, if known.
Whether a call recording can be retrieved.
When this voice call was created.
When the call began, if started.
When the call ended, if ended.
Missing, expired, or invalid bearer token.
Token lacks voice:read scope / access to this setup.
Call not found.
Validation Error
GET /v1/voice-call/{call_ref} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"call_ref": "123e4567-e89b-12d3-a456-426614174000",
"use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"setup_id": "123e4567-e89b-12d3-a456-426614174000",
"direction": "inbound",
"phone_number": "text",
"peer_number": "text",
"recording_available": true,
"created_at": "2026-01-01T00:00:00.000Z",
"started_at": "2026-01-01T00:00:00.000Z",
"ended_at": "2026-01-01T00:00:00.000Z",
"participants": [
{
"participant_ref": "123e4567-e89b-12d3-a456-426614174000",
"kind": "inbound",
"role": "caller",
"to_phone_number": "text",
"dial_status": "answered",
"answered_by": "human",
"created_at": "2026-01-01T00:00:00.000Z",
"answered_at": "2026-01-01T00:00:00.000Z",
"joined_at": "2026-01-01T00:00:00.000Z",
"left_at": "2026-01-01T00:00:00.000Z"
}
]
}Add a dialed participant or media stream to a voice call.
An ended call returns 409. Requires the voice:call scope on the setup.
Successful Response
Identifier used to control this participant later.
Role assigned to the participant.
Missing, expired, or invalid bearer token.
Token lacks voice:call scope / access to this setup.
Call not found.
Call has already ended.
Twilio rejected the dial target, or an operator / transfer_target leg targets a number not in the use case's allowed_forwarding_numbers.
POST /v1/voice-call/{call_ref}/participant HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 103
{
"kind": "media",
"stream_url": "https://example.com",
"stream_context": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}{
"participant_ref": "123e4567-e89b-12d3-a456-426614174000",
"role": "caller"
}Remove a participant from a call; a participant already removed returns 204.
Requires the voice:call scope on the call's setup.
Successful Response
Missing, expired, or invalid bearer token.
Token lacks voice:call scope / access to this setup.
Call or participant not found.
Conference not yet known, or the participant already disconnected; retry.
Validation Error
DELETE /v1/voice-call/{call_ref}/participant/{participant_ref} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Change a participant's hold, mute, or end-call-on-exit setting.
Requires the voice:call scope on the call's setup.
Place the participant on hold or resume them.
Mute or unmute the participant.
Whether the conference ends when this participant leaves.
Successful Response
Missing, expired, or invalid bearer token.
Token lacks voice:call scope / access to this setup.
Call or participant not found.
Participant is not (or no longer) in the conference.
Validation Error
PUT /v1/voice-call/{call_ref}/participant/{participant_ref} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 51
{
"hold": true,
"muted": true,
"ends_call_on_exit": true
}No content
Stream a connected participant's inbound audio to a secure WebSocket URL.
A participant who has not joined or is already streaming returns 409. Requires the voice:call scope on the setup.
The wss:// endpoint Twilio forks this participant's inbound audio to.
Successful Response
Missing, expired, or invalid bearer token.
Token lacks voice:call scope / access to this setup.
Call or participant not found.
Participant not yet joined, already left, or a stream is already running.
Validation Error
POST /v1/voice-call/{call_ref}/participant/{participant_ref}/media-stream HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 88
{
"stream_url": "https://example.com",
"stream_context": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}No content
Redirect a connected call participant to another number or a farewell message.
Requires the voice:call scope on the setup.
Successful Response
Missing, expired, or invalid bearer token.
Token lacks voice:call scope / access to this setup.
Call or participant not found.
Participant is not (or no longer) connected.
Dial redirect target is not in the use case's allowed_forwarding_numbers.
POST /v1/voice-call/{call_ref}/participant/{participant_ref}/redirect HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 27
{
"kind": "dial",
"to": "text"
}No content
Register a business identity and return its Hosted Embedded Signup URL.
Requires the whatsapp-setup:create OAuth2 scope (action-only, resource "*" —
no setup exists yet, so only a first-party ["*"] grant passes).
Operator-facing label for this business identity. Never sent to Meta.
^[A-Za-z0-9_-]+$Customer's Meta business portfolio ID; only one active setup may use it.
^[0-9]+$Successful Response
Meta-hosted Embedded Signup URL to hand the customer. Static per environment — carries no per-setup token.
Identifier of the new WhatsApp setup.
Missing, expired, or invalid bearer token.
Token lacks the whatsapp-setup:create scope.
A live WhatsApp setup already exists for this Meta business portfolio.
friendly_name or meta_business_portfolio_id failed validation.
POST /v1/whatsapp-setup HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 60
{
"friendly_name": "text",
"meta_business_portfolio_id": "text"
}{
"whatsapp_embedded_signup_url": "text",
"whatsapp_setup_id": "123e4567-e89b-12d3-a456-426614174000"
}Delete a WhatsApp setup and stop receiving its account updates.
Delete active WhatsApp use cases first. Requires the whatsapp-setup:write scope on the setup.
Successful Response
No content
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
WhatsApp setup not found (already deleted, or never existed).
Validation Error
AWS Secrets Manager failure, or Meta Graph returned 5xx on the unsubscribe.
DELETE /v1/whatsapp-setup/{setup_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Return a WhatsApp setup's name and current setup details.
Requires the whatsapp-setup:read scope on the setup.
Successful Response
Identifier of the WhatsApp setup.
Display name of the setup.
When this WhatsApp setup was created.
When this WhatsApp setup was last changed.
Deletion time; null for an active setup.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
WhatsApp setup not found.
Validation Error
GET /v1/whatsapp-setup/{setup_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"friendly_name": "text",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"deleted_at": "2026-01-01T00:00:00.000Z"
}Send a WhatsApp message from a use case's number to a BSUID-addressed recipient.
Free-form only (no templates): the recipient must have messaged this use case
within 23 hours (one hour inside Meta's 24, so an accepted send can't die at the
window edge). Requires the whatsapp:send OAuth2 scope on the target setup.
Successful Response
Identifier for retrieving this message later.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
WhatsApp use case not found, or target message not found for this recipient.
Request failed validation, or the send was rejected: no inbound message from this recipient in the last 23 hours, Meta refused the media upload, the recipient cannot receive the message, Meta rejected a parameter, or a reaction removal targeted a message with no reaction.
POST /v1/whatsapp/ HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 170
"use_case_id='123e4567-e89b-12d3-a456-426614174000'&to_bsuid='text'&message_type='text'&message='text'&target_message_id='123e4567-e89b-12d3-a456-426614174000'"{
"message_id": "123e4567-e89b-12d3-a456-426614174000"
}Create a WhatsApp message template for the setup's business account.
Requires the whatsapp:template:write OAuth2 scope on the target setup.
WhatsApp setup that owns the template.
Template name using lowercase letters, digits, and underscores.
^[a-z_0-9]+$Language in which the template is written.
WhatsApp review category for the template.
Optional header definition supplied as JSON.
Sample file required for an image, video, or document header.
Template body text with any named parameter placeholders.
Names of every placeholder used in the body text.
[]Optional footer text without parameter placeholders.
Successful Response
Identifier to use when retrieving the template later.
Missing, expired, or invalid bearer token.
Token lacks the required scope or access to this setup.
WhatsApp setup not found, or soft-deleted.
A live template with this name and language already exists on the setup.
Request failed validation: header media missing, of an unsupported type, or oversized; header media supplied for a non-media header; or the header/body text placeholders do not match the declared parameter names.
POST /v1/whatsapp/template HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 228
"setup_id='123e4567-e89b-12d3-a456-426614174000'&name='text'&language='None'&category='marketing'&header='text'&header_sample_media='text'&body_text='text'&body_text_parameter_names=['text']&footer_text='text'"{
"template_id": "123e4567-e89b-12d3-a456-426614174000"
}Last updated
Was this helpful?

