---
title: "Register webhook"
method: POST
path: "/mailboxes/v1/{mailbox_id}/webhooks"
tags: ["Mailboxes"]
---

# Register webhook

`POST /mailboxes/v1/{mailbox_id}/webhooks`

## Request

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

Registers a webhook URL to receive mailbox event notifications.

## Path parameters

- `mailbox_id` string, uuid, required

## Request body

- object
  - `url` string, uri, required: Webhook callback URL
  - `events` string[], required: Events to subscribe to

## Response `201`

Webhook registered

- object
  - `webhook_id` string, uuid
  - `url` string, uri
  - `events` string[]

## Other responses

- `401`: Missing or invalid authentication. Run402-originated JSON bodies use the canonical ErrorEnvelope.

---

[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)
