Workspaces
The rest of the API assumes you already know the workspace ID. That holds for an API Key: whoever minted it knew. An MCP client connected through OAuth does not: the user picked workspaces on the consent screen and the model has never seen those IDs.
This endpoint is that directory. The MCP tool list_workspaces is the same call.
GET https://api.platica.mx/v1/workspaces It is not gated on a workspace module: knowing which teams you belong to is not something a role hides, and an OAuth client needs this list before it can name a workspace on any other route.
It accepts both Bearer credentials: an OAuth access token (pl_at_…) or an API Key (pl_key_…). See Authentication .
Response
{
"active": null,
"requires_workspace_argument": true,
"credential": {
"type": "oauth",
"scopes": ["platica:read", "platica:write", "offline_access"]
},
"count": 2,
"workspaces": [
{
"id": "g6yCA16pkWl5eXo7KszB",
"name": "Acme Norte",
"role": "admin",
"modules": "all"
},
{
"id": "k2pL90vQmN4sHxYwR8cD",
"name": "Acme Support",
"role": "operator",
"modules": ["dashboard", "conversations", "agents", "campaigns", "contacts", "chat"]
}
]
} | Field | Type | Description |
|---|---|---|
active | string | null | If the credential covers one workspace, its id. If it covers several, null: writes must pass ?workspace=. |
requires_workspace_argument | boolean | true when count > 1. Same rule the MCP tools use. |
credential.type | string | "oauth" or "apiKey". |
credential.scopes | string[] | OAuth only. The scopes granted at consent. |
count | number | Workspaces this credential can reach right now. |
workspaces[].id | string | Value of ?workspace= (or the workspace argument in MCP). |
workspaces[].name | string | Company name in Platica. |
workspaces[].role | string | null | The user's role in that workspace. |
workspaces[].modules | "all" | string[] | Modules with access. For OAuth they come from the live role; for an API Key they are "all". |
The workspaces on an OAuth token are re-checked against current membership on every request. If you were removed from a team, it disappears here and the token stops reaching it — the grant does not have to be revoked.
Errors
| Status | Cause |
|---|---|
401 | Missing Bearer, or the token/key is not valid. |
404 | The credential has no reachable workspace. |