Create Webhook

Create a webhook subscription.

POST /v1/webhooks

Create a webhook subscription.

Auth: Bearer API key (required)

Request body

{
  "url": "https://your-server.com/webhooks/social0",
  "events": ["post.published", "post.failed", "post.scheduled", "post.deleted"]
}
FieldTypeRequiredDescription
urlstringYesHTTPS endpoint URL (public, no localhost)
eventsstring[]YesEvents to subscribe to

Available events: post.published, post.failed, post.scheduled, post.deleted

Response 201

{
  "id": "uuid",
  "url": "https://your-server.com/webhooks/social0",
  "events": ["post.published", "post.failed"],
  "active": true,
  "secret": "whsec_…",
  "created_at": "2026-07-11T14:00:00.000Z"
}

The secret is shown once. Store it immediately for signature verification.

cURL

curl -X POST https://api.social0.app/v1/webhooks \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-server.com/webhooks/social0",
    "events": ["post.published", "post.failed"]
  }'