Content
CRUD operations for site content, scoped to the authenticated user's site.
List content for site
Retrieves content items for the authenticated user's site with pagination, sorting, and filtering.
Query Parameters
Page number
11 <= valueItems per page
201 <= value <= 100Sort field
"updated_at""created_at" | "updated_at" | "published_at" | "title"Filter by status
"draft" | "published"Filter by content type
"post" | "page"Response Body
application/json
application/json
curl -X GET "https://loading/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
}
}{
"error": "string"
}Create content
Creates a new content item for the authenticated user's site. Slug is auto-generated from title if not provided.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://loading/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"
}{
"error": "string",
"details": [
{
"code": "string",
"message": "string",
"path": [
"string"
]
}
]
}{
"error": "string"
}{
"error": "string"
}{
"error": "string"
}Get content by ID
Retrieves a single content item by ID for the authenticated user's site.
Path Parameters
Content ID
uuidResponse Body
application/json
application/json
application/json
curl -X GET "https://loading/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"
}{
"error": "string"
}{
"error": "string"
}Update content
Updates an existing content item for the authenticated user's site.
Path Parameters
Content ID
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://loading/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"
}{
"error": "string",
"details": [
{
"code": "string",
"message": "string",
"path": [
"string"
]
}
]
}{
"error": "string"
}{
"error": "string"
}{
"error": "string"
}Delete content
Deletes a content item for the authenticated user's site. This action cannot be undone.
Path Parameters
Content ID
uuidResponse Body
application/json
application/json
curl -X DELETE "https://loading/api/content/497f6eca-6276-4993-bfeb-53cbbbba6f08"{
"error": "string"
}{
"error": "string"
}Publish content
Publishes a content item, setting status to published and publishedAt timestamp.
Path Parameters
uuidResponse Body
application/json
application/json
application/json
application/json
curl -X POST "https://loading/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"
}{
"error": "string",
"details": [
{
"code": "string",
"message": "string",
"path": [
"string"
]
}
]
}{
"error": "string"
}{
"error": "string"
}Unpublish content
Unpublishes a content item, setting status back to draft.
Path Parameters
uuidResponse Body
application/json
application/json
application/json
curl -X POST "https://loading/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"
}{
"error": "string"
}{
"error": "string"
}List content versions
Lists all version snapshots for a content item with pagination.
Path Parameters
uuidQuery Parameters
11 <= value201 <= value <= 100Response Body
application/json
application/json
application/json
curl -X GET "https://loading/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
}
}{
"error": "string"
}{
"error": "string"
}Create version snapshot
Creates a new version snapshot of the current content state.
Path Parameters
uuidResponse Body
application/json
application/json
application/json
curl -X POST "https://loading/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"
}{
"error": "string"
}{
"error": "string"
}Get specific version
Retrieves a specific version snapshot of a content item.
Path Parameters
uuid1 <= valueResponse Body
application/json
application/json
application/json
curl -X GET "https://loading/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"
}{
"error": "string"
}{
"error": "string"
}Restore version
Restores content to a previous version. Creates a snapshot of current state before restoring.
Path Parameters
uuid1 <= valueResponse Body
application/json
application/json
application/json
curl -X POST "https://loading/api/content/497f6eca-6276-4993-bfeb-53cbbbba6f08/versions/1/restore"{
"restored": true,
"newVersion": 0
}{
"error": "string"
}{
"error": "string"
}