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

# Add a webhook

`POST /webhooks`

## Request

- Base URL: `https://www.postbase.so/api/v1`
- URL: `https://www.postbase.so/api/v1/webhooks`
- Auth: HTTP bearer

Register an https endpoint. The signing secret is returned in this response only.

## Request body

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

## Response `201`

Added

- object
  - `webhook` object
    - `id` string, uuid, required
    - `url` string, uri, required
    - `events` string[], required
    - `description` string, nullable
    - `secret_hint` string
    - `created_at` string, date-time
    - `last_delivery` object, nullable
      - `status` 'pending' | 'delivered' | 'failed'
      - `response_status` integer, nullable
      - `error` string, nullable
      - `created_at` string, date-time
    - `secret` string: whsec_… Store it: it isn't shown again.

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid API key
- `429`: Rate limited

---

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