Publishing
Group accounts
The social accounts connected in one group.
https://api.sangtao.ai/v2/publishing/teams/{teamId}/accountsAuthorization
X-Api-Keystring · headerrequiredYour API key, from the API keys page of your account.
Path parameters
teamIdstringrequiredThe teamId in the path.
The group's connected accounts, refreshed from the networks before they are returned — newest first. Accounts that were disconnected are left out.
Response
idstringrequiredThe account's id, sa_…. Treat it as an opaque string
platformstringrequiredThe network
Available options:
TikTokYouTubeInstagramFacebookThreadsTwitterdisplayNamestring | nullAccount display name
usernamestring | nullAccount username
ownerDisplayNamestring | nullName of the person who connected it
avatarUrlstring | nullAvatar URL
channelIdstring | nullThe Page or channel posts go to (a Facebook account has several Pages, a YouTube account several channels)
channelNamestring | nullName of that Page or channel
pageobject | nullThe Page or channel posts go to. null where the network has none to pick
Show child attributesHide child attributes
idstringrequiredIts id on the network (as channelId)
namestringrequiredIts name
avatarUrlstring | nullIts picture
needsAttentionbooleanrequiredtrue: the page changed or was lost without you picking it — posting to this account is refused (409 ACCOUNT_NEEDS_ATTENTION) until a page is picked again on sangtao.ai
attentionReasonstring | nullWhy. null when nothing is wrong
Available options:
CHANNEL_CHANGEDCHANNEL_LOSTexpectedChannelobject | nullThe page you picked, { id, name } — only when needsAttention
actualChannelobject | nullThe page the network switched to, { id, name } — CHANNEL_CHANGED only
attentionAtstring | nullWhen it was noticed (ISO 8601, UTC)
isConnectedbooleanrequiredAlways true here — only connected accounts are listed
connectedAtstringrequiredWhen it was connected (ISO 8601, UTC)
disconnectedAtstring | nullWhen it was last disconnected, if ever
Errors
| Status | errorCode | When |
|---|---|---|
| 404 | TEAM_NOT_FOUND | No group of yours with this teamId |
/publishing/teams/{teamId}/accountscurl "https://api.sangtao.ai/v2/publishing/teams/3fa85f64-5717-4562-b3fc-2c963f66afa6/accounts" \
-H "X-Api-Key: YOUR_API_KEY"{
"success": true,
"data": [
{
"id": "sa_7mR2xLq5D",
"platform": "Facebook",
"displayName": "Your Page",
"username": "yourpage",
"ownerDisplayName": "Jane Doe",
"avatarUrl": "https://cdn.example.com/avatar.jpg",
"channelId": "1234567890",
"channelName": "Your Page",
"page": {
"id": "1234567890",
"name": "Your Page",
"avatarUrl": "https://cdn.example.com/page.jpg"
},
"needsAttention": false,
"attentionReason": null,
"expectedChannel": null,
"actualChannel": null,
"attentionAt": null,
"isConnected": true,
"connectedAt": "2026-11-01T10:05:00Z",
"disconnectedAt": null
}
]
}/publishing/teams/{teamId}/accountscurl "https://api.sangtao.ai/v2/publishing/teams/3fa85f64-5717-4562-b3fc-2c963f66afa6/accounts" \
-H "X-Api-Key: YOUR_API_KEY"{
"success": true,
"data": [
{
"id": "sa_7mR2xLq5D",
"platform": "Facebook",
"displayName": "Your Page",
"username": "yourpage",
"ownerDisplayName": "Jane Doe",
"avatarUrl": "https://cdn.example.com/avatar.jpg",
"channelId": "1234567890",
"channelName": "Your Page",
"page": {
"id": "1234567890",
"name": "Your Page",
"avatarUrl": "https://cdn.example.com/page.jpg"
},
"needsAttention": false,
"attentionReason": null,
"expectedChannel": null,
"actualChannel": null,
"attentionAt": null,
"isConnected": true,
"connectedAt": "2026-11-01T10:05:00Z",
"disconnectedAt": null
}
]
}