Connection webhooks quickstart
This quickstart walks you through registering a webhook, test-firing it, and receiving a real event about an app connection (an end user’s authenticated link to a third-party app). By the end, you will have a registered endpoint and a stored signing secret ready for signature verification. For brevity, the steps below call an app connection a connection.Prerequisites
- A White Label (partner) account that manages at least one connection.
- An OAuth 2.0 access token with the
connection:webhook:writeandconnection:webhook:readscopes. To obtain one, go to Token exchange: Connection Webhooks API. - An HTTPS endpoint that can accept POST requests. The
callback_urlmust use HTTPS.
While this API is in early access, partners need a separate, dedicated client
ID and secret to obtain an access token for the connection webhooks endpoints.
Reach out to whitelabel@zapier.com to set it
up. For the exchange, go to Token exchange: Connection Webhooks
API.
Step 1: Register a webhook
Create a webhook subscribed to theconnection.expiry_scheduled event. The response includes the signing secret. This is the only time the secret is returned, so store it securely.
201 Created:
Step 2: Confirm the webhook is registered
List your webhooks to confirm the new one is present and active. Thesecret is never returned on list or retrieve, only on create.
Step 3: Test the webhook
Before you wait for a real event, test-fire the webhook to confirm your endpoint receives and verifies deliveries. Send a POST to the webhook’stest endpoint:
202 Accepted and enqueues the delivery. Zapier then delivers a sample connection.expiry_scheduled event to your callback_url. A test delivery is identical to a real one, except it carries a webhook-test: true header so you can tell them apart. Use it to skip side effects during testing (for example, do not email a real user), while still exercising your signature verification.
Step 4: Receive an event
When one of the connections you manage is scheduled to expire, Zapier POSTs a signedconnection.expiry_scheduled event to your callback_url:
2xx status quickly to acknowledge receipt. A 429 or any 5xx response triggers a retry, so the same event can arrive more than once. For retry and Retry-After behavior, go to Error handling. Before you trust the payload, verify the signature. For the steps, go to Verify signatures.
Step 5: Prompt the user to reconnect
Use theconnection_id from the payload to tell the user to start a reconnection flow, so they reauthorize before the connection expires. For the reconnection parameters, go to Connection flow.
Manage a webhook
Pause a webhook without deleting it by settingis_active to false, or update its callback_url:
Next steps
- Verify signatures: confirm each delivery is authentic.
- Event payload reference: the fields in a delivered event.
- Error handling: API error codes and delivery retry behavior.
- Connections API reference: the full CRUD endpoints.