content_posts_create
Create a content plan item.
Create a content plan item. Write the text into each output (targets[].text): networks differ, and the base text is only optional source text for outputs that have none. A title with no text anywhere starts as an idea; text in any output or as base text starts as a draft. Optionally place it in a folder and add private notes, media and outputs (targets): a network and a variant each, several per network allowed, each with optional own media. Use content_posts_to_draft for an idea, then content_posts_submit when every output has publishable text.
Behavior
- HTTP
POST /content/posts
Arguments
Name | Type | Required | Description |
|---|---|---|---|
text | string | — | Optional base markdown text: source text an output without its own text publishes. Networks differ, so prefer writing each output its own targets[].text and leave this empty. A title with no text anywhere creates an idea; text here or in any output creates a draft. |
media | array | — | Media references attached to the post, in display order. Opaque strings — the toolkit does not upload or resolve them. |
notes | string | — | Private plan notes, up to 20,000 characters. They are not published. |
title | string | — | Optional plan title, up to 300 characters. Required when text is empty to create an idea. |
targets | array | — | The outputs of this post: for each, a network, a post type, an optional text override, the network-specific fields and optional own media. Several outputs may share a network. A post needs at least one output before it can be submitted, and it can only be scheduled to channels of networks it has an output for. Replaces the whole list; send each existing output with its id. |
folderId | string | — | Folder in this product to place the post in, or null for no folder. A new post goes last in that folder. |
Response
Field | Type | Always | Description |
|---|---|---|---|
id | string | • | Post id. |
text | string | • | The current text of the post, in markdown. |
media | array | • | Media references attached to the current version. |
notes | string | • | Private plan notes, or null when unset. |
title | string | • | Plan title, or null when unset. |
author | string | • | Identity id of whoever composed the post. |
status | string | • | Post lifecycle status: idea (may have no text) -> draft (being written) -> pending_approval (submitted) -> approved (cleared to publish). Past approval the status follows EVERY output of the approved version (see outputs): scheduled while an output is queued or in flight and none is out yet; partially_published once some outputs are out and others are still queued, failed or never scheduled; published once every output is out; failed when an output gave up and none is out or queued; back to approved when nothing is live any more (all cancelled). A post in any of these five statuses can still have an output scheduled, including a failed one again. |
outputs | array | • | One entry per output of this post, in targets order, with the state its publications add up to and the publication that decides it. Before approval every output is `none`. The post's status past approval is derived from exactly these states. |
targets | array | • | The outputs of this post — a network and a variant each; several may share a network. |
folderId | string | • | Folder containing this post, or null. |
position | integer | • | Order within its folder, or null for an unfiled post. |
createdAt | string | • | ISO-8601 creation time. |
updatedAt | string | • | ISO-8601 time of the last change. |
currentVersion | integer | • | Version number of the current text. |
approvedVersion | integer | • | The version an approval binds to, or null. Cleared on every edit: approving one text never covers another. |
Try it
Create a content plan item.