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

# Create a webhook

`POST /webhooks`

## Request

- Base URL: `https://www.sociahive.com/api/v1`
- URL: `https://www.sociahive.com/api/v1/webhooks`
- Auth: one of:
  - API key in header `X-API-Key`
  - OAuth 2 (authorization code, authorization URL `/api/oauth/authorize`, token URL `/api/oauth/token`, scopes: `webhooks:write`)

The response carries `signing_secret` once; store it to verify deliveries.

## Request body

- CreateWebhookRequest
  - `target_url` string, uri, required: A public HTTPS URL.
  - `events` WebhookEvent[], required
  - `integration_type` 'webhook' | 'custom' | 'n8n' | 'make' | 'zapier': Defaults to `webhook`.
  - `account_ids` string[]

## Response `201`

Created

- object
  - `data` object, required: An outbound webhook subscription. Deliveries are signed with the signing secret.
    - `id` string, required: MongoDB ObjectId (24-character hex string)
    - `target_url` string, uri, required
    - `events` WebhookEvent[], required
    - `integration_type` 'webhook' | 'custom' | 'n8n' | 'make' | 'zapier', required
    - `active` boolean, required
    - `account_ids` string[], required: Connected accounts this webhook is limited to. Empty: every account.
    - `consecutive_failures` integer, required
    - `disabled_at` string, nullable, required
    - `disabled_reason` string, nullable, required
    - `last_delivery_at` string, nullable, required
    - `last_status` integer, nullable, required
    - `last_error` string, nullable, required
    - `created_at` string, required
    - `updated_at` string, required
    - `signing_secret` string, required

## Other responses

- `400`: Bad request — invalid parameters
- `401`: Authentication required — provide X-API-Key or Bearer token
- `402`: Webhook limit of your plan reached
- `403`: Insufficient scope for this operation
- `409`: A webhook with this URL already exists
- `422`: Too many active integration subscriptions
- `429`: Rate limit exceeded
- `500`: Internal server error

---

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