Skip to main content
The webhooks client methods are currently in ALPHA. The API may change without notice. A one-time warning is emitted on first use.
Manage webhooks and their subscriptions programmatically. A webhook is an organization-level destination — an HTTPS endpoint plus the authentication used to call it. A subscription delivers one event from one prompt or evaluator to one webhook.

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.
For details on pagination, field introspection, and data conversion (to dict/JSON/DataFrame), see Response Objects.

Create a Webhook

Create a webhook in an organization. Webhook names must be unique within the organization.

Bearer Auth

HMAC-SHA256 Auth

For HMAC_SHA256 webhooks, the signing_secret is returned only once in the create response. Store it securely — it cannot be retrieved again, and losing it means deleting and recreating the webhook.

Get a Webhook

Retrieve a webhook by ID or name. When resolving by name, pass organization. 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 — inspect status_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.
For details on pagination, field introspection, and data conversion (to dict/JSON/DataFrame), see Response Objects.

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, pass source_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 for PROMPT sources and evaluator events for EVALUATOR sources.

Get a Subscription

Delete a Subscription

Delete a subscription by ID. The webhook stops receiving that event from the source. Other subscriptions and the webhook itself are unaffected. There is no response from this call.