Send a message
Send a message across any channel. When channel is omitted or “auto”, the smart router selects the optimal channel.
Authorizations
Dashboard JWT token from Clerk
Headers
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
1 - 255Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
true, false Body
Recipient identifier (E.164 phone or email)
Message body text (required unless template_name or media_url is set). An empty string is treated the same as an omitted value.
Delivery channel — defaults to auto-routing when omitted
32Approved template to send instead of a freeform body (e.g. WhatsApp template name).
BCP-47 language code for the template (e.g. en_US).
Template substitution variables (Twilio-parity scalar map).
HTTPS URL of a media attachment (MMS / WhatsApp single-attachment). At least one of body, template_name, or media_url is required. An empty string is treated the same as an omitted value.
2048Sender identity: E.164 phone number, alphanumeric sender ID (1-11 characters), short code, or the platform sentinel __shared_generic__. Normalized and validated server-side. Defaults to the account sender when omitted.
64Per-send DLR callback URL (HTTPS, Twilio StatusCallback parity). Optional — an empty string is treated as 'no webhook'. Non-empty values must be https:// and pass the SSRF guard.
2048ISO 8601 datetime for scheduled delivery. Accepts a full ISO 8601 string (e.g. 2027-01-01T12:00:00Z) or a datetime-local value (e.g. 2027-01-01T12:00). Validated server-side; the message is persisted as scheduled until the target time.
Arbitrary key-value metadata (Twilio-parity scalar values), echoed back on delivery-status webhooks and message lookups.
ISO 3166-1 alpha-2 country hint (e.g. US). Disambiguates national-format recipient numbers and gates short-code validation.
2