Workspace API

Social media

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

3 min czytaniaOstatnia aktualizacja: 10 wrz 2026

Połączone konta społecznościowe i posty: szkice trafiają do widoku Posty w panelu, planowanie publikuje o wskazanej porze, natychmiastowa publikacja działa tylko dla LinkedIn. Wymaga uprawnień social:read / social:write. Wszystkie endpointy wymagają nagłówka Authorization: Bearer — zobacz Uwierzytelnianie.

Lista połączonych kont społecznościowych

GET/social/accounts

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/social/accounts"
{  "count": 0,  "accounts": [    {      "target": "string",      "network": "linkedin",      "label": "string",      "supportsScheduling": true,      "supportsImmediatePublish": true    }  ]}
{  "error": "string",  "message": "string"}

Lista postów społecznościowych

GET/social/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/social/posts"
{  "count": 0,  "posts": [    {      "id": "string",      "status": "draft",      "text": "string",      "targets": [        "string"      ],      "media": [        {          "mediaId": "string",          "url": "string",          "type": "image",          "name": "string"        }      ],      "firstComment": "string",      "scheduledAt": "string",      "publishedAt": "string",      "results": [        {          "target": "string",          "label": "string",          "permalink": "string",          "error": "string"        }      ],      "createdAt": "string",      "updatedAt": "string"    }  ]}
{  "error": "string",  "message": "string"}

Utwórz post społecznościowy

POST/social/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/social/posts" \  -H "Content-Type: application/json" \  -d '{    "text": "string",    "targets": [      "string"    ]  }'
{  "postId": "string",  "status": "draft",  "scheduledAt": "string",  "results": [    {      "target": "string",      "label": "string",      "permalink": "string",      "error": "string"    }  ]}
{  "error": "string",  "message": "string"}

Szczegóły posta

GET/social/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/social/posts/string"
{  "id": "string",  "status": "draft",  "text": "string",  "targets": [    "string"  ],  "media": [    {      "mediaId": "string",      "url": "string",      "type": "image",      "name": "string"    }  ],  "firstComment": "string",  "scheduledAt": "string",  "publishedAt": "string",  "results": [    {      "target": "string",      "label": "string",      "permalink": "string",      "error": "string"    }  ],  "createdAt": "string",  "updatedAt": "string"}
{  "error": "string",  "message": "string"}

Zaplanuj post

POST/social/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/social/posts/string/schedule" \  -H "Content-Type: application/json" \  -d '{    "scheduledAt": "string"  }'
{  "postId": "string",  "status": "draft",  "scheduledAt": "string"}
{  "error": "string",  "message": "string"}

Opublikuj post teraz

POST/social/posts/{postId}/publish

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 POST "https://example.com/social/posts/string/publish"
{  "postId": "string",  "status": "draft",  "results": [    {      "target": "string",      "label": "string",      "permalink": "string",      "error": "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.