webhooks

Create a webhook endpoint

Registers an active webhook endpoint that receives the event types in events as signed HTTPS POST requests. See the webhooks guide for delivery, signing, and retry behavior.

The 201 response is the only response that includes the signing secret (whsec_ prefix). Store it immediately; if it is lost, rotate the signing secret.

A non-HTTPS or non-public url, an unknown event type, or exceeding the organization's endpoint limit returns 422.

post/v1/webhooks

Request

  • Base URL: https://us1.platform.bird.com
  • URL: https://us1.platform.bird.com/v1/webhooks
  • Auth: one of:
    • HTTP bearer
    • API key in cookie bird_session

Headers

Idempotency-Keystring

Client-supplied key. On operations supporting request deduplication, a retained response is replayed for duplicate requests with the same key within the idempotency window (3 hours by default). This protection requires a workspace, organization, or staff-account scope. User-only and unscoped unauthenticated operations, streams, and operations with a separate replay contract do not use this response replay.

On a supported operation, if idempotency protection is unavailable before execution, the API returns 503 IdempotencyUnavailable (E01033) without executing this attempt. Retry with backoff using the same key and request. An operation that takes effect before its response is retained can still execute again on retry.

Two distinct 409 errors signal misuse:

  • request_in_progress (E01004): The same key is currently being processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
  • idempotency_key_reuse (E01005): The same key has already completed against a different request body or method. Generate a new key.

Recommended key format is <event-type>/<entity-id> (for example welcome-user/usr_abc123).

X-Workspace-Idstring

Workspace context for the request. Required for dashboard authentication and master keys. Workspace keys and access tokens already identify their workspace; send that workspace or omit the header. A different one is rejected.

X-Organization-Idstring

Organization context for the request. Required for dashboard authentication. An API key or access token carries its own organization, so send either that organization or no header at all; a different one is rejected.

Request body

urlstring uri

HTTPS URL to deliver events to, at most 2048 characters. The host must be publicly reachable: URLs on private, loopback, or link-local addresses are rejected with a 422. Required unless destination is a connector, whose URL comes from the connector and its config; a URL given with one must equal it.

eventsWebhookEventType[] required

Event types to subscribe to; the endpoint receives only matching events. Types outside the event catalog return a 422, and an endpoint holds at most 100 entries.

descriptionstring

Human-readable label for this endpoint, up to 256 characters.

Example request

{
  "url": "https://example.com/webhooks/bird",
  "events": [
    "email.delivered",
    "email.bounced"
  ],
  "description": "Production delivery + bounce notifications"
}

Response

Created webhook endpoint, including its one-time signing secret.

idstring required
urlstring uri required

HTTPS URL where the API delivers events for this endpoint.

descriptionstring

Human-readable label for the endpoint.

eventsWebhookEventType[] required

Event types this endpoint is subscribed to; only matching events are delivered. Change the set with Update a webhook endpoint.

status'active' | 'degraded' | 'paused' required

Delivery state of the endpoint.

  • active: The initial state; events are being delivered normally.
  • degraded: Recent deliveries are failing. We keep delivering and retrying, and the endpoint returns to active automatically once deliveries succeed again.
  • paused: All delivery is stopped, either because an update set status to paused or automatically after sustained delivery failures. A paused endpoint never resumes on its own: re-enable it with Update a webhook endpoint, then Replay failed deliveries to recover the deliveries that failed before the pause. Events that arrived while it was paused were never attempted, so a replay does not reach them.
created_atstring date-time required
updated_atstring date-time required
secretstring required

Signing secret for this endpoint (whsec_ prefix), used to verify every delivery signature. Present in this response only: store it immediately, it cannot be retrieved again. If you lose it, mint a new one with Rotate webhook signing secret.

Example response

{
  "id": "whk_01krdgeqcxet5s7t44vh8rt9mg",
  "url": "https://example.com/webhook",
  "description": "Production webhook endpoint",
  "filter": {
    "mailbox_id": "mbx_01kr97a6rje4wbe5z40wxdfcy9"
  },
  "events": [
    "email.delivered",
    "email.bounced"
  ],
  "destination": {
    "connector": {
      "connector_id": "claude_managed_agents",
      "action": "trigger_run",
      "connection_name": "Support triage agent",
      "config": {
        "trigger_url": "https://agents.example.com/triggers/support"
      }
    }
  },
  "created_at": "2026-05-20T09:14:52Z",
  "updated_at": "2026-05-25T16:42:01Z",
  "secret": "whsec_base64encodedvalue"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.