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

# Create a webhook subscription

`POST /webhooks`

## Request

- Base URL: `https://outdoorithm.com/api/v1`
- URL: `https://outdoorithm.com/api/v1/webhooks`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Register an https endpoint to receive events (currently `availability.found`). Send an `Idempotency-Key` header to safely retry this create and replay the same one-time `signing_secret`. Store the secret to verify the `X-Outdoorithm-Signature` header (HMAC-SHA256 over `${t}.${rawBody}`).

## Headers

- `Idempotency-Key` string: Unique key to safely retry this create without duplicating.

## Request body

- CreateWebhookBody
  - `url` string, required: Public https endpoint.
  - `event_types` string[]
  - `description` string

## Response `201`

The subscription (with signing_secret).

- object
  - `data` WebhookSubscriptionCreated, required
    - `object` 'webhook_subscription', required
    - `id` string, required
    - `url` string, required
    - `event_types` string[], required
    - `description` string, nullable, required
    - `is_active` boolean, required
    - `disabled_at` string, nullable, required
    - `last_delivery_at` string, nullable, required
    - `created_at` string, required
    - `updated_at` string, required
    - `signing_secret` string, required: Returned ONCE at creation. Store it to verify delivery signatures (X-Outdoorithm-Signature).

## Other responses

- `401`: Missing or invalid API key.
- `409`: Idempotency-Key conflict.
- `422`: Invalid url or body.
- `429`: Rate limit exceeded.

---

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