---
title: "Create a webhook subscription"
method: POST
path: "/api/webhooksubscriptions"
tags: ["Webhook subscriptions"]
---

# Create a webhook subscription

`POST /api/webhooksubscriptions`

## Request

- Base URL: `https://api.hairdora.com`
- URL: `https://api.hairdora.com/api/webhooksubscriptions`
- Auth: API key in header `Authorization`

The response includes the signing `secret` exactly once — store it; it cannot be retrieved again.

## Request body

- object
  - `salonId` string, required
  - `url` string, required
  - `events` string[]: Empty array subscribes to all events

## Response `200`

The created subscription, including its secret

- object
  - `_id` string
  - `salonId` string
  - `url` string, uri
  - `events` string[]
  - `active` boolean
  - `creationTime` string, date-time

## Other responses

- `default`: Error response

---

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