Schedule a draft post to publish at a future time
PUT /posts/{id}/publication-schedule
Records a standing instruction to publish this draft at
scheduled_for, carried out by the scheduled-action engine
(ADR 0020) through the same publication core the publish
endpoint uses. The row is an ordinary change_state action on
the post, created by THIS caller: created_by is the real
requesting user, and the identity, capabilities and authorship
it publishes as are loaded again when the action fires. A
caller who loses the right to publish before then has stopped
the scheduled publication too.
Schedule-time gates, in order: the post must be readable
(404 otherwise, deleted posts included); the caller must be
its author (403); the caller must currently hold
posts.publish (403); the post must currently be a draft
(409); and scheduled_for must be in the future (400).
ONE PENDING SCHEDULE PER POST. A PUT that finds the caller’s
own pending schedule replaces it in the same transaction, so
changing the time is one request. Two requests racing for the
same post are serialised by the database: exactly one wins and
the other answers 409, after which a re-read shows the
winner’s schedule.
Timing. The action becomes eligible at scheduled_for and is
carried out on the scheduler’s next normal pass, which runs
every few minutes. It is not a to-the-second promise.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”object
Must be in the future.
Responses
Section titled “ Responses ”The schedule now standing for this post.
An author’s standing instruction to publish one post (#1119, ADR 0020). A narrow view of the scheduled_actions row the instruction lives in: the generic fields (verb, target kind, params) are fixed for this surface and are not repeated.
object
When the post becomes eligible to publish. It is carried out on the scheduler’s next normal pass after this time, not at this exact second.
The author who scheduled it; always the requesting user.
Malformed request
object
Human-readable error summary
Example
the request could not be completedAuthentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Authenticated but missing required capabilities
object
Human-readable error summary
Example
the request could not be completedResource not found
object
Human-readable error summary
Example
the request could not be completedThe post is already published, or a concurrent request created the post’s pending schedule first. Re-read the status to see what stands.
object
Human-readable error summary
Example
the request could not be completedUnexpected server error
object
Human-readable error summary
Example
the request could not be completed