Update post

Canonical update endpoint for draft edits, scheduled-post rescheduling, and lifecycle transitions such as archive, restore, and cancel.
https://api.unipost.dev
PATCH/v1/posts/:post_id
Authorization
In header · Bearer <token>
Path
string
Request Body

Authorization

AuthorizationBearer <token>In header
Workspace API key.

Path Params

post_idstring
UniPost post ID.

Request Body

platform_posts?array
Draft-only content update. Replaces the stored per-account payload.
scheduled_at?string
Scheduled-only update. Reschedules a scheduled post when set to a future RFC3339 timestamp.
archived?boolean
Canonical lifecycle patch. Set `true` to archive or `false` to restore.
status?"canceled"
Canonical lifecycle patch for draft or scheduled posts. Cancels the post without dispatching more work.

Response Body

200
idstring
UniPost post ID.
statusstring
Updated lifecycle state.
archived_atstring | null
Archive timestamp when the post is archived.
scheduled_atstring | null
Updated scheduled publish time for scheduled posts.
request_idstring
Request identifier for debugging and support.
401
error.codestring
Usually "VALIDATION_ERROR", "CONFLICT", or "NOT_FOUND".
error.normalized_codestring
Lowercase alias such as "validation_error", "conflict", or "not_found".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.
404
error.codestring
Usually "VALIDATION_ERROR", "CONFLICT", or "NOT_FOUND".
error.normalized_codestring
Lowercase alias such as "validation_error", "conflict", or "not_found".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.
409
error.codestring
Usually "VALIDATION_ERROR", "CONFLICT", or "NOT_FOUND".
error.normalized_codestring
Lowercase alias such as "validation_error", "conflict", or "not_found".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.
422
error.codestring
Usually "VALIDATION_ERROR", "CONFLICT", or "NOT_FOUND".
error.normalized_codestring
Lowercase alias such as "validation_error", "conflict", or "not_found".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.
500
error.codestring
Usually "VALIDATION_ERROR", "CONFLICT", or "NOT_FOUND".
error.normalized_codestring
Lowercase alias such as "validation_error", "conflict", or "not_found".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.

Use PATCH for direct resource state changes. Legacy command routes such as POST /v1/posts/:post_id/archive, /restore, and /cancel still work during the migration window, but PATCH is now the canonical route.