Skip to main content

CreatePostRequest

Body for createPost (and each item of bulkCreatePosts). camelCase aliases (accountIds, mediaIds, scheduledFor, platformContent, coverPhoto) and the deprecated scheduled_at alias are also accepted.

contentstring

Required unless platform_content has a caption or media_ids is non-empty. Max 10,000 characters, or 25,000 for an X Article (platform_content.x.settings.post_type = "article"). A long WordPress blog body goes in platform_content.wordpress.content instead.

Possible values: <= 25000 characters

account_idsinteger[]

Required unless draft=true (drafts may pick accounts at schedule time)

Possible values: <= 50

scheduled_forstring<date-time>

Omit to publish immediately. Assumed UTC when no offset. Must be in the future.

timezonestring

IANA timezone — display metadata only, never changes WHEN the post fires

Default value: UTC
media_idsstring<uuid>[]

Media UUIDs from the upload flow. Do NOT send media/media_id/attachments.

platform_content object

Per-platform overrides keyed by platform name. Each entry may set content (that platform's own text) and settings. X settings include made_with_ai, paid_partnership and community_id. X Article (X Premium accounts): under x, set settings.post_type to article and settings.title (up to 100 characters), with the article body in content; X accounts only, up to 5 images (the first is the cover), no video, 2 published articles per X account per 24 hours; invalid articles return x_article_invalid. WordPress blog post: see WordPressBlogPost.

wordpress object

A WordPress blog post (platform_content.wordpress). Other platforms in the same request use the top-level content. Media: up to 20 images and 1 video in media_ids. The first image is the featured image (unless settings.featuredImage is "none"); the others go where ![caption](image:N) places them, else at the end. A video goes at the top. The post needs a title (settings.title, a leading # Heading, or the first line of the body), else 400 wordpress_title_required.

contentstring

The post body. Markdown-style: # headings, bold, italic, links, - lists, > quotes, --- dividers, code, | tables |, caption. Raw HTML is kept as-is. Defaults to the top-level content.

Possible values: <= 200000 characters

settings object

Blog post settings. All optional. A bad value returns 400 wordpress_post_invalid.

titlestring

Defaults to a leading "# Heading" line, else the first line of the body.

Possible values: <= 200 characters

statusstring

WordPress post status. "draft" saves it on the site without publishing.

Possible values: [publish, draft, pending, private]

Default value: publish
excerptstring

Possible values: <= 1000 characters

slugstring

URL slug; lowercased, other characters become -

Possible values: <= 190 characters

tags object

Tag names. Missing tags are created.

oneOf
  • Array [
  • string
  • ]
  • categories object

    Category names or numeric ids. Unknown names are skipped with a warning.

    oneOf
  • Array [
  • oneOf
    string
  • ]
  • featuredImagestring

    "first" uses the first attached image as the featured image.

    Possible values: [first, none]

    Default value: first
    post_typestring

    Optional marker. The web composer sets it.

    Possible values: [blog]

    property name*any

    Blog post settings. All optional. A bad value returns 400 wordpress_post_invalid.

    property name*any

    Per-platform overrides keyed by platform name. Each entry may set content (that platform's own text) and settings. X settings include made_with_ai, paid_partnership and community_id. X Article (X Premium accounts): under x, set settings.post_type to article and settings.title (up to 100 characters), with the article body in content; X accounts only, up to 5 images (the first is the cover), no video, 2 published articles per X account per 24 hours; invalid articles return x_article_invalid. WordPress blog post: see WordPressBlogPost.

    cover_photo object

    Video cover photo

    urlstring<uri>required
    timestampnumber
    Default value: 0
    is_customboolean
    Default value: true
    draftboolean

    Save as a reviewable draft instead of scheduling/publishing

    Default value: false
    use_queueboolean

    Let the workspace's posting queue pick the time. The server allocates the next free opening at create time and the response carries the resulting scheduled_for. Mutually exclusive with scheduled_for. Requires a queue to exist (set one up on the Queue page, or read it with GET /queue). 400 with a clear message when the queue is missing, empty, or full.

    Default value: false
    request_approvalboolean

    Only with draft: true. Submits the draft into the approval workflow immediately: approval_status becomes 'pending', owners and admins are notified, and the draft appears in the Approvals inbox. Track it with GET /posts?approval=pending; an approver clears it via POST /posts/{id}/approve.

    Default value: false
    CreatePostRequest
    {
    "content": "string",
    "account_ids": [
    0
    ],
    "scheduled_for": "2024-07-29T15:51:28.071Z",
    "timezone": "UTC",
    "media_ids": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    ],
    "platform_content": {
    "wordpress": {
    "content": "string",
    "settings": {
    "title": "string",
    "status": "publish",
    "excerpt": "string",
    "slug": "string",
    "tags": [
    "string"
    ],
    "categories": [
    "string",
    0
    ],
    "featuredImage": "first",
    "post_type": "blog"
    }
    }
    },
    "cover_photo": {
    "url": "string",
    "timestamp": 0,
    "is_custom": true
    },
    "draft": false,
    "use_queue": false,
    "request_approval": false
    }