---
title: "Preview or atomically edit scheduled posts"
method: PATCH
path: "/v1/posts/bulk"
tags: ["Posts"]
---

# Preview or atomically edit scheduled posts

`PATCH /v1/posts/bulk`

## Request

- Base URL: `https://api.postlake.dev`
- URL: `https://api.postlake.dev/v1/posts/bulk`
- Auth: `bearerAuth` (a scheme the document does not define)

Select 1 to 200 exact post IDs. First send dryRun=true and inspect the per-post before/after diff. Apply with dryRun=false and the returned snapshot. A changed, missing, non-scheduled or imminent post rejects the entire edit. A UTC shift updates all scheduled times atomically in storage; timer re-arming is best-effort, with the due-post cron as a backstop. Cancellation is a separate endpoint.

## Request body

- object
  - `ids` string[], required
  - `patch` object, required
    - `text` string
    - `textOverrides` object
    - `accounts` string[]: Exact final destination list for every selected post.
    - `addAccounts` string[]: Add these connected account IDs to each post, preserving its existing destinations and avoiding duplicates. Mutually exclusive with accounts. Each final destination is validated. Preview and apply must use the same patch.
    - `shiftMinutes` integer: Shift each scheduled UTC instant by this many minutes; all resulting times must remain in the future.
    - `campaign` string
    - `assetMetadata` object
  - `dryRun` boolean, required
  - `snapshot` string: Required for apply; copy from the preview response.

## Response `200`

Preview or full edit, with per-post before/after results and snapshot.

- object
  - `dryRun` boolean, required
  - `snapshot` string, required
  - `matched` integer, required
  - `results` object[], required
    - `id` string, required
    - `before` object, required: Previous text, per-platform overrides, destination IDs, campaign, asset metadata and scheduled UTC time.
    - `after` object, required: Proposed or applied values for those same fields.

## Other responses

- `400`: Invalid input or destination.
- `409`: A post changed, started publishing, or is too close to its publish time. None changed.

---

[API](https://skmtc.dev/postlake/apis/postlake-api.md) · [All operations](https://skmtc.dev/postlake/apis/postlake-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postlake/apis/postlake-api/revisions/f81060e31f69?raw)
