Send a message
Sends a single message over email, SMS, or push. The request shape is the same for every channel; fields that don’t apply to the chosen channel are ignored.
Messages are queued for delivery immediately and return before delivery completes. Use the returned id to poll Retrieve a message or subscribe to a webhook endpoint for delivery events.
Authorizations
All requests must include Authorization: Bearer <api_key>. Keys are prefixed pw_live_ or pw_test_. See Authentication.
Headers
A unique key to safely retry this request without sending the message twice. See Idempotency.
Body
Delivery channel for a message
email, sms, push Recipient address. An email address for email, E.164 phone number for sms, or device token for push.
Sender address. For email this must be on a verified domain.
Email subject line. Required for email unless a template provides one.
Plain-text body. Required for sms and push, optional fallback for email.
HTML body for email.
A template to render instead of providing subject/text/html directly.
Variables substituted into the template
Arbitrary key-value pairs echoed back on the message and its events
Response
Message accepted for delivery
"msg_3p2k9q"
message Delivery channel for a message
email, sms, push