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

# Create a webhook

`POST /v1/webhooks`

## Request

- Base URL: `https://api.weirapp.io`
- URL: `https://api.weirapp.io/v1/webhooks`
- Auth: HTTP bearer

The signing secret is returned exactly once, in this response. It is stored encrypted and cannot be retrieved again. To replace it, create a new webhook and delete this one.

## Request body

- object
  - `name` string, required
  - `url` string, uri, required
  - `events` string[]

## Response `201`

The created webhook and its one-time signing secret.

- object
  - `data` object, required
    - `id` string, uuid, required
    - `name` string, required
    - `url` string, required
    - `status` 'active' | 'disabled', required
    - `events` string[], required
    - `failureCount` integer, required
    - `disabledAt` string, date-time, nullable, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `secret` string, required: Shown once. Store it now; it cannot be recovered.
  - `meta` object, required
    - `requestId` string, required

## Other responses

- `400`: The request failed validation, or the URL is not a permitted destination.
- `401`: The API key is missing, malformed, expired, or revoked.
- `402`: The account is out of credit. Not retryable: this cannot clear until the billing period resets or the plan changes.
- `403`: The API key does not carry the scope this route requires.
- `409`: The tier's webhook limit was reached. `details.limit` is the ceiling.
- `429`: The per-minute rate limit is exhausted. Retryable: wait for Retry-After and try again.
- `500`: An unexpected error occurred.

---

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