API Reference / Accounts
List connected accounts
PostPiper API: list active social accounts connected to your PostPiper user. Optionally filter by platform such as X, LinkedIn, or Pinterest.
GET
https://api.postpiper.ai/v1/accountsOnly accounts owned by the API key's user are returned. Connect new accounts in the dashboard.
Path and query parameters
| Name | Type | Description |
|---|---|---|
| platform | string, optional | Lowercase platform identifier, such as x or linkedin. |
Example request
Terminal
curl -H "Authorization: Bearer $POSTPIPER_API_KEY" "https://api.postpiper.ai/v1/accounts?platform=x"Response
200 OK. An empty list includes next_action with a dashboard connection URL.
JSON
{
"accounts": [
{
"id": "<account-uuid>",
"platform": "x",
"platform_user_id": "123456789",
"platform_username": "example",
"platform_display_name": "Example",
"platform_avatar_url": null
}
]
}Errors
400Invalid platform filter.401Missing or invalid API key.403API key lacks the required scope.503Accounts cannot be loaded.