PublishQPublishQ

List workspaces

Return your workspaces, including their names, colors, and account counts.

GET
/workspaces

Return your workspaces, including their names, colors, and account counts.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

PublishQ API key sent as Authorization: Bearer pq_live_....

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://publishq.com/api/v1/workspaces"
{
  "workspaces": [
    {
      "id": "4c57ad21-7dc1-4f0b-a8f6-c7b3fdd8c9e7",
      "name": "Personal Brand",
      "description": "The home base for every story worth telling.",
      "color": "#2563eb",
      "accountCount": 5,
      "createdAt": "2019-08-24T14:15:22Z"
    }
  ]
}

{
  "error": {
    "title": "Unauthorized",
    "status": 401,
    "code": "missing_auth",
    "message": "Missing Authorization header",
    "instance": "/api/v1/posts"
  }
}

{
  "error": {
    "title": "Forbidden",
    "status": 403,
    "code": "insufficient_scope",
    "message": "Missing required scope: workspaces:read",
    "instance": "/api/v1/workspaces"
  }
}
{
  "error": {
    "title": "Too Many Requests",
    "status": 429,
    "code": "rate_limit_exceeded",
    "message": "Too Many Requests",
    "instance": "/api/v1/workspaces",
    "details": {
      "retryAfter": 60
    }
  }
}