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"]
    }
  ]
}
FieldTypeDescription
activestring | nullIf the credential covers one workspace, its id. If it covers several, null: writes must pass ?workspace=.
requires_workspace_argumentbooleantrue when count > 1. Same rule the MCP tools use.
credential.typestring"oauth" or "apiKey".
credential.scopesstring[]OAuth only. The scopes granted at consent.
countnumberWorkspaces this credential can reach right now.
workspaces[].idstringValue of ?workspace= (or the workspace argument in MCP).
workspaces[].namestringCompany name in Platica.
workspaces[].rolestring | nullThe 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".

Errors

StatusCause
401Missing Bearer, or the token/key is not valid.
404The credential has no reachable workspace.