---
title: "Create webhook endpoint"
method: POST
path: "/webhook_endpoints"
tags: ["webhook_endpoints"]
---

# Create webhook endpoint

`POST /webhook_endpoints`

## Request

- Base URL: `https://www.socialfaktory.com/v1`
- URL: `https://www.socialfaktory.com/v1/webhook_endpoints`
- Auth: HTTP bearer

Register an https URL that hears about the work this connection can read: post.scheduled, post.published, post.failed, generation.finished and text_generation.finished. Each event is a POST of JSON with its id, type, created_at and data (object, id, brand_id, status); read the object through its GET. The SocialFaktory-Signature header carries t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>" under the secret>. Reject a t older than 5 minutes, and dedupe on the event id, since a retry resends the same event. The secret is shown in this answer only, and again to a retry of this call under the same idempotency key. A connection holds at most 5 endpoints, and one whose deliveries fail 10 events in a row turns disabled.

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `url` string, required

## Response `201`

Create webhook endpoint

- object
  - `id` string, required
  - `url` string, required
  - `status` string, required
  - `secret` string, required

## Other responses

- `default`: The error envelope

---

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