Skip to main content

Overview

The Content module is your centralized content library for every piece of customer-facing content that KaireonAI delivers. Author, review, approve, version, and publish content across eight channel types — from email templates and push notifications to WhatsApp messages and webhook payloads. Content items go through a structured approval workflow before they reach customers, and every edit is tracked with full version history so you can audit changes or revert at any time.

Content Items vs. Creatives

Content items are standalone, reusable pieces of content managed in your content library. They can be shared across multiple offers and campaigns — think shared disclaimers, standard footers, or frequently updated promotional blocks.Creatives are tied to a specific offer-channel combination. A creative defines what content to show when recommending Offer X on Channel Y.Use content items when you need content that lives independently and updates everywhere at once. Use creatives when content is specific to a single offer and channel pairing.

Content Types

Every content item has a channel type that determines its editor, validation rules, and delivery format.

Status Lifecycle

Every content item moves through a five-stage lifecycle. The API enforces valid transitions — you cannot skip stages.

Approval Workflow

KaireonAI enforces a review gate before content reaches customers. This prevents unreviewed content from going live.

How It Works

  1. Author creates content — The item starts in draft status.
  2. Submit for review — The author moves the item to in_review. The content is locked.
  3. Reviewer approves or rejects:
    • Approve — Moves to approved. The item is ready to publish.
    • Reject — Moves back to draft with required feedback explaining what needs to change.
  4. Publish — An editor or admin publishes the approved item, making it live.

Self-Approval Prevention

The API prevents self-approval: the user who submitted content for review cannot be the one to approve it. This enforces a four-eyes principle where at least two people are involved before content goes live.

Rejection Feedback

When rejecting content, the reviewer must provide feedback (1-2000 characters). This is required by the API and ensures the author knows exactly what to fix.
POST /api/v1/content/{id}/reject

Version History

Every content item maintains a complete version history. Versions are created automatically at two points:
  • On creation — Version 1 is recorded with the change note “Initial version” and the creating user’s ID.
  • On publish — A version snapshot is recorded each time the item is published.

Viewing Versions

Retrieve the full version history for any content item:
Returns up to 100 versions ordered by most recent first. Each version includes:
  • version — The version number
  • content — The full content payload at that point in time
  • blocks — Block structure (if applicable)
  • personalization — Personalization config at that version
  • changedBy — User ID of who made the change
  • changeNote — Description of the change
  • createdAt — Timestamp

CMS Integration

For teams that manage content outside KaireonAI, connect an external CMS to sync content automatically. KaireonAI supports four CMS providers:

Sync Modes

Each content source can sync in one of two modes:

Configuration

When creating a content source, provide:
  • name — A label for this connection (must be unique per tenant)
  • provider — One of wordpress, contentful, strapi, sanity
  • config — Provider-specific connection details (API URL, credentials, space ID, etc.)
  • syncModewebhook (default) or polling
  • syncIntervalMinutes — Polling interval in minutes (1-1440). Only used when syncMode is polling.
  • autoPublish — When true, synced content skips the approval workflow and publishes immediately. Defaults to false.
  • mappings — Field mapping from CMS fields to KaireonAI content item fields

Auto-Publish

When autoPublish is enabled on a content source, incoming content from the CMS bypasses the approval workflow and goes directly to published status. Use this for trusted sources like your corporate CMS where content has already been reviewed externally.
Enabling autoPublish skips the KaireonAI approval workflow entirely. Only enable this for content sources that have their own review process.

Creating a Content Source

POST /api/v1/content-sources
Only admin users can create or modify content sources. Editors and viewers can list existing sources but cannot change them.

Personalization Variables

Content items support dynamic personalization using {{variable}} syntax. At delivery time, KaireonAI replaces variables with actual values from several sources.

Fallback Values

Define a default fallback value for each variable in case the source data is missing. For example, set {{customer.first_name}} with a fallback of "Valued Customer" so the message reads naturally when the customer’s name is unavailable. Fallback values are configured in the personalization array on the content item, where each entry specifies the variable name, source, and default value.

Content Item Field Reference

API Quick Reference

Create a Content Item

POST /api/v1/content
Response: 201 Created with the full content item. Status is automatically set to draft. Roles: admin, editor

Approve Content

Moves an in_review item to approved. The approver cannot be the same user who submitted the item. Response: 200 OK with the updated content item. Roles: admin, editor

Reject Content

POST /api/v1/content/{id}/reject
Moves an in_review item back to draft. Feedback is required (1-2000 characters). Response: 200 OK with the updated content item. Roles: admin, editor

Publish Content

Moves an approved item to published. Sets publishedAt and creates a version snapshot. Response: 200 OK with the updated content item. Roles: admin, editor

List Versions

Returns up to 100 versions of the content item, ordered by most recent first. Response: 200 OK with an array of version objects. Roles: viewer, editor, admin

List Content Items

All query parameters are optional. Supports cursor-based pagination. Roles: viewer, editor, admin

Creatives

Tie content to specific offer-channel combinations.

Channels

Configure delivery mechanisms for your content.

Compliance & Approvals

Governance workflows for production changes.