List Connected Accounts
List active connected social media accounts. Returns account IDs needed for the accountId parameter in publish_post. Only shows accounts with status "active" (c
list_accounts
List active connected social media accounts. Returns account IDs needed for the accountId parameter in publish_post. Only shows accounts with status "active" (connected and authorized).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
platform | instagram | twitter | x | linkedin | tiktok | youtube | no | Filter by platform. Omit to return all connected accounts. |
workspaceId | string | no | Workspace ID. Required if your API key accesses multiple workspaces. |
When to use
Discover which social accounts are connected to a workspace. Every publish_post call needs an accountId — this is where you get it.
Typical flow: agent starts a conversation with an end user, calls list_accounts to populate a picker or to disambiguate "post to my Twitter" when the user has multiple Twitter accounts connected.
Example
{ "workspaceId": "wks_01H..." }Response:
{
"accounts": [
{
"id": "acc_01H...",
"platform": "twitter",
"username": "@postato_br",
"displayName": "Postato",
"status": "connected"
},
{
"id": "acc_01H...",
"platform": "instagram",
"username": "postato.br",
"status": "connected"
}
]
}Status values
connected— OAuth token is valid; publishing works.token_expired— refresh failed or the user revoked access on the platform side. Publishing will fail until the user reconnects.suspended— the platform has suspended the account; Postato cannot push content.
Agents should surface non-connected states clearly: asking the user to reconnect on the Postato dashboard.
Gotchas
- Accounts are workspace-scoped. The same person may have Twitter connected across multiple workspaces — each is an independent record with its own
accountId. - Username is informational; never match by username alone. Always use
accountIdwhen callingpublish_post. - Freshly connected accounts may take a few seconds to appear. If a user just completed OAuth and the account isn't in the list, retry after 5 seconds.
Delete Media
Delete an uploaded media file from storage. Removes the file from CDN and marks it as expired. Cannot delete media that is attached to a published post.
Get Approval Status
Poll the approval status of a post that was routed to pending_approval. Returns the current status (pending, approved, rejected) and, if rejected, the reason. U