Register a webhook subscription
Creates a webhook subscription and an optional list of event types to subscribe to (defaults to all when omitted). kind: "http" (the default) delivers signed JSON to a URL; the response includes the generated signing secret, which is returned only once at creation time and cannot be retrieved later. kind: "integration" posts each event as a message into a connected integration target (e.g. a Slack channel): pick the capability from GET /webhooks/integrations and the args from GET /webhooks/integrations/{capabilityId}/targets. Integration webhooks have no signing secret. Send an Idempotency-Key header to make the create safe to retry: the same key with the same body returns the existing webhook (status 201, Idempotent-Replayed: true) instead of creating a second one, and the same key with a different body is a 422. A replayed create does not return the signing secret again; use rotate-secret if the original response was lost. If that webhook was deleted in the meantime, the retry is a 404.
Headers
Idempotency-Key: 1-255 printable ASCII characters. Same key with a different request body is a 422 idempotency_key_reused. A retryable in-flight duplicate is a 409 with Retry-After and x-should-retry: true; a terminal duplicate is a 409 with x-should-retry: false. A replay returns the current resource state with Idempotent-Replayed: true.
1 - 255^[\x21-\x7E]{1,255}$"b3f6a9f0-6f1a-4e9a-9e7a-9c9b6b6a5a3f"
Body
- Option 1
- Option 2