Workspace & accounts
Workspace context
Who you are, which workspace, your role, this credential's scopes and publish tiers, usable platforms, quota left and deep links back into the app. Call it first; later endpoints take platform / account parameters from here.
GET
/api/v1/workspaceworkspace:readread tierread-only
Authorization & guardrails
- Send
Authorization: Bearer <credential>; credentials are issued under Settings → Integrations → Long-lived credentials, see Authentication. - The credential needs scope
workspace:read; the issuer's workspace role must also allow the action. - Rate limit: read tier, 60/min per credential; over the cap returns 429 with
Retry-After. - Idempotency: read endpoint, no Idempotency-Key needed.
- Read-only: writes nothing and sends nothing out.
Responses
Success is HTTP 200 with a { data, meta } envelope; examples per status are on the right (at the end of the page on narrow screens). Every error is { error: { code, message, params }, meta } — branch on the code, not the message; see Errors.
| Status | Possible codes |
|---|---|
| 400 | invalid_input |
| 401 | unauthenticated |
| 403 | forbidden / workspace_not_found |
| 404 | not_found |
| 429 | rate_limited |
| 500 | internal |
Examples
Request
curl -X GET "https://popkit.loxily.com/api/v1/workspace" \
-H "Authorization: Bearer popkit_it_••••••••"Response
OK
{
"data": {
"workspace": {
"id": "ws_01J7PZ4A8K3D",
"name": "popkit 团队",
"kind": "team",
"role": "admin"
},
"user": {
"id": "usr_01J7PZ3Y2M0Q"
},
"credential": {
"kind": "mcp_client",
"scopes": [
"workspace:read",
"accounts:read",
"posts:read",
"posts:write",
"schedule:write"
],
"allowedActions": [
"draft",
"schedule"
],
"confirmMode": "preauthorized"
},
"quotas": {
"scheduledThisMonth": {
"used": 3,
"limit": 15,
"left": 12
},
"rendersThisMonth": {
"used": 0,
"limit": 30,
"left": 30
},
"seats": {
"used": 2,
"limit": 3,
"left": 1
},
"aiThisMonth": {
"used": 4,
"limit": 50,
"left": 46
}
},
"platforms": {
"publishable": [
"x",
"youtube",
"instagram",
"tiktok",
"facebook",
"threads"
],
"manual": [
"douyin",
"xiaohongshu",
"wechat_mp"
]
},
"accounts": {
"total": 4,
"byPlatform": {
"x": 1,
"youtube": 1,
"instagram": 1,
"tiktok": 1
}
},
"deepLinks": {
"dashboard": "https://popkit.loxily.com/dashboard",
"drafts": "https://popkit.loxily.com/content",
"calendar": "https://popkit.loxily.com/calendar",
"history": "https://popkit.loxily.com/history",
"planning": "https://popkit.loxily.com/planning"
}
},
"meta": {
"requestId": "6a1d0c9e-2b7f-4e3a-8c5d-1f0e9b8a7c61"
}
}