Skip to main content
GET
https://postsyncer.com/api/v1
accounts
curl -X GET "https://postsyncer.com/api/v1/accounts" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "data": [
    {
        "id": 136,
        "workspace_id": 12,
        "platform": "twitter",
        "username": "heyabdulmejid",
        "name": "Abdul",
        "avatar": "https://pbs.twimg.com/profile_images/1878383928995684352/3Xw5HTsk_400x400.jpg"
    },
    {
        "id": 245,
        "workspace_id": 12,
        "platform": "twitter",
        "username": "username1",
        "name": "Account Name",
        "avatar": "https://pbs.twimg.com/profile_images/188258dddddddd5070692626432/3oMtYxt5_normal.png"
    }
  ]
}

List Accounts

Retrieves all social media accounts from workspaces that the authenticated user has access to.

Request

curl -X GET "https://postsyncer.com/api/v1/accounts" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response

data
array
Array of account objects
{
  "data": [
    {
        "id": 136,
        "workspace_id": 12,
        "platform": "twitter",
        "username": "heyabdulmejid",
        "name": "Abdul",
        "avatar": "https://pbs.twimg.com/profile_images/1878383928995684352/3Xw5HTsk_400x400.jpg"
    },
    {
        "id": 245,
        "workspace_id": 12,
        "platform": "twitter",
        "username": "username1",
        "name": "Account Name",
        "avatar": "https://pbs.twimg.com/profile_images/188258dddddddd5070692626432/3oMtYxt5_normal.png"
    }
  ]
}

Code Examples

curl -X GET "https://postsyncer.com/api/v1/accounts" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Error Codes

401
Unauthorized
Missing or invalid API token
403
Forbidden
Token does not have ‘accounts’ permission