이 페이지는 아직 한국어로 번역되지 않았습니다. 아래는 영어 원문입니다.
Preview. The webhook routes are being reconciled with the contract; check the API reference for the current shapes.

Event webhooks

An event webhook delivers events of one workspace to a public HTTPS URL (at most 2048 bytes). Choose payload_format: "official" to receive the Anthropic-shaped event; session.* types belong to that format (for example session.status_run_started, session.status_idled, session.status_rescheduled, session.status_terminated). session.status_idled also announces a pause for requires_action; a retried error is session.status_rescheduled, an unrecoverable one session.status_terminated. The native payload format is deprecated. Creating a webhook returns the signing secret once; POST …/regenerate-signing-secret replaces it and returns the new one once. GET …/deliveries lists the delivery attempts of an endpoint.

Organization webhook endpoints

/v1/organizations/webhooks (list, create, retrieve, update, delete, and POST /v1/organizations/webhooks/{webhook_endpoint_id}/regenerate_signing_secret) follows Anthropic’s organization webhook endpoints. It accepts only the user_profile.enforcement_action_opened and user_profile.enforcement_action_resolved event types. BMA has no user-profile enforcement events yet, so you can create and manage such an endpoint, but no delivery is produced for it today.

Delivery

The payload is {"type": "event", "id": "whe_...", "created_at": "...", "data": {"type": ..., "id": <resource id>, "organization_id": ..., "workspace_id": ...}}: ids only, not the object. Endpoints must be HTTPS on port 443 with a public domain name; an organization has at most 32, and two enabled endpoints cannot share a URL (409). The signed content is {webhook-id}.{webhook-timestamp}.{body}; the signature is the base64 HMAC-SHA256 of it with the secret’s bytes (the signing secret is whsec_ followed by the base64 of 32 random bytes). Reject timestamps older than 5 minutes and compare signatures in constant time. Rotating the secret invalidates the old one at once, including for events still being retried.
  • Answer with a 2xx within 5 seconds. Order is not guaranteed.
  • Each endpoint and event gets at most 3 attempts, with exponential backoff of 5 to 120 seconds with jitter; then the event is dropped. Every attempt carries the same event id: make your handler idempotent on webhook-id.
  • A redirect (3xx) or an address that resolves to a non-public IP disables the endpoint immediately; so does a long run of failures. Events during the disabled time are not replayed; set state to enabled to resume (disabled_reason says why).
  • An event goes only to endpoints subscribed when it happened; a later subscription does not backfill.