curl --request POST \
--url https://api.pulsewave.dev/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channel": "email",
"to": "ada@example.com",
"from": "billing@notifications.acme.com",
"template_id": "tmpl_8f3e2a",
"template_data": {
"invoice_number": "INV-1042",
"amount_due": "$84.00"
}
}
'{
"id": "msg_3p2k9q",
"object": "message",
"channel": "email",
"status": "queued",
"to": "<string>",
"from": "<string>",
"subject": "<string>",
"template_id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request",
"code": "missing_required_field",
"message": "The 'to' field is required for channel 'email'",
"param": "to"
}
}{
"error": {
"type": "invalid_request",
"code": "missing_required_field",
"message": "The 'to' field is required for channel 'email'",
"param": "to"
}
}{
"error": {
"type": "invalid_request",
"code": "missing_required_field",
"message": "The 'to' field is required for channel 'email'",
"param": "to"
}
}{
"error": {
"type": "invalid_request",
"code": "missing_required_field",
"message": "The 'to' field is required for channel 'email'",
"param": "to"
}
}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.
curl --request POST \
--url https://api.pulsewave.dev/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channel": "email",
"to": "ada@example.com",
"from": "billing@notifications.acme.com",
"template_id": "tmpl_8f3e2a",
"template_data": {
"invoice_number": "INV-1042",
"amount_due": "$84.00"
}
}
'{
"id": "msg_3p2k9q",
"object": "message",
"channel": "email",
"status": "queued",
"to": "<string>",
"from": "<string>",
"subject": "<string>",
"template_id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request",
"code": "missing_required_field",
"message": "The 'to' field is required for channel 'email'",
"param": "to"
}
}{
"error": {
"type": "invalid_request",
"code": "missing_required_field",
"message": "The 'to' field is required for channel 'email'",
"param": "to"
}
}{
"error": {
"type": "invalid_request",
"code": "missing_required_field",
"message": "The 'to' field is required for channel 'email'",
"param": "to"
}
}{
"error": {
"type": "invalid_request",
"code": "missing_required_field",
"message": "The 'to' field is required for channel 'email'",
"param": "to"
}
}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
Show child attributes
Show child attributes
Response
Message accepted for delivery
"msg_3p2k9q"
message Delivery channel for a message
email, sms, push Show child attributes
Show child attributes