PublishQPublishQ

Create workspace

Create a workspace to organize your connected social accounts.

POST
/workspaces

Create a workspace to organize your connected social accounts.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

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

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://publishq.com/api/v1/workspaces" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{
  "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": "Bad Request",
    "status": 400,
    "code": "validation_failed",
    "message": "Request validation failed",
    "instance": "/api/v1/workspaces",
    "details": {
      "errors": [
        {
          "path": "name",
          "message": "Workspace name is required",
          "code": "too_small"
        }
      ]
    }
  }
}

{
  "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:write",
    "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
    }
  }
}