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.
TypeKeyDescriptionUse Case
Email HTMLemail_htmlRich HTML email with images, buttons, and layout blocksMarketing campaigns, transactional emails, newsletters
Push Notificationpush_notificationMobile push title and body text with character limitsTime-sensitive alerts, re-engagement nudges
SMS Textsms_textShort message content with segment countingAppointment reminders, verification codes, flash offers
In-App Modalin_app_modalDialog overlay with CTA buttons and rich contentFeature announcements, upgrade prompts, surveys
BannerbannerDisplay content with images for web or app surfacesPromotional banners, seasonal campaigns
Content Cardcontent_cardCard-style content for feeds, lists, or carouselsActivity feeds, recommendation cards, news updates
WhatsApp Templatewhatsapp_templateWhatsApp Business API message template with variable placeholdersCustomer support, order updates, appointment confirmations
Webhook JSONwebhook_jsonCustom JSON payload for API-driven integrationsThird-party system triggers, custom channel adapters

Status Lifecycle

Every content item moves through a five-stage lifecycle. The API enforces valid transitions — you cannot skip stages.
StatusTriggerWho Can TriggerWhat Happens
draftContent is created or rejectedEditor, AdminContent is editable. Not visible to customers.
in_reviewAuthor submits for reviewEditor, AdminContent is locked for editing. Awaiting approval.
approvedReviewer approves the itemEditor, Admin (not the submitter)Content is approved but not yet live.
publishedPublisher pushes content liveEditor, AdminContent becomes available for delivery. publishedAt timestamp is set. A version snapshot is recorded.
archivedContent is retiredEditor, AdminContent is no longer delivered but remains in history.

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
{
  "feedback": "The disclaimer text is outdated — please use the Q2 2026 version from Legal."
}

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:
GET /api/v1/content/{id}/versions
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:
ProviderKeyDescription
WordPresswordpressREST API integration with WordPress sites
ContentfulcontentfulHeadless CMS with structured content models
StrapistrapiOpen-source headless CMS with customizable APIs
SanitysanityReal-time collaborative content platform

Sync Modes

Each content source can sync in one of two modes:
ModeKeyDescription
WebhookwebhookCMS pushes updates to KaireonAI in real time. Recommended for most setups.
PollingpollingKaireonAI pulls updates on a schedule. Set syncIntervalMinutes (1-1440 minutes).

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
{
  "name": "Corporate Blog - Contentful",
  "provider": "contentful",
  "config": {
    "spaceId": "abc123",
    "accessToken": "••••••••",
    "environment": "master"
  },
  "syncMode": "webhook",
  "autoPublish": false,
  "mappings": {
    "title": "name",
    "body": "content.html",
    "heroImage": "content.imageUrl"
  }
}
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.
SourceSyntaxExampleDescription
Customer fields{{customer.field_name}}{{customer.first_name}}Enriched data from schema tables
Offer fields{{offer.field_name}}{{offer.name}}Fields from the recommended offer
Computed values{{computed.field_name}}{{computed.personalized_rate}}Values calculated by the formula engine
Request attributes{{attributes.field_name}}{{attributes.tier}}Attributes passed in the Recommend API request

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

FieldTypeDescription
idstringUnique identifier (auto-generated)
tenantIdstringTenant this item belongs to
namestringDisplay name (1-255 chars, unique per tenant)
descriptionstring | nullOptional description (max 1000 chars)
channelTypeenumOne of the eight content types listed above
statusenumdraft, in_review, approved, published, archived
contentobjectChannel-specific content payload (key-value pairs)
blocksarray | nullStructured content blocks for visual editors
personalizationarray | nullPersonalization variable definitions with fallbacks
parentTemplateIdstring | nullID of the template this item was created from
isTemplatebooleanWhether this item is a reusable template
sourceTypeenuminternal, wordpress, contentful, strapi, sanity
externalIdstring | nullID in the external CMS (for synced content)
sourceIdstring | nullReference to the ContentSource record
versionnumberCurrent version number
publishedAtdatetime | nullWhen the item was last published
createdAtdatetimeCreation timestamp
updatedAtdatetimeLast modification timestamp

API Quick Reference

Create a Content Item

POST /api/v1/content
{
  "name": "Spring Promo - Email Header",
  "channelType": "email_html",
  "content": {
    "subject": "Your exclusive spring offer, {{customer.first_name}}",
    "html": "<h1>Spring Sale</h1><p>Save {{computed.discount_pct}}% today.</p>"
  },
  "personalization": [
    { "variable": "customer.first_name", "fallback": "Valued Customer" },
    { "variable": "computed.discount_pct", "fallback": "20" }
  ],
  "isTemplate": false
}
Response: 201 Created with the full content item. Status is automatically set to draft. Roles: admin, editor

Approve Content

POST /api/v1/content/{id}/approve
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
{
  "feedback": "Please update the legal disclaimer to the latest version."
}
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

POST /api/v1/content/{id}/publish
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

GET /api/v1/content/{id}/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

GET /api/v1/content?status=published&channelType=email_html&isTemplate=false
All query parameters are optional. Supports cursor-based pagination.
ParameterTypeDescription
statusstringFilter by status (draft, in_review, approved, published, archived)
channelTypestringFilter by channel type
isTemplatebooleanFilter templates vs. content items
sourceTypestringFilter by source (internal, wordpress, etc.)
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.