GET /api/v1/content/
Get a content item with its parent template, source, and recent version history (up to 20 versions).Response
PUT /api/v1/content/
Update a content item. Increments the version number and creates a version snapshot automatically.Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Updated name |
content | object | No | Updated content payload |
blocks | array | No | Updated content blocks |
personalization | object | No | Updated personalization config |
200 OK
DELETE /api/v1/content/
Archive a content item (soft delete — sets status to"archived").
Response: 204 No Content
POST /api/v1/content//submit
Submit a draft content item for review. Changes status from"draft" to "in_review".
Prerequisite: Content must be in "draft" status.
Response: 200 OK
POST /api/v1/content//approve
Approve a content item that is in review. Changes status from"in_review" to "approved".
Prerequisite: Content must be in "in_review" status. The approver cannot be the same user who submitted the content (self-approval prevention).
Response: 200 OK
POST /api/v1/content//publish
Publish an approved content item. Sets status to"published" and records publishedAt. Creates a version snapshot.
Prerequisite: Content must be in "approved" status.
Response: 200 OK
POST /api/v1/content//reject
Reject a content item in review. Returns it to"draft" status.
Prerequisite: Content must be in "in_review" status.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | No | Rejection reason |
200 OK
GET /api/v1/content//versions
List all version snapshots for a content item (up to 100, newest first).Response
POST /api/v1/content//revert/
Revert a content item to a previous version. Creates a new version with the snapshot’s content and resets status to"draft".
Prerequisite: Target version must be less than the current version.
Example
200 OK with the updated content item at the new version number.
Content Lifecycle
Roles
| Endpoint | Allowed Roles |
|---|---|
GET /content/{id} | admin, editor, viewer |
PUT /content/{id} | admin, editor |
DELETE /content/{id} | admin, editor |
POST /content/{id}/submit | admin, editor |
POST /content/{id}/approve | admin, editor |
POST /content/{id}/publish | admin, editor |
POST /content/{id}/reject | admin, editor |
GET /content/{id}/versions | admin, editor, viewer |
POST /content/{id}/revert/{version} | admin, editor |