Documentation Index
Fetch the complete documentation index at: https://docs.kaireonai.com/llms.txt
Use this file to discover all available pages before exploring further.
The CMS Webhook endpoint receives real-time content update notifications from external CMS providers (Contentful, Strapi, Sanity, etc.). Each content source has a unique webhook URL.
POST /api/v1/cms/webhook/
Receive a webhook notification when content is created or updated in the CMS.
Path Parameters
| Parameter | Type | Required | Description |
|---|
sourceId | string | Yes | Content source ID (UUID format) |
| Header | Required | Description |
|---|
X-Webhook-Signature | Yes | HMAC-SHA256 signature of the raw body |
Request Body
The body format depends on the CMS provider. The platform extracts the external content ID from common fields:
id (generic)
sys.id (Contentful)
_id (Sanity/MongoDB-style)
Behavior
- Verifies the webhook signature against the source’s stored secret
- Extracts the external content ID from the payload
- Fetches the full content item from the CMS via the configured adapter
- Upserts the content item into KaireonAI (creates or increments version)
- If
autoPublish is enabled on the source, the content is published immediately
Response
Error Responses
| Status | Description |
|---|
| 400 | Invalid source ID format |
| 401 | Invalid webhook signature |
| 403 | Webhook secret not configured for this source |
| 404 | Content source not found |
Setting Up CMS Webhooks
- Create a content source via
POST /api/v1/content-sources with a webhookSecret
- Configure your CMS to send webhooks to:
https://your-domain.com/api/v1/cms/webhook/{sourceId}
- Set the
X-Webhook-Signature header to sha256=<hmac-hex> using the webhook secret