Skip to Content
EmbedEmbed APISocial Accounts

Social Accounts

Endpoints for working with the social accounts connected to your workspace. These are the accounts you publish to when creating scheduled posts.

All endpoints require the embed-api-key header — see Authentication.


List social accounts

GET /social-account

Returns every connected social account in your workspace, grouped by platform.

Response 200

The socialAccounts object always contains all four supported platform keys. Each is an array, empty when no accounts are connected for that platform.

{ "success": true, "data": { "socialAccounts": { "linkedin": [ { "id": "cmqi7jyir0003v0m91hxnyyaq", "platformType": "linkedin", "accountHandle": "postnitroai-co", "accountType": "organization", "accountName": "PostNitro", "accountLogo": "https://...", "accessTokenStatus": "active" } ], "instagram": [], "tiktok": [], "threads": [] } } }

A workspace with no connected accounts still returns 200 with all four arrays empty.


Read a social account

GET /social-account/:id

Returns a single connected account along with its scheduled-post usage, broken down by status.

Path parameters

ParameterDescription
idThe social-account id. Must belong to your workspace.

Response 200

{ "success": true, "data": { "socialAccount": { "id": "cmqi7jyir0003v0m91hxnyyaq", "organizationId": "org_123", "workspaceId": "ws_456", "platformType": "linkedin", "accountHandle": "postnitroai-co", "accountName": "PostNitro", "accountLogo": "https://...", "accessTokenStatus": "active", "tokenExpiresAt": "2026-09-01T00:00:00.000Z", "createdAt": "2026-05-01T12:00:00.000Z", "updatedAt": "2026-05-01T12:00:00.000Z" }, "usage": [ { "status": "PENDING", "_count": 3 }, { "status": "PUBLISHED", "_count": 12 } ] } }

usage is the count of scheduled-post links for this account, grouped by their publish status.

Errors

StatusBodyWhen
404{ "success": false, "message": "Social account not found" }No account with that id in your workspace.

Disconnect a social account

DELETE /social-account/:id

Deletes the connected account and removes it from every scheduled post it was attached to.

Path parameters

ParameterDescription
idThe social-account id. Must belong to your workspace.

Response 200

{ "success": true, "message": "Social account deleted successfully" }

Errors

StatusBodyWhen
404{ "success": false, "message": "Social account not found" }No account with that id in your workspace.
400{ "success": false, "message": "Failed to delete social account" }The delete did not complete.

Validation & common errors

StatusmessageWhen
422Social account id is required:id missing on read/delete.
401 / 402See AuthenticationMissing key or unqualified plan.
500Error fetching Social Accounts / Error fetching Social Account / Error deleting Social AccountUnexpected server error (error field carries the detail).
Last updated on