List workspaces
Get the IDs of the workspaces you can use and choose one for your next calls. Send its id as ?workspace= when the operation needs a specific workspace.
Example
curl https://api.platic.ai/v1/workspaces \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.workspaces.list(); The MCP tool list_workspaces queries the same directory.
It does not require permission for a workspace module. Use it to find available workspaces before calling their resources.
It accepts both Bearer credentials: an OAuth access token (pl_at_…) or an API Key (pl_key_…). See Authentication.
Response
{
"status": "success",
"data": [
{
"id": "g6yCA16pkWl5eXo7KszB",
"name": "Acme Norte",
"role": "admin",
"modules": "all"
},
{
"id": "k2pL90vQmN4sHxYwR8cD",
"name": "Acme Support",
"role": "operator",
"modules": ["dashboard", "conversations", "agents", "campaigns", "contacts", "chat"]
}
],
"active": null,
"requires_workspace_argument": true,
"credential": {
"type": "oauth",
"scopes": ["platica:read", "platica:write", "offline_access"]
}
} data is the list of workspaces this credential can reach right now. To know how many there are, use data.length. active, requires_workspace_argument, and credential are top-level fields, next to data.
| Field | Type | Description |
|---|---|---|
data[].id | string | Value of ?workspace= (or the workspace argument in MCP). |
data[].name | string | Company name in Platica. |
data[].role | string | null | The user's role in that workspace. |
data[].modules | "all" | string[] | Modules with access. For OAuth they come from the live role; for an API Key they are "all". |
active | string | null | If the credential covers one workspace, its id. If it covers several, null. |
requires_workspace_argument | boolean | true if the credential covers several workspaces. For operations that require one specific workspace, send ?workspace= (or workspace in MCP). |
credential.type | string | "apiKey", "oauth", or "internal". |
credential.scopes | string[] | OAuth only. The scopes granted at consent. |
For OAuth tokens, the API checks your current membership on every request. If you leave a team, it disappears from the list and the token loses access without revoking the grant.
If you omit ?workspace=, these calls can use multiple workspaces:
- List contacts, conversations or messages; read a conversation; list a contact’s conversations.
- Send messages or email.
- Send a template if its channel identifies one workspace. If more than one matches, you must choose it.
Getting a contact requires choosing one workspace. With OAuth, these calls include only workspaces where you have the required module.
Errors
| Status | details.code | When it happens |
|---|---|---|
401 | UNAUTHENTICATED | Missing Bearer, or the token/key is not valid |
404 | WORKSPACE_NOT_FOUND | The credential has no reachable workspace |
{
"code": 404,
"error": "Not Found - The resource doesn't exist",
"details": {
"code": "WORKSPACE_NOT_FOUND",
"message": "No workspaces found for this credential"
}
} The general error format is in Errors.