Create a webhook subscription
Changed onSubscribe a webhook to one event on a prompt, evaluator, evaluation task, or space. To deliver several events to the same webhook, create one subscription per event. A SPACE subscription covers every evaluation task in the space, including tasks created later.
Payload Requirements
- webhook_id, source_type, source_id, and event are required.
- webhook_id must be a webhook in the source's organization; unknown webhooks yield a 404.
- event must belong to the source type: prompt events for PROMPT sources, evaluator events for EVALUATOR sources, and ONLINE_TASK_RUN_FAILED for ONLINE_TASK and SPACE sources. Other combinations are rejected with a 422.
- An ONLINE_TASK source must be an evaluation task; other task types are rejected with a 422.
- A webhook can subscribe to a given event on a given source only once (409 on conflict).
- At most 200 webhooks may subscribe to the same event on a source; requests that would exceed this limit are rejected with a 422.
Creating a subscription requires PROMPT_UPDATE for a prompt source, EVALUATOR_UPDATE for an evaluator source, PROJECT_EVAL_TASK_UPDATE (or EXPERIMENT_EVAL_TASK_UPDATE for a dataset task) for a task source, or a space, organization, or account admin role for a space source, since a space subscription covers every task in the space, including tasks in restricted projects. Callers who can read the source (PROMPT_READ, EVALUATOR_READ, PROJECT_EVAL_TASK_READ or EXPERIMENT_EVAL_TASK_READ) but lack the required permission receive a 403; sources the caller cannot read yield a 404.
Checks run in this order, and the first failure is returned: request body validation (422), source access (404 or 403), source task type (422), webhook lookup (404), then duplicate subscription (409) and the per-source webhook limit (422).
<Warning>This endpoint is in alpha, read more here.</Warning>
Request
- Base URLhttps://api.arize.com
- URLhttps://api.arize.com/v2/webhook-subscriptions
- AuthHTTP bearer
Request body
Example request
{
"webhook_id": "RW50aXR5OjEyMzQ1",
"source_id": "RW50aXR5OjEyMzQ1"
}Response
The created webhook subscription
Example response
{
"id": "RW50aXR5OjEyMzQ1",
"webhook_id": "RW50aXR5OjEyMzQ1",
"source_id": "RW50aXR5OjEyMzQ1"
}Changes
- warning
added the new
ONLINE_TASKenum value to the////response property for the response status - warning
added the new
ONLINE_TASK_RUN_FAILEDenum value to the////response property for the response status - warning
added the new
SPACEenum value to the////response property for the response status - info
added the new
ONLINE_TASKenum value to the request property//// - info
added the new
ONLINE_TASK_RUN_FAILEDenum value to the request property//// - info
added the new
SPACEenum value to the request property////
- warning
- info
endpoint added
- info