Zapier
Send email from a Zap and start Zaps from BillionSend events, with Webhooks by Zapier and no code.
Zapier reaches BillionSend through Webhooks by Zapier, in both directions: a Custom Request action sends an email through the REST API, and a Catch Hook trigger starts a Zap when BillionSend reports an event such as a bounce, a delivery or a received message.
Send an email from a Zap
Use a regular bs_ API key. Create one under API keys in the dashboard; an agent key is for the MCP server.
- Add an action to the Zap: choose Webhooks by Zapier, then the event Custom Request. Zapier’s POST event also works for simple bodies; Custom Request lets you type the whole JSON body, including arrays such as
to. - Fill in the step:
-
Method:
POST -
URL:
https://api.billionsend.com/emails -
Data: the JSON body, typed raw (Zapier sends it exactly as entered, so check that the syntax is valid):
{ "from": "Example <notifications@example.com>", "to": ["customer@example.org"], "subject": "Your order has shipped", "html": "<p>Your order is on its way.</p>" }Insert fields from earlier steps where the values go, such as the customer’s address in
to. -
Headers: add
Authorizationwith the valueBearer bs_...andContent-Typewith the valueapplication/json.
-
- Test the step. The response carries the email’s
id.
The from address must be on a verified domain. The request is POST /emails, so templates, scheduled_at and tags work here too. Add an Idempotency-Key header (1 to 256 characters) built from a field that stays the same when the Zap replays, such as the order id, so a replay does not send the email twice (see API basics).
Anyone who can edit the Zap can read the key in the Headers section. Create a key for the Zap alone, and revoke it when the Zap is deleted.
Start a Zap from an event
-
Add a trigger: choose Webhooks by Zapier, then Catch Hook. In the Test tab, copy the webhook URL.
-
Create the endpoint in BillionSend with that URL and the events you want:
curl -X POST "https://api.billionsend.com/webhooks" \ -H "Authorization: Bearer bs_..." \ -H "Content-Type: application/json" \ -d '{ "endpoint": "https://hooks.zapier.com/hooks/catch/123456/abcdef/", "events": ["email.bounced", "email.complained"] }'Or add it under Webhooks in the dashboard.
-
Trigger a test event (any event the endpoint listens for, such as sending an email), then click Test trigger in Zapier. Zapier separates each field of the event so later steps can use them: the event’s
typeandcreated_at, and the fields ofdata, such as the email’semail_id,toand, for a bounce,bounce.
BillionSend signs every delivery and Zapier’s Catch Hook does not check the signature, so treat the webhook URL as a secret: it is unguessable, but anyone who learns it can post to it. If an event decides something that moves money or data, send it to your own server and verify the signature there with the SDK’s verifyWebhook (see Webhooks); Catch Raw Hook passes the headers and the unparsed body along if you need them in the Zap.
A Zap that is turned off or deleted answers its URL with 404 after a delay of up to several hours. BillionSend retries a delivery that fails, and gives up after the last retry, so turn the endpoint off in BillionSend (or delete it) when you retire the Zap.