Workspace API

Social media

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

3 min readLast updated Sep 10, 2026

Connected social accounts and posts: drafts land in the dashboard Posts view, scheduling publishes at a set time, immediate publish is LinkedIn-only. Requires the social:read / social:write scopes. All routes require a Authorization: Bearer header — see Authentication.

List connected social accounts

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

List social posts

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

Create a social post

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

Social post detail

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

Schedule a social 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"}

Publish a social post now

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

Was this article helpful?

Related articles

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