内容

内容详情

一条内容的完整信息:主文案、逐平台变体、媒体、每个目标账号的发布结果(含失败机器码)。发布后用它轮询各账号结果。只能取本工作区的内容。

GET/api/v1/posts/{postId}
posts:read读档限流只读

鉴权与护栏

  • 请求头 Authorization: Bearer <长期凭证>,凭证在设置页「接入外部系统 → 长期凭证」签发,见 鉴权与权限。
  • 凭证需带 scope posts:read;签发者在工作区里的角色也要允许该动作。
  • 限流:读档,每分钟 60 次(按凭证计),超出回 429 并带 Retry-After。
  • 幂等:读端点,无需 Idempotency-Key。
  • 只读端点:不写库、不外发。

路径参数

postIdstring必填

内容 id(列表 / 新建返回的 postId)。

响应

成功返回 HTTP 200,信封为 { data, meta };右侧(窄屏在本页末尾)给出了各状态码的示例。所有错误都是 { error: { code, message, params }, meta },按机器码处理而不是按 message 匹配,码表见 错误码。

状态码可能的错误码
400invalid_input
401unauthenticated
403forbidden / workspace_not_found
404not_found
429rate_limited
500internal

示例

请求
curl -X GET "https://popkit.loxily.com/api/v1/posts/pst_01J8ZK3R7QW6M2" \
  -H "Authorization: Bearer popkit_it_••••••••"
响应
成功
{
  "data": {
    "id": "pst_01J8ZK3R7QW6M2",
    "title": null,
    "content": "新功能上线:一次创作,发布到所有平台 🚀",
    "platforms": [
      "x",
      "instagram"
    ],
    "targetAccountIds": [
      "acc_01J8X…",
      "acc_01J8Y…"
    ],
    "status": "published",
    "source": "api",
    "scheduledAt": "2026-09-21T10:00:00.000Z",
    "publishedAt": "2026-09-21T10:00:04.000Z",
    "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",
    "variants": [
      {
        "platform": "x",
        "content": "新功能上线 🚀 一次创作,发布到所有平台 → popkit.loxily.com",
        "title": null,
        "digest": "b1e4…"
      }
    ],
    "media": [
      {
        "kind": "image",
        "url": "https://storage.googleapis.com/…/cover.jpg",
        "inline": false,
        "platform": null,
        "durationSec": null,
        "sortOrder": 0
      }
    ],
    "targets": [
      {
        "id": "tgt_01J8…",
        "accountId": "acc_01J8XQ5M9V2R",
        "platform": "x",
        "status": "published",
        "permalink": "https://x.com/popkit/status/18…",
        "publishedAt": "2026-09-21T10:00:04.000Z",
        "attemptCount": 1,
        "errorCode": null,
        "errorParams": null,
        "errorText": null
      },
      {
        "id": "tgt_01J8…",
        "accountId": "acc_01J8Y…",
        "platform": "instagram",
        "status": "failed",
        "permalink": null,
        "publishedAt": null,
        "attemptCount": 1,
        "errorCode": "media_required",
        "errorParams": null,
        "errorText": null
      }
    ]
  },
  "meta": {
    "requestId": "6a1d0c9e-2b7f-4e3a-8c5d-1f0e9b8a7c64"
  }
}