内容
内容列表
分页列出草稿 / 排期 / 已发布内容(八态)。游标不透明,把上一页的 nextCursor 原样回传取下一页。
GET
/api/v1/postsposts:read读档限流只读
鉴权与护栏
- 请求头
Authorization: Bearer <长期凭证>,凭证在设置页「接入外部系统 → 长期凭证」签发,见 鉴权与权限。 - 凭证需带 scope
posts:read;签发者在工作区里的角色也要允许该动作。 - 限流:读档,每分钟 60 次(按凭证计),超出回 429 并带
Retry-After。 - 幂等:读端点,无需 Idempotency-Key。
- 只读端点:不写库、不外发。
查询参数
statusenum: draft · reviewing · approved · rejected · scheduled · publishing · published · failed可选按状态筛;不给 = 全部。
platformenum: x · youtube · instagram · tiktok · facebook · threads · douyin · xiaohongshu · wechat_mp可选按目标平台筛(内容 platforms 含该平台)。
limitinteger 1–100可选每页条数,默认 20。
cursorstring可选上一页返回的 nextCursor。
响应
成功返回 HTTP 200,信封为 { data, meta };右侧(窄屏在本页末尾)给出了各状态码的示例。所有错误都是 { error: { code, message, params }, meta },按机器码处理而不是按 message 匹配,码表见 错误码。
| 状态码 | 可能的错误码 |
|---|---|
| 400 | invalid_input |
| 401 | unauthenticated |
| 403 | forbidden / workspace_not_found |
| 404 | not_found |
| 429 | rate_limited |
| 500 | internal |
示例
请求
curl -X GET "https://popkit.loxily.com/api/v1/posts?status=scheduled&limit=20" \
-H "Authorization: Bearer popkit_it_••••••••"响应
成功
{
"data": {
"items": [
{
"id": "pst_01J8ZK3R7QW6M2",
"title": null,
"content": "新功能上线:一次创作,发布到所有平台 🚀",
"platforms": [
"x",
"instagram"
],
"targetAccountIds": [
"acc_01J8X…",
"acc_01J8Y…"
],
"status": "scheduled",
"source": "api",
"scheduledAt": "2026-09-21T10:00:00.000Z",
"publishedAt": null,
"createdBy": "usr_01J7…",
"createdAt": "2026-09-20T08:12:31.000Z",
"updatedAt": "2026-09-20T08:12:31.000Z",
"deepLink": "https://popkit.loxily.com/calendar?post=pst_01J8ZK3R7QW6M2"
}
],
"nextCursor": "eyJjIjoiMjAyNi0wOS0yMFQwODoxMjozMS4wMDBaIiwiaWQiOiJwc3RfMDFKOFpLM1I3UVc2TTIifQ"
},
"meta": {
"requestId": "6a1d0c9e-2b7f-4e3a-8c5d-1f0e9b8a7c63"
}
}