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

# Create a webhook

`POST /webhooks`

## Request

- Base URL: `https://api.mepmail.dev`
- URL: `https://api.mepmail.dev/webhooks`
- Auth: HTTP bearer

Registers an endpoint for the chosen events and returns its signing secret.

## Request body

- CreateWebhookRequest
  - `endpoint` string, uri, required
  - `events` string[], required
  - `signing_secret` string: Signing secret to use instead of minting one: whsec_ followed by base64 of 24-64 bytes, the format Resend/Svix issue. Carry over an existing secret so the receiver keeps verifying unchanged; omit to generate a new one.

## Response `200`

Webhook created; signing_secret is also retrievable via GET /webhooks/{id}

- CreateWebhookResponse
  - `object` 'webhook', required
  - `id` string, uuid, required
  - `signing_secret` string, required

## Other responses

- `401`: Missing, malformed or invalid API key
- `422`: Validation error
- `429`: Rate limit exceeded: 600 requests per minute per API key and 3,000 per team; wait for Retry-After

---

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