Content
CRUD operations for site content, scoped to the authenticated user's site.
Retrieves content items for the authenticated user's site with pagination, sorting, and filtering.
page?integerPage number
1 <= value1limit?integerItems per page
1 <= value <= 10020sort?stringSort field
"updated_at""created_at""updated_at""published_at""title"status?stringFilter by status
"draft""published"type?stringFilter by content type
"post""page"Content list
application/json- response
data*array<>meta*curl -X GET 'https://example.com/api/content'{ "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1", "authorId": "string", "title": "string", "slug": "string", "body": {}, "status": "draft", "contentType": "post", "excerpt": "string", "featureImage": "http://example.com", "metaTitle": "string", "metaDescription": "string", "ogImage": "http://example.com", "publishedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ], "meta": { "total": 0, "page": 0, "limit": 0, "pages": 0 }}Creates a new content item for the authenticated user's site. Slug is auto-generated from title if not provided.
application/json- body
title*stringContent title
1 <= lengthbody?|JSON content body
status?string"draft""draft""published"slug?stringURL slug (auto-generated from title if omitted)
contentType?string"post""post""page"excerpt?stringlength <= 500featureImage?stringurimetaTitle?stringlength <= 300metaDescription?stringlength <= 500ogImage?stringuriContent created
application/json- response
id*stringuuidsiteId*stringuuidauthorId*stringtitle*stringslug?stringbody?|JSON content body
status*string"draft""published"contentType*string"post""page"excerpt?stringfeatureImage?stringurimetaTitle?stringmetaDescription?stringogImage?stringuripublishedAt?stringdate-timecreatedAt*stringdate-timeupdatedAt*stringdate-timecurl -X POST 'https://example.com/api/content' \ -H 'Content-Type: application/json' \ -d '{ "title": "string"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1", "authorId": "string", "title": "string", "slug": "string", "body": {}, "status": "draft", "contentType": "post", "excerpt": "string", "featureImage": "http://example.com", "metaTitle": "string", "metaDescription": "string", "ogImage": "http://example.com", "publishedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}Retrieves a single content item by ID for the authenticated user's site.
id*stringContent ID
uuidContent item
application/json- response
id*stringuuidsiteId*stringuuidauthorId*stringtitle*stringslug?stringbody?|JSON content body
status*string"draft""published"contentType*string"post""page"excerpt?stringfeatureImage?stringurimetaTitle?stringmetaDescription?stringogImage?stringuripublishedAt?stringdate-timecreatedAt*stringdate-timeupdatedAt*stringdate-timecurl -X GET 'https://example.com/api/content/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1", "authorId": "string", "title": "string", "slug": "string", "body": {}, "status": "draft", "contentType": "post", "excerpt": "string", "featureImage": "http://example.com", "metaTitle": "string", "metaDescription": "string", "ogImage": "http://example.com", "publishedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}Updates an existing content item for the authenticated user's site.
id*stringContent ID
uuidapplication/json- body
title?string1 <= lengthbody?|nullstatus?string"draft""published"slug?stringexcerpt?stringlength <= 500featureImage?stringurimetaTitle?stringlength <= 300metaDescription?stringlength <= 500ogImage?stringuriContent updated
application/json- response
id*stringuuidsiteId*stringuuidauthorId*stringtitle*stringslug?stringbody?|JSON content body
status*string"draft""published"contentType*string"post""page"excerpt?stringfeatureImage?stringurimetaTitle?stringmetaDescription?stringogImage?stringuripublishedAt?stringdate-timecreatedAt*stringdate-timeupdatedAt*stringdate-timecurl -X PUT 'https://example.com/api/content/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1", "authorId": "string", "title": "string", "slug": "string", "body": {}, "status": "draft", "contentType": "post", "excerpt": "string", "featureImage": "http://example.com", "metaTitle": "string", "metaDescription": "string", "ogImage": "http://example.com", "publishedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}Deletes a content item for the authenticated user's site. This action cannot be undone.
id*stringContent ID
uuidContent deleted
curl -X DELETE 'https://example.com/api/content/497f6eca-6276-4993-bfeb-53cbbbba6f08'Publishes a content item, setting status to published and publishedAt timestamp.
id*stringuuidContent published
application/json- response
id*stringuuidsiteId*stringuuidauthorId*stringtitle*stringslug?stringbody?|JSON content body
status*string"draft""published"contentType*string"post""page"excerpt?stringfeatureImage?stringurimetaTitle?stringmetaDescription?stringogImage?stringuripublishedAt?stringdate-timecreatedAt*stringdate-timeupdatedAt*stringdate-timecurl -X POST 'https://example.com/api/content/497f6eca-6276-4993-bfeb-53cbbbba6f08/publish'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1", "authorId": "string", "title": "string", "slug": "string", "body": {}, "status": "draft", "contentType": "post", "excerpt": "string", "featureImage": "http://example.com", "metaTitle": "string", "metaDescription": "string", "ogImage": "http://example.com", "publishedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}Unpublishes a content item, setting status back to draft.
id*stringuuidContent unpublished
application/json- response
id*stringuuidsiteId*stringuuidauthorId*stringtitle*stringslug?stringbody?|JSON content body
status*string"draft""published"contentType*string"post""page"excerpt?stringfeatureImage?stringurimetaTitle?stringmetaDescription?stringogImage?stringuripublishedAt?stringdate-timecreatedAt*stringdate-timeupdatedAt*stringdate-timecurl -X POST 'https://example.com/api/content/497f6eca-6276-4993-bfeb-53cbbbba6f08/unpublish'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1", "authorId": "string", "title": "string", "slug": "string", "body": {}, "status": "draft", "contentType": "post", "excerpt": "string", "featureImage": "http://example.com", "metaTitle": "string", "metaDescription": "string", "ogImage": "http://example.com", "publishedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}Lists all version snapshots for a content item with pagination.
id*stringuuidpage?integer1 <= value1limit?integer1 <= value <= 10020Version list
application/json- response
versions*array<>pagination*curl -X GET 'https://example.com/api/content/497f6eca-6276-4993-bfeb-53cbbbba6f08/versions'{ "versions": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "contentId": "21aa1683-ca25-4edf-bc18-01ad04a4821b", "version": 0, "title": "string", "body": {}, "createdAt": "2019-08-24T14:15:22Z" } ], "pagination": { "total": 0, "page": 0, "limit": 0, "pages": 0 }}Creates a new version snapshot of the current content state.
id*stringuuidVersion created
application/json- response
id*stringuuidcontentId*stringuuidversion*integertitle*stringbody?|nullcreatedAt*stringdate-timecurl -X POST 'https://example.com/api/content/497f6eca-6276-4993-bfeb-53cbbbba6f08/versions'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "contentId": "21aa1683-ca25-4edf-bc18-01ad04a4821b", "version": 0, "title": "string", "body": {}, "createdAt": "2019-08-24T14:15:22Z"}Retrieves a specific version snapshot of a content item.
id*stringuuidversion*integer1 <= valueVersion details
application/json- response
id*stringuuidcontentId*stringuuidversion*integertitle*stringbody?|nullcreatedAt*stringdate-timecurl -X GET 'https://example.com/api/content/497f6eca-6276-4993-bfeb-53cbbbba6f08/versions/1'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "contentId": "21aa1683-ca25-4edf-bc18-01ad04a4821b", "version": 0, "title": "string", "body": {}, "createdAt": "2019-08-24T14:15:22Z"}Restores content to a previous version. Creates a snapshot of current state before restoring.
id*stringuuidversion*integer1 <= valueVersion restored
application/json- response
restored*booleannewVersion*integercurl -X POST 'https://example.com/api/content/497f6eca-6276-4993-bfeb-53cbbbba6f08/versions/1/restore'{ "restored": true, "newVersion": 0}