# Update a webhook

`PATCH https://api.signwithsigil.com/v1/webhooks/{uid}`

Change the URL, the events, the description, or switch the endpoint on or off.

Send only the fields to change; the rest stay as they are. Switching an endpoint on (`"active": true`) also clears its failure count, which is how a disabled endpoint is brought back once the receiver is fixed. While it is off, events that happen are not queued for it.

## Authorization

Header `Authorization: Bearer sgk_…` (or `X-Api-Key: sgk_…`).

## Path parameters

- `uid` (string, required): The webhook's 8-character id. Not case-sensitive.

## Body (application/json)

- `url` (string): A new URL, under the same rules as on create.
- `events` (array of strings | null): A new subscription. `null` or `[]` means every pact event.
- `description` (string): A new description; `""` clears it.
- `active` (boolean): `false` stops deliveries; `true` resumes them and resets `consecutive_failures`.

## Response

`200 OK`: The [webhook](/api-reference/objects/webhook) as it now is.

- `uid` (string): The endpoint's id: 8 letters and digits.
- `url` (string): Where events are posted: a public HTTPS URL.
- `description` (string | null): Your note on what it is for (100 characters at most).
- `events` (array of strings | null): The [event types](/webhooks#events) it receives, or `null` for every pact event. A `ping` is delivered whatever this says.
- `active` (boolean): Whether events are delivered to it. Switched off by you, by a `410 Gone` answer, or after 10 failed deliveries in a row; switch it on again with [Update a webhook](/api-reference/webhooks/update-webhook).
- `consecutive_failures` (integer): Deliveries given up on since the last success. Resets to 0 on the next success.
- `last_status` (integer | null): The HTTP status of the last attempt. `null` before the first attempt, and when the last attempt got no response.
- `date_last_success` (string (date-time) | null): When a delivery last got a `2xx`.
- `date_disabled` (string (date-time) | null): When it was switched off, while it is.
- `date_created` (string (date-time)): When it was added.
- `date_updated` (string (date-time)): When its settings or secret last changed.

## Errors

| Status | When |
|---|---|
| 400 | The body is not a JSON object, a URL or event is invalid, or `active` is not a boolean. |
| 401 | The API key is missing, wrong or revoked. |
| 403 | The account's plan does not include API access (Pro and Business do). |
| 404 | No webhook with that id belongs to your account. |

Every error body is `{ "error": "message" }`.

## Example request

```bash
curl -X PATCH https://api.signwithsigil.com/v1/webhooks/W8NQ3KTE \
  -H "Authorization: Bearer $SIGIL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "events": null, "active": true }'
```

## Example response

```json
{
  "uid": "W8NQ3KTE",
  "url": "https://example.com/sigil/webhook",
  "description": "Production CRM",
  "events": null,
  "active": true,
  "consecutive_failures": 0,
  "last_status": 200,
  "date_last_success": "2026-10-21T09:12:46Z",
  "date_disabled": null,
  "date_created": "2026-10-20T13:58:21Z",
  "date_updated": "2026-10-23T08:15:02Z"
}
```
