Workspace API

Blog

Endpointy „Blog” Zanfia Workspace API — ze schematami i przykładami kodu.

6 min czytaniaOstatnia aktualizacja: 23 paź 2026

Blog konta (Twoja strona → Blog): wpisy w Markdown serwowane pod /blog/{slug} w domenie Twojego sklepu, z kanałem RSS pod /blog/feed. Wpis powstaje jako szkic widoczny tylko dla zespołu i staje się publiczny po wywołaniu endpointu publikacji (od razu) albo planowania (o wybranej porze; scheduledAt: null cofa go do szkicu). Publikacja wymaga treści (inaczej 400), a podany slug musi być wolny (409). Kategorie grupują wpisy: każdy wpis należy do najwyżej 3 z nich (categoryIds); usunięcie kategorii zdejmuje ją z wpisów, a same wpisy zostają bez zmian. Odczyt wymaga scope’u pages:read, każdy zapis pages:write. Wszystkie endpointy wymagają nagłówka Authorization: Bearer — zobacz Uwierzytelnianie.

Lista wpisów na blogu

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"}

Utwórz wpis na blogu

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"}

Szczegóły wpisu na blogu

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"}

Zmień wpis na blogu

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"}

Usuń wpis z bloga

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"}

Opublikuj lub cofnij publikację wpisu

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"}

Zaplanuj publikację wpisu

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"}

Lista kategorii bloga

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"}

Utwórz kategorię bloga

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"}

Zmień kategorię bloga

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"}

Usuń kategorię bloga

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"}

Czy ten artykuł był pomocny?

Powiązane artykuły

Coś się nie zgadza? Napisz do nas na support@zanfia.com.