Skip to content

Get your pending publication schedule for a post

GET
/posts/{id}/publication-schedule

Returns the publication schedule you set for one of your posts while it’s still marked as waiting. When there’s none, schedule is null. Only the post’s author can read it.

You need to be signed in. A post you can’t read, including a deleted one, is 404, and a readable post someone else wrote is 403. Reading doesn’t need the posts.publish capability, and the post doesn’t have to be a draft.

Only a schedule still marked as waiting is shown. Once it’s marked as done, failed or cancelled, schedule is null, and this route doesn’t say which. Being marked as waiting doesn’t prove the post is unpublished: a schedule whose time has passed is shown until the background job has finished with it, and if the job published the post but couldn’t record that, the schedule stays marked as waiting. Other scheduled actions on the same post aren’t included, and a system.admin holder can also cancel yours through the scheduled-actions routes.

id
required
string format: uuid

The post’s id.

Your pending schedule for the post, or null in schedule when there’s none.

object
schedule
required
object
id
required

The schedule’s id. A replacement gets a new id.

string format: uuid
post_id
required

The post this schedule publishes.

string format: uuid
scheduled_for
required

When the post becomes due to publish. A background job normally checks for due schedules about every five minutes, so the post is published some time after this, if the publish checks pass then; there’s no deadline.

string format: date-time
state
required

pending while the schedule is marked as waiting, which doesn’t by itself mean the post is still unpublished; the cancel route returns cancelled. These routes never return done or failed: a schedule marked as finished is no longer shown here.

string
Allowed values: pending done cancelled failed
created_by
required

The author who scheduled it; always the requesting user.

integer format: int64
created_at
required

When the schedule was saved.

string format: date-time

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}

Authenticated but missing required capabilities

object
error
required

Human-readable error summary

string
Example
the request could not be completed

Resource not found

object
error
required

Human-readable error summary

string
Example
the request could not be completed

Unexpected server error

object
error
required

Human-readable error summary

string
Example
the request could not be completed