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

# Update a webhook

`PATCH /v1/webhooks/{id}`

## Request

- Base URL: `https://api.pomerado.ai`
- URL: `https://api.pomerado.ai/v1/webhooks/{id}`
- Auth: HTTP bearer

Change a webhook's URL or events, or turn it off or on.

- Only its creator can change it; another member's is forbidden.
- A webhook turns itself off when its receiver answers 410 or fails 20 deliveries in a row. Setting status to active turns it back on and clears its failures.

## Path parameters

- `id` string, required

## Request body

- object
  - `url` string
  - `events` string[]: an array of at least 1 item(s)
  - `status` 'active' | 'disabled': active turns a disabled webhook on again and clears its failures; disabled turns it off

## Response `200`

The changed webhook

- Webhook
  - `id` string, required: a webhook ID: wh_ and 32 lowercase hex digits
  - `created_by` WebhookCreator, required: The member who made the webhook. Only they can change, test or rotate it, and it carries events for the jobs they can see
    - `user_id` string, required: The member's user ID
    - `email` string, nullable, required: The email they sign in with, or null when the account no longer has it
  - `url` string, required
  - `events` string[], required
  - `status` 'active' | 'disabled', required
  - `disabled_reason` 'manual' | 'gone' | 'unreachable' | 'secret_unreadable', nullable, required: Why a disabled webhook sends nothing: manual (turned off), gone (its receiver answered 410), unreachable (20 failed deliveries in a row) or secret_unreadable (rotate its secret)
  - `created_at` string, required: a string to be decoded into a Date
  - `last_delivery_at` string, required: a string to be decoded into a Date

## Other responses

- `400`: invalid_request
- `401`: unauthorized, reauthentication_required
- `403`: webhooks_unavailable, forbidden
- `404`: not_found
- `413`: request_too_large
- `500`: internal_error
- `503`: temporarily_unavailable

---

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