Skip to main content
The Content Management Service (CMS) is a full CRUD API for creating and managing content. It is strictly a server-side API — never call it from a browser or expose its credentials publicly.
This quickstart covers creating and publishing content. To fetch content for your frontend, see the Fetch Content (CDS) quickstart.

Prerequisites

You need three values from the Publive Dashboard:
ValueWhere to find it
API KeyDashboard → Configurations → API Developer Hub → View API Credentials
API SecretSame location as above
Publisher IDVisible in your Dashboard URL

Step 1: Build your auth token

The CMS uses HTTP Basic Auth. Encode your key and secret:
echo -n 'YOUR_API_KEY:YOUR_API_SECRET' | base64
Store the result as environment variables:
export PUBLIVE_AUTH="dXNlcjpwYXNz"
export PUBLIVE_PUBLISHER_ID="12345"
The CMS API key has write access. Store it only in server-side environment variables — never in client-side code, public repositories, or build artifacts.

Step 2: Create a category

Every published post requires a primary_category. Create one first:
curl -X POST \
  "https://cms.thepublive.com/publisher/${PUBLIVE_PUBLISHER_ID}/category/" \
  -H "Authorization: Basic ${PUBLIVE_AUTH}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Technology",
    "english_name": "Technology"
  }'
Response:
{
  "id": 42,
  "name": "Technology",
  "english_name": "Technology",
  "slug": "technology",
  "parent_category": null
}
Note the id from the response — you’ll need it when creating posts.

Step 3: Create a draft post

Create a post in Draft status. Drafts are not publicly visible via the CDS:
curl -X POST \
  "https://cms.thepublive.com/publisher/${PUBLIVE_PUBLISHER_ID}/post/" \
  -H "Authorization: Basic ${PUBLIVE_AUTH}" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "My First API Post",
    "english_title": "My First API Post",
    "type": "Article",
    "status": "Draft",
    "primary_category": 42,
    "content": "<p>This post was created via the Publive CMS API.</p>"
  }'
Response:
{
  "id": 9001,
  "title": "My First API Post",
  "slug": "my-first-api-post",
  "type": "Article",
  "status": "Draft",
  "primary_category": {
    "id": 42,
    "name": "Technology",
    "slug": "technology"
  },
  "created_at": "2026-04-15T10:00:00Z",
  "updated_at": "2026-04-15T10:00:00Z"
}

Step 4: Publish the post

Update the post status from Draft to Published using a PATCH request:
curl -X PATCH \
  "https://cms.thepublive.com/publisher/${PUBLIVE_PUBLISHER_ID}/post/9001/" \
  -H "Authorization: Basic ${PUBLIVE_AUTH}" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "Published"
  }'
If your organisation uses an approval workflow, submit for review first by setting status to Approval Pending. An approver then publishes the post. See Approval Flows for details.

Step 5: Verify via CDS

Confirm the post is publicly available by fetching it from the CDS:
curl -X GET \
  "https://cds.thepublive.com/publisher/${PUBLIVE_PUBLISHER_ID}/post/9001/" \
  -H "Authorization: Basic ${PUBLIVE_AUTH}"
A successful response means the post is live and being served to your frontend.

Step 6: Schedule or backdate (optional)

Publish at a future time by setting scheduled_at instead of status: Published:
curl -X PATCH \
  "https://cms.thepublive.com/publisher/${PUBLIVE_PUBLISHER_ID}/post/9001/" \
  -H "Authorization: Basic ${PUBLIVE_AUTH}" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "Scheduled",
    "scheduled_at": "2026-05-01T09:00:00Z"
  }'
To backdate a migrated post, set published_at to a past timestamp along with status: Published.

Content state machine

Posts move through these states. Only valid transitions are accepted by the API:
Draft → Approval Pending → Published
Draft →                    Published
Draft →                    Scheduled → Published
Published → Draft
See State Management for the complete transition table and access control rules.

What’s next?

Fetch Content (CDS)

Serve your published content to a frontend

Editorial Workflows

Set up maker-checker and approval flows

CMS API Reference

Full endpoint reference for all CMS routes

JavaScript SDK

Use the official SDK for typed CMS operations