List workspaces: GET /workspaces
The workspaces the key can reach. `current` marks the one the request arrived on. If the key covers several workspaces, the other routes expect the workspace id in the `showorg` header.
Path
listWorkspacesThe workspaces this credential can act on: id, name, the role the key's owner holds there, and `current` marking the one this request acted on.
A key can span several workspaces. Every other route then expects the chosen workspace id in the `showorg` header and refuses with 403 instead of guessing when it is missing. This one route works without the header, so there is somewhere to pick from. In the CLI, `posty workspaces:list` and `posty workspaces:use <id>` do the same.
Request
curl https://api.posty.hu/public/v1/workspaces \
-H "Authorization: psty_your_key"Response
Example response structure. The OpenAPI document contains the authoritative schema for each field.
[
{ "id": "org_1a2b3c", "name": "Corner Coffee Ltd.", "role": "SUPERADMIN", "current": true },
{ "id": "org_4d5e6f", "name": "Personal", "role": "ADMIN", "current": false }
]Related
- Authentication: API key and scopes.
- Errors and limits: error responses and rate limits.
- All endpoints: full list.