---
title: "The workspaces you belong to (the switcher)"
method: GET
path: "/api/workspaces"
---

# The workspaces you belong to (the switcher)

`GET /api/workspaces`

## Request

- Base URL: `https://postwire.io`
- URL: `https://postwire.io/api/workspaces`
- Auth: HTTP bearer

Your own workspace first, then every team you joined, each with your role there. To act in one, the dashboard sends its id in the X-PostWire-Workspace header with its session key. An API key belongs to the workspace it was created in and never switches (403 workspace_forbidden).

## Response `200`

{ teams, workspaces: [{ id, name, display_name, role, plan, own, members, read_only }] }

---

[API](https://skmtc.dev/postwire/apis/postwire-api.md) · [All operations](https://skmtc.dev/postwire/apis/postwire-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postwire/apis/postwire-api/revisions/513a409ab8f7?raw)
