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

# Create webhook

`POST /api/webhooks`

## Request

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

Creates a webhook subscription. Save the secret from the response - it is only shown on creation and when fetching a single webhook.

## Query parameters

- `profile_group_id` string

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `url` string, required: HTTPS URL to receive webhook events.
  - `events` string[], required: Event types to subscribe to (use ["*"] for all).
  - `description` string: Description for the webhook.

## Response `201`

Webhook created (includes the signing secret)

- WebhookSubscription: A webhook subscription that receives event deliveries at an HTTPS URL.
  - `id` string: Webhook id.
  - `url` string: HTTPS URL that receives webhook events.
  - `events` string[]: Subscribed event types (["*"] means all events).
  - `enabled` boolean: Whether the webhook is enabled.
  - `description` string: Description for the webhook.
  - `secret` string: Signing secret used to verify webhook signatures. Only included when fetching a single webhook or immediately after creation.
  - `created_at` string: ISO 8601 creation time.
  - `updated_at` string: ISO 8601 last update time.

## Other responses

- `401`: Invalid, missing, or insufficient API key permissions.

---

[API](https://skmtc.dev/postproxy/apis/postproxy-social-media-api.md) - [All operations](https://skmtc.dev/postproxy/apis/postproxy-social-media-api/llms.txt) - [OpenAPI document](https://skmtc.dev/postproxy/apis/postproxy-social-media-api/revisions/d54482ac4ce7?raw)
