Skip to main content

Create a post

POST 

/:workspace/posts

Creates a post. The post is always created as a draft first, and is only promoted to scheduled (or needs_approval) when the scheduling conditions below are met.

Choosing the date and time

The scheduled date and time is resolved from the first of these that is set, in this order of precedence — queue > schedule_now > date + time:

  • queue: true — the next free slot in the workspace's posting schedule.
  • schedule_now: true — the current time (UTC).
  • otherwise — date + time, interpreted in the given timezone and converted to UTC. Both date and time must be present, otherwise no date and time is resolved at all.

When the post is actually scheduled

The post is scheduled only when all three of the following are true:

  1. a date and time was resolved (see above), and
  2. accounts is not empty, and
  3. at least one of schedule, schedule_now or queue is true.

If any of these is missing, the post stays a draft. The resolved date and time is still stored on the draft — it is simply not scheduled. In particular:

  • schedule: true carries no date of its own. It only opts a date and time that is already resolvable (from date + time, queue or schedule_now) into being scheduled. schedule: true on its own, with no date/time, leaves the post a draft.
  • Sending date and time without any of schedule, schedule_now or queue stores the date and time but does not schedule the post.

Resulting status

When the post is scheduled, its status becomes scheduled if the authenticated user is allowed to approve posts in this workspace, and needs_approval otherwise.

Scheduling also requires permission to schedule posts in the workspace.

Request

Responses

The created post.