POST request to your endpoint when something changes on a prompt or evaluator in Arize AX. Use webhooks to start a deploy when a prompt version gets the production label, sync prompt versions to your own store, or tell a team when an evaluator changes.
The webhooks REST endpoints and SDK methods are in alpha. Names and fields may change. See API version stages.
How webhooks work
Arize AX splits a webhook into two parts:- Webhook: where to send events. It holds the endpoint URL, how Arize AX authenticates to it, a timeout, and optional custom headers. A webhook belongs to an organization, and any prompt or evaluator in that organization can use it.
- Subscription: what to send. A subscription links one webhook to one event on one prompt or evaluator. To send three events from a prompt to the same webhook, create three subscriptions.
Events
Use the API value when you create a subscription. Your endpoint receives the dotted value in the payload
event field.
Limits
- A webhook can have at most 20 custom headers.
- The delivery timeout is between 1,000 and 60,000 ms. The default is 30,000 ms.
- At most 200 webhooks can subscribe to the same event on one prompt or evaluator.
- A webhook can subscribe to a given event on a given source only once.
- Webhook names must be unique within an organization.
Permissions
Account Admins can do everything an Organization Admin can. See Role-based access control for role details.
Create a webhook
- UI
- REST
- Python
- TypeScript
- Go
- CLI
- Go to Settings, then under Org Settings select Alert Integrations.
- Click the Webhooks Integration card.
- Click Add New.
- Enter a Name (unique in the organization) and the URL of your endpoint.
- Optionally add a Description, an Authorization Token, and custom headers with Add Custom Headers.
- Click Register New Webhook.
Authenticate deliveries
Choose an auth type when you create a webhook. You cannot change it later.Bearer token
WithBEARER (the default), Arize AX sends your token as the Authorization header on every delivery. It sends the value exactly as you enter it, so include the scheme your endpoint expects:
HMAC signature
WithHMAC_SHA256, Arize AX creates a signing secret and signs every delivery with it. Arize AX returns the secret only once, in the create response.
After creation, the webhook shows only a signing_secret_hint such as whsec_…abcd so you can tell which secret it uses.
Each signed delivery carries these headers:
To verify a delivery:
- Read the raw request body as bytes, before any JSON parsing.
- Join the
X-Arize-Webhook-Timestampvalue, a., and the raw body. - Compute HMAC-SHA256 of that string. Use the full signing secret, including the
whsec_prefix, as the key. - Hex-encode the result, add
v1=in front, and compare it toX-Arize-Webhook-Signaturewith a constant-time compare. - Reject requests whose timestamp is too old for your needs, for example more than five minutes. Each retry carries a fresh timestamp and signature.
- Python
- Node.js
Custom headers
Both auth types can send up to 20 custom headers, such as a routing key. Header values are write-only. Arize AX rejects connection headers such asHost and Content-Length. It always sets Content-Type: application/json, the bearer token when one is set, and the signature headers, so these values win over custom headers with the same names.
Subscribe a webhook to events
- UI
- REST
- Python
- TypeScript
- Go
- CLI
- Open a prompt in Prompt Hub, or open an evaluator.
- Click Webhooks.
- Point to a webhook to open its Events menu.
- Select the events to send. For a prompt, choose from Version created, Version labeled, and Version unlabeled. For an evaluator, choose Version created.
PROMPT sources and EVALUATOR_VERSION_CREATED for EVALUATOR sources. The webhook must belong to the same organization as the prompt or evaluator. To find IDs, run ax prompts list or ax evaluators list.
Payloads
Every delivery is a JSONPOST with Content-Type: application/json. Event deliveries share these top-level fields:
changed_by in data is the ID of the user who made the change. All IDs are opaque strings.
prompt.version.created
prompt.version.created
prompt.version.labeled and prompt.version.unlabeled
prompt.version.labeled and prompt.version.unlabeled
Both events use the same shape.
label is the label that was added or removed.evaluator.version.created
evaluator.version.created
test.test_event
test.test_event
A test delivery carries only three fields.
Test a webhook
A test sends onetest.test_event request to your endpoint and reports the HTTP status your endpoint returned.
- UI
- REST
- Python
- TypeScript
- Go
- CLI
Open the webhook from Alert Integrations > Webhooks Integration and click Test Webhook.
- A successful call means the test ran. Check
status_codeanderror_messagefor your endpoint’s answer.status_codeis502when Arize AX got no response, for example because the endpoint was unreachable or timed out. - Test deliveries do not work for
HMAC_SHA256webhooks. To check a signed webhook, subscribe it to an event and trigger that event, for example by saving a new prompt version. - Test deliveries do not retry and do not appear in delivery history.
Delivery history and retries
Arize AX records every attempt to deliver an event. Each record holds theevent_id (the same value as event_uuid and X-Arize-Webhook-Id), the attempt_number, the payload sent, the status_code (null when no response came back), the error_message, and the time of the attempt.
- UI
- REST
- Python
- TypeScript
- Go
- CLI
Open the webhook from Alert Integrations > Webhooks Integration and select the Event Delivery tab. It lists each attempt’s HTTP status, payload, error, attempt number, and send time.
Retries
Arize AX counts any2xx response as delivered. It retries an event when:
- the request fails to connect or times out, or
- your endpoint returns
408,429, or any5xxstatus.
4xx responses or 3xx redirects.
Arize AX tries each event up to six times. After a failed attempt, it waits about 1, 4, 16, 64, and then 256 minutes before the next try. Retries send the same payload and event_uuid, so the same event can reach you more than once. Use event_uuid to skip events you have already handled.
To avoid timeouts, return a 2xx response quickly and do slow work after you respond.
Update a webhook
You can change a webhook’s name, description, URL, bearer token, timeout, and custom headers. You cannot change its auth type or rotate its signing secret; create a new webhook instead.- When you send
headers, the new map replaces all existing headers. - Send
descriptionasnullto clear it.
ax webhooks update.
Delete a webhook or subscription
Deleting a webhook stops all deliveries to it and removes it from every prompt, evaluator, and monitor that used it. You cannot undo this.Next steps
REST API reference
Every webhook and subscription endpoint, with all fields.
CLI reference
Manage webhooks and subscriptions with
ax webhooks.