---
title: "Update webhook"
method: PATCH
path: "/mailboxes/v1/{mailbox_id}/webhooks/{webhook_id}"
tags: ["Mailboxes"]
---

# Update webhook

`PATCH /mailboxes/v1/{mailbox_id}/webhooks/{webhook_id}`

## Request

- Base URL: `https://api.run402.com`
- URL: `https://api.run402.com/mailboxes/v1/{mailbox_id}/webhooks/{webhook_id}`
- Auth: HTTP bearer

Updates a webhook's url and/or events. At least one field required. Events is a full replacement, not a merge.

## Path parameters

- `mailbox_id` string, required
- `webhook_id` string, required

## Request body

- object
  - `url` string, uri: New webhook URL
  - `events` string[]: New events (full replacement)

## Response `200`

Updated webhook

- Webhook: Registered mailbox webhook. Deliveries use MailboxWebhookEnvelope; reply_received payloads use MailboxReplyReceivedPayload.
  - `webhook_id` string: Webhook ID (whk_<ts>_<rand>)
  - `url` string, uri: Callback URL
  - `events` string[]
  - `created_at` string, date-time

## Other responses

- `400`: Bad request
- `401`: Missing or invalid authentication. Run402-originated JSON bodies use the canonical ErrorEnvelope.
- `404`: Not found

---

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