> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sendler.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Zapier integration

> Use workspace events and authenticated REST requests in a Zap.

Use **Webhooks by Zapier** for SendPilot events and REST actions. These are API-key integrations, not MCP OAuth connectors.

## Receive an event

1. Create a Zap with a Webhooks trigger and obtain its HTTPS destination.
2. Register the destination in **SendPilot → Integrations → Webhooks** for the intended workspace.
3. Select exact event types, such as `reply.received` or `connection_request.accepted`.
4. Send a test event and map fields from the captured JSON body.

Verify the raw body and signature before trusting events. If the trigger cannot perform [Svix verification](https://docs.sendler.ai/webhooks/setup.md), place a verifying receiver in front of the Zap and forward only verified events. Deduplicate by `eventId`.

## Reply → notification or CRM task

Filter on `eventType = reply.received`. Use `data.reply` for message text and `data.linkedinUrl` for the profile. `data.leadId` and `data.campaignId` can be null for non-campaign conversations; only perform lead-ID actions when an ID is present.

For connection notifications, filter on `connection_request.accepted`. For lead outcome changes, use `lead.updated`, whose data includes `previousStatus` and `newStatus`.

## Form submission → campaign lead

Configure a Custom Request action:

```text theme={null}
Method: POST
URL: https://api.sendpilot.ai/v1/leads
X-API-Key: your securely stored workspace API key
Content-Type: application/json
Idempotency-Key: a stable ID for this form submission and import
```

Map your form fields into this body:

```json theme={null}
{
  "campaignId": "CAMPAIGN_ID",
  "leads": [{
    "linkedinUrl": "https://www.linkedin.com/in/PROFILE_ID",
    "firstName": "Alex",
    "email": "alex@example.test",
    "source": "Website form"
  }]
}
```

REST accepts flat custom fields and up to 1,000 leads per import. Check the import response for added, duplicate and invalid entries before marking the source record processed.

## Update an outcome

Use `PATCH /v1/leads/LEAD_ID/status`, the same authentication/content headers and a stable idempotency key:

```json theme={null}
{"customLeadStatus":"INTERESTED"}
```

Do not set sequence-managed statuses such as `REPLY_RECEIVED`. See [allowed lead outcomes](https://docs.sendler.ai/api-reference/endpoint/patch-lead-status.md).

## Retries

Reuse the same `Idempotency-Key` and request on retries; do not generate a fresh random value for each attempt. Handle rate limits and uncertain outcomes using the [REST retry guide](https://docs.sendler.ai/api-reference/behavior.md). An accepted REST send executes directly, without MCP approval forms.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.