Posts

Edit a scheduled post or a draft

Edit a post that has not gone out. For a scheduled post, accounts replaces the exact destination list at least 30 seconds before publishing. Include expectedAccounts from your last GET so a stale edit cannot overwrite a newer destination change. Existing matching targets are preserved and new destinations inherit the publish time after preflight validation. Guardrails apply; approval-required agents must ask the owner. targetAccounts repairs a disconnected target by exact replacement. A draft may remain incomplete until published.

patch/v1/posts/{id}

Request

  • Base URL: https://api.postlake.dev
  • URL: https://api.postlake.dev/v1/posts/{id}
  • Auth: bearerAuth (a scheme the document does not define)

Path parameters

idstring required

Request body

textstring
campaignstring

Optional campaign slug. Set null to clear.

assetMetadataobject

Optional caller-defined asset facts. Set null to clear.

textOverridesobject
scheduledAtstring date-time
timezonestring

IANA timezone (e.g. Europe/London).

mediastring[]
mediaAltstring[]
mediaOverridesobject
mediaAltOverridesobject
platformOptionsobject

Merged per platform, so a TikTok title patch does not wipe other TikTok fields.

accountsstring[]

Exact final acc_ destination list. Scheduled posts require at least one connected account; new destinations inherit the same publish time.

expectedAccountsstring[]

Required with accounts on scheduled posts. The current target account ids from GET /v1/posts/{id}, in order. Rejects stale edits.

targetAccountsobject

Scheduled posts only. Map a disconnected target's old acc_ id to the exact replacement connected acc_ id.

threadstring[]

Drafts only. New follow-on post bodies. An empty array removes the thread.

firstCommentstring

Drafts only. New first comment. An empty string removes it.

firstCommentOverridesobject

Drafts only. New per-platform first-comment overrides.

Response

Success

idstring required
sourceDraftIdstring

Immutable original draft ID. New approvals preserve this as id; legacy audited approvals may resolve an older ID to a different canonical id.

snapshotstring

Computed full-state approval fence returned by GET. Includes media, options and metadata.

state'draft' | 'awaiting_approval' | 'rejected' | 'queued' | 'scheduled' | 'processing' | 'partial' | 'published' | 'failed' required
createdAtstring date-time required
clientIdstring

Stable machine principal that created the post. Absent for human-created dashboard posts.

surface'dashboard' | 'api' | 'agent'

Where the post was created, independent of the principal identity.

scheduledAtstring date-time nullable required
timezonestring

IANA timezone the caller scheduled in, when they named one.

scheduledAtLocalstring

Wall-clock time in timezone, computed on read. Not stored.

textstring required
campaignstring
assetMetadataobject
mediastring[] required
warningsstring[]

Advisory notes from create or edit, for example PNG converted to JPEG for TikTok.

Changes

No recorded changes to this operation across all 1 revision of this API.