---
title: "Set a prompt's webhook subscriptions"
method: PUT
path: "/v2/prompts/{prompt_id}/webhook-subscriptions"
tags: ["Prompts"]
---

# Set a prompt's webhook subscriptions

`PUT /v2/prompts/{prompt_id}/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](https://arize.com/docs/ax/rest-reference#api-version-stages).</Warning>

## Path parameters

- `prompt_id` string, required — A universally unique identifier (base64-encoded opaque string).

## Request body

- SetWebhookSubscriptionsRequest
  - `subscriptions` WebhookSubscriptionInput[], required — The complete set of webhook subscriptions for the resource, with at most one entry per `webhook_id`. Replaces all existing subscriptions: subscriptions not included in the request are removed, and an empty array detaches every webhook from the resource. At most 200 webhooks may subscribe to the same event on a resource; requests that would exceed this limit are rejected.
    - `webhook_id` string, required — A universally unique identifier (base64-encoded opaque string).
    - `subscribed_events` WebhookEventType[], required — The events to deliver to the webhook. Must contain at least one event valid for the resource type.

## Response `200`

The complete set of webhook subscriptions attached to the resource

- WebhookSubscriptions — The complete set of webhook subscriptions attached to a resource.
  - `subscriptions` WebhookSubscription[], required — The webhooks attached to the resource and the events each receives
    - `webhook_id` string, required — A universally unique identifier (base64-encoded opaque string).
    - `webhook_name` string, required — Name of the subscribed webhook
    - `subscribed_events` WebhookEventType[], required — The events delivered to the webhook

## Other responses

- `400` — Invalid request
- `401` — Authentication is required
- `403` — Insufficient permissions to access this resource
- `404` — Not found
- `422` — Unprocessable entity
- `429` — Rate limit exceeded

---

[API](https://skmtc.net/arize-ai/apis/arize-rest-api.md) · [All operations](https://skmtc.net/arize-ai/apis/arize-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/arize-ai/arize-rest-api/revisions/ddf93df2c295/schema)
