sangtao.ai
API key

Publishing

Group accounts

The social accounts connected in one group.

GEThttps://api.sangtao.ai/v2/publishing/teams/{teamId}/accounts

Authorization

  • X-Api-Keystring · headerrequired

    Your API key, from the API keys page of your account.

Path parameters

  • teamIdstringrequired

    The 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

  • idstringrequired

    The account's id, sa_…. Treat it as an opaque string

  • platformstringrequired

    The network

    Available options:TikTokYouTubeInstagramFacebookThreadsTwitter

  • displayNamestring | null

    Account display name

  • usernamestring | null

    Account username

  • ownerDisplayNamestring | null

    Name of the person who connected it

  • avatarUrlstring | null

    Avatar URL

  • channelIdstring | null

    The Page or channel posts go to (a Facebook account has several Pages, a YouTube account several channels)

  • channelNamestring | null

    Name of that Page or channel

  • pageobject | null

    The Page or channel posts go to. null where the network has none to pick

    Show child attributes
    • idstringrequired

      Its id on the network (as channelId)

    • namestringrequired

      Its name

    • avatarUrlstring | null

      Its picture

  • needsAttentionbooleanrequired

    true: 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 | null

    Why. null when nothing is wrong

    Available options:CHANNEL_CHANGEDCHANNEL_LOST

  • expectedChannelobject | null

    The page you picked, { id, name } — only when needsAttention

  • actualChannelobject | null

    The page the network switched to, { id, name } — CHANNEL_CHANGED only

  • attentionAtstring | null

    When it was noticed (ISO 8601, UTC)

  • isConnectedbooleanrequired

    Always true here — only connected accounts are listed

  • connectedAtstringrequired

    When it was connected (ISO 8601, UTC)

  • disconnectedAtstring | null

    When it was last disconnected, if ever

Errors

StatuserrorCodeWhen
404TEAM_NOT_FOUNDNo group of yours with this teamId
GET/publishing/teams/{teamId}/accounts
curl "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
    }
  ]
}