Skip to main content
GET
https://postsyncer.com/api/v1
workspaces
curl -X GET "https://postsyncer.com/api/v1/workspaces" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "data": [
    { 
      "id": 12,
      "name": "abdulmejidshemsuawel",
      "slug": "abdulmejidshemsuawel",
      "type": "PERSONAL",
      "logo": null,
      "timezone": "Africa/Addis_Ababa",
      "language": "en",
      "accounts": [
        {
            "id": 136,
            "platform": "twitter",
            "username": "heyabdulmejid",
            "name": "Abdul",
            "avatar": "https://pbs.twimg.com/profile_images/1878383928995684352/3Xw5HTsk_400x400.jpg"
        }
      ]
    },
    { 
      "id": 14,
      "name": "postsyncer",
      "slug": "postsyncer",
      "type": "ORGANIZATION",
      "logo": null,
      "timezone": "Africa/Addis_Ababa",
      "language": "en",
      "accounts": [
        {
            "id": 140,
            "platform": "twitter",
            "username": "postsyncer",
            "name": "PostSyncer",
            "avatar": "https://pbs.twimg.com/profile_images/1878383928995684352/3Xw5HTsk_400x400.jpg"
        }
      ]
    }
  ]
}

List Workspaces

Retrieves all workspaces that the authenticated user has access to, including their associated accounts.

Request

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

Response

data
array
Array of workspace objects
{
  "data": [
    { 
      "id": 12,
      "name": "abdulmejidshemsuawel",
      "slug": "abdulmejidshemsuawel",
      "type": "PERSONAL",
      "logo": null,
      "timezone": "Africa/Addis_Ababa",
      "language": "en",
      "accounts": [
        {
            "id": 136,
            "platform": "twitter",
            "username": "heyabdulmejid",
            "name": "Abdul",
            "avatar": "https://pbs.twimg.com/profile_images/1878383928995684352/3Xw5HTsk_400x400.jpg"
        }
      ]
    },
    { 
      "id": 14,
      "name": "postsyncer",
      "slug": "postsyncer",
      "type": "ORGANIZATION",
      "logo": null,
      "timezone": "Africa/Addis_Ababa",
      "language": "en",
      "accounts": [
        {
            "id": 140,
            "platform": "twitter",
            "username": "postsyncer",
            "name": "PostSyncer",
            "avatar": "https://pbs.twimg.com/profile_images/1878383928995684352/3Xw5HTsk_400x400.jpg"
        }
      ]
    }
  ]
}

Code Examples

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

Error Codes

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