---
title: "Subscribe a Zapier REST hook"
method: POST
path: "/v1/integrations/zapier/hooks"
tags: ["Integrations"]
---

# Subscribe a Zapier REST hook

`POST /v1/integrations/zapier/hooks`

## Request

- Base URL: `https://api.pyai.com`
- URL: `https://api.pyai.com/v1/integrations/zapier/hooks`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Zapier REST-hook subscribe: delivers every completed call of the given event type to `target_url` as `{id, type, occurred_at, data}`, signed with `X-PyAI-Signature` and carrying an `Idempotency-Key`. Idempotent on `(org, event, target_url)` — re-subscribing refreshes in place (HTTP `201` with the same id). Deliveries are durable: bounded retries with backoff, then a visible dead letter. Any active key may call this.

## Request body

- ZapierHookInput
  - `event` 'recap.call.completed' | 'amd.call.completed' | 'trace.scorecard.completed' | 'transcription.job.completed' | 'cast.render.completed' | 'recap.alert.ready' | 'trace.alert.ready', required: Event to deliver to this hook.
  - `target_url` string, uri, required: Zapier REST-hook target URL (https). Every completed call POSTs a signed envelope {id, type, occurred_at, data} here.

## Response `201`

Subscribed hook

- IntegrationDestination
  - `object` string
  - `id` string
  - `kind` 'slack' | 'zapier' | 'hubspot' | 'zendesk' | 'pipedrive' | 'zoho' | 'apollo' | 'clay' | 'sheets'
  - `name` string
  - `events` string[]
  - `status` 'active' | 'error' | 'disabled'
  - `last_delivery_at` integer, nullable: Unix ms.
  - `last_error` string, nullable
  - `config` object: Kind-specific config with secrets redacted (URLs masked, tokens shortened).
  - `created_at` integer: Unix ms.
  - `updated_at` integer: Unix ms.

## Other responses

- `400`: Invalid request (bad field, unsupported value)
- `401`: Missing or invalid API key (`code: unauthorized`)

---

[API](https://skmtc.dev/pyai/apis/pyai-api.md) · [All operations](https://skmtc.dev/pyai/apis/pyai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pyai/apis/pyai-api/revisions/271a1539185b?raw)
