POST /api/v1/cms/webhook/
Receive a webhook notification when content is created or updated in the CMS.Path Parameters
Headers
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
autoPublishis enabled on the source, the content is published immediately
Response
Error Responses
Setting Up CMS Webhooks
- Create a content source via
POST /api/v1/content-sourceswith awebhookSecret - Configure your CMS to send webhooks to:
https://your-domain.com/api/v1/cms/webhook/{sourceId} - Set the
X-Webhook-Signatureheader tosha256=<hmac-hex>using the webhook secret