Blog
Blog endpoints of the Zanfia Workspace API, with schemas and code samples.
The workspace blog (Your site → Blog): Markdown posts served at /blog/{slug} on your store host, with an RSS feed at /blog/feed. A post is created as a draft, visible to your team only, and goes public with the publish route (now) or the schedule route (at a set time; scheduledAt: null takes it back to draft). Publishing needs a non-empty body (400 otherwise) and a slug you set must be free (409). Categories group posts: each post sits in at most 3 of them (categoryIds); deleting a category takes it off its posts and leaves the posts as they are. Reading needs the pages:read scope, every write pages:write. All routes require a Authorization: Bearer header — see Authentication.
List blog posts
/blog-postsAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/blog-posts"{ "count": 0, "posts": [ { "id": "string", "slug": "string", "title": "string", "excerpt": "string", "coverImageUrl": "string", "tags": [ "string" ], "status": "draft", "publishedAt": "string", "scheduledAt": "string", "categoryIds": [ "string" ], "createdAt": "string", "updatedAt": "string" } ]}{ "error": "string", "message": "string"}Create a blog post
/blog-postsAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/blog-posts" \ -H "Content-Type: application/json" \ -d '{ "title": "string" }'{ "id": "string", "slug": "string", "title": "string", "excerpt": "string", "coverImageUrl": "string", "tags": [ "string" ], "status": "draft", "publishedAt": "string", "scheduledAt": "string", "categoryIds": [ "string" ], "createdAt": "string", "updatedAt": "string", "content": "string", "seo": { "title": "string", "description": "string", "noindex": true }}{ "error": "string", "message": "string"}Blog post detail
/blog-posts/{postId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/blog-posts/string"{ "id": "string", "slug": "string", "title": "string", "excerpt": "string", "coverImageUrl": "string", "tags": [ "string" ], "status": "draft", "publishedAt": "string", "scheduledAt": "string", "categoryIds": [ "string" ], "createdAt": "string", "updatedAt": "string", "content": "string", "seo": { "title": "string", "description": "string", "noindex": true }}{ "error": "string", "message": "string"}Update a blog post
/blog-posts/{postId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/blog-posts/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "slug": "string", "title": "string", "excerpt": "string", "coverImageUrl": "string", "tags": [ "string" ], "status": "draft", "publishedAt": "string", "scheduledAt": "string", "categoryIds": [ "string" ], "createdAt": "string", "updatedAt": "string", "content": "string", "seo": { "title": "string", "description": "string", "noindex": true }}{ "error": "string", "message": "string"}Delete a blog post
/blog-posts/{postId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X DELETE "https://example.com/blog-posts/string"{ "postId": "string"}{ "error": "string", "message": "string"}Publish or unpublish a blog post
/blog-posts/{postId}/publishAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/blog-posts/string/publish" \ -H "Content-Type: application/json" \ -d '{ "publish": true }'{ "id": "string", "slug": "string", "title": "string", "excerpt": "string", "coverImageUrl": "string", "tags": [ "string" ], "status": "draft", "publishedAt": "string", "scheduledAt": "string", "categoryIds": [ "string" ], "createdAt": "string", "updatedAt": "string", "content": "string", "seo": { "title": "string", "description": "string", "noindex": true }}{ "error": "string", "message": "string"}Schedule a blog post
/blog-posts/{postId}/scheduleAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/blog-posts/string/schedule" \ -H "Content-Type: application/json" \ -d '{ "scheduledAt": "string" }'{ "id": "string", "slug": "string", "title": "string", "excerpt": "string", "coverImageUrl": "string", "tags": [ "string" ], "status": "draft", "publishedAt": "string", "scheduledAt": "string", "categoryIds": [ "string" ], "createdAt": "string", "updatedAt": "string", "content": "string", "seo": { "title": "string", "description": "string", "noindex": true }}{ "error": "string", "message": "string"}List blog categories
/blog-categoriesAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/blog-categories"{ "count": 0, "categories": [ { "id": "string", "name": "string", "slug": "string", "description": "string", "seo": { "title": "string", "description": "string" }, "postCount": 0, "createdAt": "string", "updatedAt": "string" } ]}{ "error": "string", "message": "string"}Create a blog category
/blog-categoriesAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/blog-categories" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "id": "string", "name": "string", "slug": "string", "description": "string", "seo": { "title": "string", "description": "string" }, "postCount": 0, "createdAt": "string", "updatedAt": "string"}{ "error": "string", "message": "string"}Update a blog category
/blog-categories/{categoryId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/blog-categories/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "name": "string", "slug": "string", "description": "string", "seo": { "title": "string", "description": "string" }, "postCount": 0, "createdAt": "string", "updatedAt": "string"}{ "error": "string", "message": "string"}Delete a blog category
/blog-categories/{categoryId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X DELETE "https://example.com/blog-categories/string"{ "categoryId": "string"}{ "error": "string", "message": "string"}Was this article helpful?

