Layers

GET /v1/projects/:projectId/scheduled-posts

List scheduled posts on a project. Filter by status, window, or account.

View as Markdown
GET/v1/projects/:projectId/scheduled-posts
Phase 1stable
Auth
Bearer
Scope
publish:read

Enumerate scheduled posts on a project. Useful for populating a queue view in your UI, batch-polling terminal states after a bulk schedule, or reconciling against your own post ledger.

Paginates by cursor. Default sort is scheduledFor descending (most-recent-first), which matches a "recent activity" view — use since/until to window a queue.

Path
  • projectId
    stringrequired
    Project whose posts you want.
Query
  • status
    string | string[]optional
    One of queued, publishing, draft_in_inbox, published, failed, canceled. Repeat the parameter (e.g. `?status=queued&status=publishing`) to filter on multiple statuses.
  • socialAccountId
    stringoptional
    Scope to one connected account.
  • since
    string (ISO-8601)optional
    Inclusive lower bound on scheduledFor.
  • until
    string (ISO-8601)optional
    Inclusive upper bound on scheduledFor.
  • cursor
    stringoptional
    Opaque pagination cursor from a previous response.
  • limit
    integeroptionaldefault: 50
    Page size, 1–100.

Example request

curl "https://api.layers.com/v1/projects/prj_01HX9Y7K8M2P4RSTUV56789AB/scheduled-posts?status=queued&status=publishing&limit=100" \
  -H "Authorization: Bearer lp_live_01HX9Y6K7EJ4T2_4QZpN..."
async function* walkAllPending(projectId: string) {
  let cursor: string | undefined;
  do {
    const page = await layers.publishing.listScheduledPosts({
      projectId,
      status: ["queued", "publishing"],
      limit: 100,
      cursor,
    });
    yield* page.items;
    cursor = page.nextCursor ?? undefined;
  } while (cursor);
}
def walk_all_pending(project_id: str):
    cursor = None
    while True:
        page = layers.publishing.list_scheduled_posts(
            project_id=project_id,
            status=["queued", "publishing"],
            limit=100,
            cursor=cursor,
        )
        yield from page["items"]
        cursor = page.get("nextCursor")
        if not cursor:
            return

Response

200Page of posts
{
  "items": [
    {
      "id": "sp_01HXZN4K5M6P7QRS8TUV9WXYZA",
      "containerId": "cnt_01HXZM3K4N5P6QRS7TUV8WXYZ9",
      "socialAccountId": "sa_01HXZ9P2M4N5KLM6TUV7WXYZ9A",
      "platform": "tiktok",
      "mode": "direct_publish",
      "status": "queued",
      "scheduledFor": "2026-04-19T14:00:00Z",
      "attemptedAt": null,
      "publishedAt": null,
      "externalUrl": null
    }
  ],
  "nextCursor": "cur_01HXZP8K9M4N5P6QRSTU"
}

Errors

StatusCodeWhen
422VALIDATIONsince > until, limit out of range, bad status value.
401UNAUTHENTICATEDMissing or invalid key.
403FORBIDDEN_SCOPEKey lacks publish:write.
404NOT_FOUNDProject not in your organization.

See also

On this page