---
title: "Create a webhook"
method: POST
path: "/webhooks"
tags: ["Webhooks"]
---

# Create a webhook

`POST /webhooks`

## Request

- Base URL: `https://barevalue.com/api/v1`
- URL: `https://barevalue.com/api/v1/webhooks`
- Auth: HTTP bearer

Subscribe to order events. The webhook URL will receive POST requests with a signed payload.

## Request body

- CreateWebhookRequest
  - `url` string, uri, required: HTTPS URL to receive webhook POST requests
  - `events` string[], required: Events to subscribe to

## Response `201`

Webhook created

- WebhookResponse
  - `id` integer
  - `url` string, uri
  - `events` string[]
  - `secret` string: HMAC signing secret. Only returned on creation.
  - `active` boolean
  - `created_at` string, date-time

## Other responses

- `401`: Missing or invalid API key
- `422`: Validation failed

---

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