Prompts
Set a prompt's webhook subscriptions
Set (replace) all webhook subscriptions on a prompt. This is an idempotent operation.
Payload Requirements
- subscriptions is required, with at most one entry per webhook_id.
- Each entry must subscribe to at least one prompt event (PROMPT_VERSION_CREATED, PROMPT_VERSION_LABELED, PROMPT_VERSION_UNLABELED); other events are rejected with a 422.
- Each webhook_id must be a webhook in the prompt's organization; unknown webhooks yield a 404.
- At most 200 webhooks may subscribe to the same event on a prompt; requests that would exceed this limit are rejected with a 422.
Subscriptions not included in the request are removed. Pass an empty array to detach every webhook from the prompt.
<Warning>This endpoint is in alpha, read more here.</Warning>
put/v2/prompts/{prompt_id}/webhook-subscriptions
Path parameters
prompt_idstring required
A universally unique identifier (base64-encoded opaque string).
Example:RW50aXR5OjEyMzQ1
The unique prompt identifier (base64)
Request body
Example request
{
"subscriptions": [
{
"webhook_id": "RW50aXR5OjEyMzQ1"
}
]
}Response
The complete set of webhook subscriptions attached to the resource
Example response
{
"subscriptions": [
{
"webhook_id": "RW50aXR5OjEyMzQ1"
}
]
}