The
webhooks client methods are currently in ALPHA. The API may change without notice. A one-time warning is emitted on first use.Key Capabilities
- List, create, retrieve, update, and delete organization-level webhooks
- Send a test event and inspect delivery attempts
- Subscribe a webhook to prompt or evaluator events
- List, retrieve, and delete subscriptions
Authentication Types
Event Types
List Webhooks
List webhooks you have access to, newest-first, with optional filtering by organization or name.Create a Webhook
Create a webhook in an organization. Webhook names must be unique within the organization.Bearer Auth
HMAC-SHA256 Auth
Get a Webhook
Retrieve a webhook by ID or name. When resolving by name, passorganization. Credentials (auth_token, header values, signing secret) are never included.
Update a Webhook
Only the fields you pass are updated. At least one field must be provided.auth_type cannot be changed after creation, and an HMAC_SHA256 webhook’s signing secret cannot be rotated — create a new webhook instead. Pass description=None to clear the description. Providing headers replaces the entire header map.
Delete a Webhook
Delete a webhook by ID or name. It stops receiving events and is detached from every prompt, evaluator, and monitor it was subscribed to. This operation is irreversible. There is no response from this call.Test a Webhook
Send a test event to a webhook’s endpoint and report the outcome. A successful call means the test ran — inspectstatus_code and error_message for the endpoint’s actual response. status_code is 502 when no response was received. Test deliveries are not supported for HMAC_SHA256 webhooks.
List Delivery Attempts
List a webhook’s delivery attempts, most recent first. Each event may have several attempts, since failed deliveries are retried.Manage Subscriptions
A subscription delivers one event from one prompt or evaluator to one webhook. To deliver several events to the same webhook, create one subscription per event.List Subscriptions
List subscriptions, newest-first. To filter to a single source, passsource_type and source_id together.
Create a Subscription
Subscribe a webhook to one event on a prompt or evaluator. The event must belong to the source type: prompt events forPROMPT sources and evaluator events for EVALUATOR sources.