---
title: "Update a webhook"
method: PATCH
path: "/webhook/{webhook}"
tags: ["webhook"]
---

# Update a webhook

`PATCH /webhook/{webhook}`

## Request

- Base URL: `http://localhost:3030`
- URL: `http://localhost:3030/webhook/{webhook}`
- Auth: HTTP bearer

Updates a webhook's URL, name, event types, active status or retry policy.

`event_type` and `retry_policy` replace their current values. Send the `ETag` you read as
`If-Match`. The signing secret does not change.

## Path parameters

- `webhook` string, required: The webhook's id, `whk_...`.

## Headers

- `If-Match` string, nullable: The `ETag` from your last read of the webhook. A stale value is refused with `409`.

## Request body

- WebhookPatch: A partial update. Omitted fields are unchanged; `null` clears a field.
  - `url` string, nullable: The URL deliveries are sent to. Pending deliveries go to the new URL.
  - `name` string, nullable: A name for the webhook, up to 200 characters. `null` clears it.
  - `event_type` string[], nullable: The complete list of event types to deliver. Replaces the current list.
  - `active` boolean, nullable: Whether events are delivered. While `false`, deliveries are held.
  - `retry_policy` RetryPolicy: How a failed delivery is retried. A delivery that fails `max_attempt` times, or is still undelivered `dead_letter_after_hours` after its event, is dead-lettered.
    - `max_attempt` integer: Maximum attempts per delivery, between 1 and 20. Defaults to 12.
    - `backoff` 'exponential' | 'linear' | 'fixed': How the wait between attempts grows. One of `exponential` (doubles), `linear` (adds `base_seconds`) or `fixed`. No wait exceeds six hours. Defaults to `exponential`.
    - `base_seconds` integer: Seconds to wait after the first failed attempt, between 1 and 3600. Defaults to 60.
    - `jitter` boolean: Whether each wait is randomized to between half and all of its length. Defaults to `true`.
    - `dead_letter_after_hours` integer: Hours after the event after which retries stop, between 1 and 720. Defaults to 24.

## Response `200`

The webhook.

- Webhook
  - `object` 'webhook', required: The object's type. Always `webhook`.
  - `id` string, required: Unique identifier for the object.
  - `name` string, nullable, required: The webhook's name. Null when none was given.
  - `url` string, required: The URL deliveries are sent to.
  - `event_type` string[], required: The event types delivered to this webhook.
  - `active` boolean, required: Whether events are delivered. While `false`, deliveries are held.
  - `secret_fingerprint` string, required: A fingerprint of the signing secret, for telling secrets apart.
  - `retry_policy` RetryPolicy, required: How a failed delivery is retried. A delivery that fails `max_attempt` times, or is still undelivered `dead_letter_after_hours` after its event, is dead-lettered.
    - `max_attempt` integer: Maximum attempts per delivery, between 1 and 20. Defaults to 12.
    - `backoff` 'exponential' | 'linear' | 'fixed': How the wait between attempts grows. One of `exponential` (doubles), `linear` (adds `base_seconds`) or `fixed`. No wait exceeds six hours. Defaults to `exponential`.
    - `base_seconds` integer: Seconds to wait after the first failed attempt, between 1 and 3600. Defaults to 60.
    - `jitter` boolean: Whether each wait is randomized to between half and all of its length. Defaults to `true`.
    - `dead_letter_after_hours` integer: Hours after the event after which retries stop, between 1 and 720. Defaults to 24.
  - `created_at` string, date-time, required: Time at which the object was created.
  - `updated_at` string, date-time, required: Time at which the object was last updated.
  - `href` string, required: The path of this webhook.

## Other responses

- `401`: `credential_missing`, `credential_invalid` or `credential_expired`. The request has no valid credential.
- `403`: `scope_missing`, `person_required`, `api_key_not_accepted` or `entitlement_missing`. The credential or plan does not allow this request. `detail` names the reason.
- `404`: `no_such_resource`. No object has that id.
- `409`: `version_conflict`. The object changed after it was read. Read it again and resend with the new `ETag` in `If-Match`.
- `422`: `parameter_invalid`, `id_malformed` or a cursor code. A parameter is missing or invalid. `errors` lists each one.
- `429`: `rate_limited`. Too many requests. Retry after the `Retry-After` interval. Nothing is charged.

---

[API](https://skmtc.dev/placestack/apis/placestack-api.md) · [All operations](https://skmtc.dev/placestack/apis/placestack-api/llms.txt) · [OpenAPI document](https://skmtc.dev/placestack/apis/placestack-api/revisions/0ccdf0882668?raw)
