Skip to content

list_workspaces

Returns every workspace the account belongs to, with the id to pass as workspaceId, the caller’s role, and which networks are connected in each. An API key authenticates a person, not a workspace, so this is how an agent picks the right one.

On this page
  1. Parameters
  2. Example request
  3. Response
Category
Account
REST
POST/api/tools/list_workspaces

Parameters

No arguments. Send an empty object {}.

Example request

curl -X POST "https://api.postmcpai.com/api/tools/list_workspaces" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $POSTMCPAI_API_KEY"

Response

An array of workspaces, owned and shared.

200 · application/json
[
  {
    "id": "66f1a20c8b41d9e7c2a1",
    "name": "Acme Marketing",
    "role": "owner",
    "isOwner": true,
    "connectedPlatforms": [
      "linkedin",
      "twitter"
    ],
    "memberCount": 3
  },
  {
    "id": "66f1a4471bd2e5f0a993",
    "name": "Client — Northwind",
    "role": "editor",
    "isOwner": false,
    "connectedPlatforms": [
      "instagram"
    ],
    "memberCount": 5
  }
]