Send one or more messages

Sends a single message (returns 201) or a batch of up to 1000 messages (returns 202). Messages are enqueued for delivery. Workspaces whose sending is handled inline rather than queued accept at most 200 messages per batch and send them 10 at a time, so a full batch completes well inside the request budget; a larger batch on such a workspace is refused with 400 batch_too_large before anything is sent, and should be split. Each item may carry an idempotency_key so a retried batch can be regrouped freely: matching items replay their original id with deduplicated=true, conflicting items are rejected individually, and the response counts accepted and rejected items. Authenticating with a test API key (prefix beeptest) simulates the full send lifecycle without a provisioned number and without delivering or billing anything; reserved magic numbers select deterministic outcomes (see the Testing with test keys & magic numbers guide). Email: a message with channel "email" is sent as an email, one per request, and answers 201 with status sent, queued or suppressed. It answers 403 feature_not_enabled while email is not turned on for the organization, 400 when the workspace is not set up to send it (no sending address, a sending domain that is not verified, or, for marketing email, no postal address or verified web domain), 422 send_rejected when the email provider refused it, and 503 service_unavailable when it could not be handed to the email sender; in each of those cases nothing was sent.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
uuid

Workspace reply destination for inbound replies.

uri

Per-send override URL for delivery-status callbacks for this send only. Callbacks are still signed with the workspace status callback secret (set via PUT /api/v1/notification-settings), so they remain verifiable. Omit this field to use the workspace status callback URL, which applies to every send. Callbacks are unsigned only if no workspace secret is configured.

string

E.164 sending number to use for every message in this request. Must be an active phone number in your workspace (an unknown number returns 400). A toll-free number can be used once its toll-free verification is approved; a number still pending or rejected returns 400. Omit to use the workspace default sender, which never resolves to an unverified toll-free number. The resolved number is returned as phone_number_id on each ack.

messages
array
required
length between 1 and 1000

One to 1000 texts to send, or exactly one email. A request cannot mix texts and email. An email request takes only messages and status_callback.

messages*
Headers
uuid
required
string
length between 1 and 255

Optional workspace-scoped retry key. Repeating an identical request returns the original message IDs without sending again; reusing it with a different payload returns 409. Keys expire after 24 hours.

Responses

Language
Credentials
Bearer
API Key
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json