Update webhook

Replaces the webhook's URL, event subscription and sources. A field left out takes its default. The signing secret is unchanged.

PUT/webhooks/{id}
AuthAPI keyorOAuth tokenHow to send it

Path parameters

idstringrequired

The webhook to update.

e.g. "wbh_01KE7XWWEQ4MCGWKBQKJ1G47RP"

Request body

enabledbooleanrequired

Whether the webhook is enabled. When disabled, no events will be sent to the webhook.

urlstringrequired

Receives the events. Must be https and a public host.

e.g. "https://example.com/hooks/mynth"
eventsstring[]required

The events to send. ["all"] sends every event, including ones added later. task.completed and task.failed cover every task type.

≥ 1 items
api_key_idsstring[] | null

Tasks created with these API keys are sent. Omitted or null: every key, including keys created later. An empty list: no key.

≤ 1000 items
include_session_tasksboolean

Also send tasks created without an API key: playground runs and other signed-in (OAuth) sessions. Tasks the CLI creates carry its API key, so api_key_ids decides those.

default false

Response

Webhook updated

dataobjectrequired

Errors

A failed call names what went wrong in code, with a sentence in message. The codes, which of them are worth retrying, and how to read a validation failure are on Errors.