---
title: "Subscribe to events"
method: POST
path: "/webhooks"
tags: ["Webhooks"]
---

# Subscribe to events

`POST /webhooks`

## Request

- Base URL: `https://api.marubox.jp/v1`
- URL: `https://api.marubox.jp/v1/webhooks`
- Auth: HTTP bearer

Registers an endpoint to receive events. The secret is returned only here: store it, and verify the BB-Signature header on every delivery. Returns a Location header pointing at the subscription.

## Request body

- object
  - `url` string, uri, required
  - `events` union[], required
    - union
      - 'booking.created' | 'booking.rescheduled' | 'booking.cancelled' | 'booking.no_show' | 'booking.completed'
      - '*'
  - `description` string

## Response `201`

Default Response

- object
  - `id` string, required
  - `url` string, required
  - `events` string[], required
  - `description` string, nullable, required
  - `status` 'active' | 'disabled', required
  - `createdVia` string, required
  - `lastSuccessAt` string, nullable, required
  - `consecutiveFailures` integer, required
  - `createdAt` string, required
  - `secret` string, required

## Other responses

- `400`: Default Response
- `401`: Default Response
- `403`: Default Response
- `404`: Default Response
- `409`: Default Response
- `429`: Default Response

---

[API](https://skmtc.dev/marubox/apis/business-box-api.md) - [All operations](https://skmtc.dev/marubox/apis/business-box-api/llms.txt) - [OpenAPI document](https://skmtc.dev/marubox/apis/business-box-api/revisions/7331e2a27c8b?raw)
