PublishQPublishQ

List accounts

List connected social accounts for the authenticated API key owner. You can filter by workspace and by one or more platforms.

GET
/accounts

List connected social accounts for the authenticated API key owner. You can filter by workspace and by one or more platforms.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

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

In: header

Query Parameters

workspaceId?string

Return only accounts assigned to the specified workspace. If omitted, accounts from all workspaces are returned.

Formatuuid
platform?array<>

Return only accounts connected to the specified social platforms. Repeat the parameter to apply OR logic, for example ?platform=twitter&platform=instagram.

Response Body

application/json

application/json

application/json

curl -X GET "https://publishq.com/api/v1/accounts"
{
  "accounts": [
    {
      "id": "f6370ca1-1f47-4f68-be72-c1206913b326",
      "platform": "YOUTUBE",
      "platformName": "PublishQ",
      "platformUsername": "@publishq",
      "platformUserId": "UCyAKME2KZyPuoEqfofNFy4Q",
      "platformPicture": "https://cdn.publishq.com/uploads/avatars/f6370ca1-1f47-4f68-be72-c1206913b326.jpg",
      "workspaceId": "4c57ad21-7dc1-4f0b-a8f6-c7b3fdd8c9e7"
    }
  ]
}

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

{
  "error": {
    "title": "Too Many Requests",
    "status": 429,
    "code": "rate_limit_exceeded",
    "message": "Too Many Requests",
    "instance": "/api/v1/accounts",
    "details": {
      "retryAfter": 60
    }
  }
}