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 giventimezoneand converted to UTC. Bothdateandtimemust 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:
- a date and time was resolved (see above), and
accountsis not empty, and- at least one of
schedule,schedule_noworqueueistrue.
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: truecarries no date of its own. It only opts a date and time that is already resolvable (fromdate+time,queueorschedule_now) into being scheduled.schedule: trueon its own, with nodate/time, leaves the post a draft.- Sending
dateandtimewithout any ofschedule,schedule_noworqueuestores 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
- 200
- 401
- 403
- 404
- 422
The created post.
The bearer token is missing, malformed, unknown, or expired.
The token is valid, but the user it belongs to may not perform this action:
- they are not a member of the
{workspace}in the path; or - their workspace role is too low for this endpoint (write routes require Admin or Member); or
- for
/panelendpoints, they are not a platform administrator.
The host application that Mixpost is installed into can also deny access to Mixpost as a whole, which produces the same response.
The {workspace} UUID in the path does not match any workspace.
The request body failed validation.