# Connect Zapier to SendBeam

How to connect Zapier to SendBeam: what you need, the setup steps, and the code.

Via API

SendBeam's Zapier app gives a Zap an instant trigger for every SendBeam event, plus actions and searches for contacts, lists, tags, campaigns and email — with everything picked from a dropdown.

## Before you start

- An account with Zapier
- A SendBeam API key, or a form ID

## Set it up

1. **Create an API key.** Settings → API keys in SendBeam. Give it contacts:write, and transactional:send if the scenario sends email. The full key is shown once.
2. **Add the HTTP step.** Point Zapier’s webhook or HTTP module at the endpoint, set the x-api-key header and a JSON body. The examples below are ready to map.
3. **Test with your own address.** Run the scenario once. The contact appears under Contacts within a second; a send appears in Activity with the API filter.

## Code

### Add a contact (Webhooks by Zapier → POST)

`Zap step`

```
POST https://sendbeam.io/api/v1/contacts
Headers
  x-api-key: sb_live_XXXXXXXX_YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
  Content-Type: application/json
Data (JSON)
{
  "email": "{{email_from_previous_step}}",
  "first_name": "{{first_name}}",
  "source": "zapier",
  "custom_fields": { "plan": "{{plan}}" }
}

201 → { "contact": { "id": "0f8c6d2e-…", "email": "…", "status": "subscribed", … } }
409 → { "error": "A contact with this email already exists" }
```

Create the key under Settings → API keys in SendBeam with contacts:write.

### Send an email to that contact

`Zap step`

```
POST https://sendbeam.io/api/v1/send
Headers
  x-api-key: sb_live_XXXXXXXX_YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
  Content-Type: application/json
Data (JSON)
{
  "contact_id": "{{id_from_the_create_contact_step}}",
  "subject": "Your order {{order_number}} is on its way",
  "html_content": "<p>Hi {{first_name}}, your order has shipped.</p>",
  "text_content": "Hi, your order has shipped."
}

200 → { "ok": true, "message_id": "…" }
```

Needs transactional:send. Only subscribed contacts can be mailed, and the send counts against your monthly and hourly allowances.

### No API key? Post to a signup form instead

`Zap step`

```
POST https://sendbeam.io/api/forms/YOUR_SIGNUP_FORM_ID
Headers
  Content-Type: application/json
Data (JSON)
{ "email": "{{email}}", "first_name": "{{first_name}}" }

200 → { "success": true, "message": "Thanks for subscribing!", "redirect_url": null }
```

Public form endpoints work on every plan. Leave the form’s Allowed sites empty, because a webhook sends no Origin header; SendBeam’s own submission checks and limits still apply.

## Things to know

- With the SendBeam app, a trigger creates one webhook endpoint in the workspace (Settings → Webhooks, named “Zapier: …”) and removes it when the Zap is turned off; the key needs contacts:read and webhooks:write.
- Webhooks by Zapier is a premium action; on the free Zapier plan use the public form route through a plain POST from another app that supports it.
- A 409 “already exists” from POST /api/v1/contacts is normal for repeat customers: follow it with GET /api/v1/contacts?q=email to fetch the id, or use a Filter step first. The SendBeam app’s Create or Update Contact action does this for you.
- Every API response is JSON with an error string on failure, which Zapier surfaces in the task history.

[← Zapier email marketing integration](https://sendbeam.io/integrations/zapier)

---
Source: https://sendbeam.io/docs/integrations/zapier
