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

# Add a webhook

`POST /api/v1/webhooks`

## Request

- Base URL: `https://spoofy.social`
- URL: `https://spoofy.social/api/v1/webhooks`
- Auth: API key in cookie `better-auth.session_token`

Public https URL; no `events` means every event. The signing `secret` is in this answer only. Up to 10 webhooks.

## Request body

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

## Response `201`

Created.

- object
  - `webhook` Webhook
    - `id` string
    - `url` string
    - `events` string[]: Empty = every event.
    - `active` boolean
    - `createdAt` string, date-time
    - `secret` string: Signing secret `whsec_…` — in the create answer only.

## Other responses

- `400`: Bad URL.
- `409`: A limit was reached.
- `413`: The request body is too big (uploads up to 4 MB, everything else up to 64 KB).
- `429`: Slow down: too many requests in a short time. Wait `Retry-After` seconds and carry on.

---

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