Workspace API

Blog

Blog endpoints of the Zanfia Workspace API, with schemas and code samples.

6 min readLast updated Oct 23, 2026

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

GET/blog-posts

Authorization

bearerAuth
AuthorizationBearer <token>

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

POST/blog-posts

Authorization

bearerAuth
AuthorizationBearer <token>

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

GET/blog-posts/{postId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

postId*string

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

PATCH/blog-posts/{postId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

postId*string

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

DELETE/blog-posts/{postId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

postId*string

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

POST/blog-posts/{postId}/publish

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

postId*string

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

POST/blog-posts/{postId}/schedule

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

postId*string

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

GET/blog-categories

Authorization

bearerAuth
AuthorizationBearer <token>

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

POST/blog-categories

Authorization

bearerAuth
AuthorizationBearer <token>

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

PATCH/blog-categories/{categoryId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

categoryId*string

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

DELETE/blog-categories/{categoryId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

categoryId*string

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?

Related articles

Spotted something off? Tell us at support@zanfia.com.