POSTARYX

X (Twitter) Settings

API settings for posting to X/Twitter

What X supports in Postiz

Character limits, media rules and how these settings appear in the app.

Settings Schema

When creating a post for X (Twitter), use the following settings schema:

{
  "settings": {
    "__type": "x",
    "who_can_reply_post": "everyone",
    "community": "",
    "made_with_ai": false,
    "paid_partnership": false
  }
}

Fields

FieldTypeRequiredDescription
__typestringYesMust be x
who_can_reply_poststringYesWho can reply to the post
communitystringNoX Community URL
made_with_aibooleanNoMark the post as containing AI-generated content. Defaults to false
paid_partnershipbooleanNoMark the post as a paid promotion. Defaults to false
post_typestringNopost (default) or article
article_titlestringConditionalRequired when post_type is article
article_statusstringConditionaldraft or published. Required when post_type is article
article_coverobjectNoCover image for the article. Only used when post_type is article

who_can_reply_post is required for a normal post but ignored for an article, since X articles do not carry a reply setting.

post_type

ValueDescription
postA regular short post. This is the default
articleA long-form X article

Long-form articles

Setting post_type to article publishes an X article instead of a post. The content is then treated as HTML rather than plain text, and these tags are kept: p, h1, h2, h3, ul, ol, li, strong, u, a.

{
  "settings": {
    "__type": "x",
    "post_type": "article",
    "article_title": "Why we rebuilt our scheduler",
    "article_status": "published",
    "article_cover": { "id": "img-123", "path": "https://uploads.postiz.com/cover.jpg" }
  }
}

Constraints worth knowing:

  • The character limit rises to 100,000 in article mode.
  • Articles take images only, no video.
  • An article saved as a draft cannot have thread replies attached.
  • article_title and article_status are both required once post_type is article. Omitting either is a validation error.

who_can_reply_post

Controls who can reply to your post.

ValueDescription
everyoneAnyone can reply
followingOnly people you follow can reply
mentionedUsersOnly mentioned users can reply
subscribersOnly your subscribers can reply
verifiedOnly verified accounts can reply

community

Optional X Community URL. Must match the format:

https://x.com/i/communities/1493446837214187523

Leave empty or omit to post to your main timeline.


Complete Example

{
  "type": "schedule",
  "date": "2024-12-14T10:00:00.000Z",
  "shortLink": false,
  "tags": [],
  "posts": [
    {
      "integration": {
        "id": "your-x-integration-id"
      },
      "value": [
        {
          "content": "Hello from the Postiz API! ๐Ÿš€",
          "image": []
        }
      ],
      "settings": {
        "__type": "x",
        "who_can_reply_post": "everyone",
        "community": "",
        "made_with_ai": false,
        "paid_partnership": false
      }
    }
  ]
}

Thread Example

Create a thread by adding multiple items to the value array:

{
  "type": "schedule",
  "date": "2024-12-14T10:00:00.000Z",
  "shortLink": false,
  "tags": [],
  "posts": [
    {
      "integration": {
        "id": "your-x-integration-id"
      },
      "value": [
        {
          "content": "1/ This is the first tweet in my thread",
          "image": []
        },
        {
          "content": "2/ This is the second tweet",
          "image": []
        },
        {
          "content": "3/ And this is the final tweet!",
          "image": []
        }
      ],
      "settings": {
        "__type": "x",
        "who_can_reply_post": "everyone"
      }
    }
  ]
}