Social media
Social media endpoints of the Zanfia Workspace API, with schemas and code samples.
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
/social/accountsAuthorization
bearerAuth 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
/social/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/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
/social/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/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
/social/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/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
/social/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/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
/social/posts/{postId}/publishAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
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?

