Create draft post
create_draftCreate a draft social post for X, including threads, polls, and media, saved locally for approval before publishing.
Instructions
Create a draft social post for a channel (currently only "x"). Supports text, threads (parts), polls, media paths, quote, community, and paid partnership. RULE: never put http(s) links in the main post (text / parts[0]) — put every URL in a follow-up thread part (parts[1], parts[2], …). Only set allowLinksInMainPost=true if the user explicitly forces a link in the main post. The draft is saved locally and is NOT published until it is approved and then explicitly published.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| poll | No | Attach a poll (mutually exclusive with mediaPaths and quoteTweetId). | |
| text | Yes | The main post copy (must equal parts[0] when parts is set). Do not put http(s) links here — put them in parts[1+]. | |
| parts | No | Thread parts (length >= 2). text must equal parts[0]. Put every URL in parts[1], parts[2], … (never in the main post). Polls are not allowed on threads. | |
| channel | Yes | Target channel. Only "x" is supported today. | |
| mediaPaths | No | Absolute local file paths for media (1–4). Symlinks rejected; extension selects MIME (jpg/png/webp/gif/mp4) and contents are verified via magic-byte sniffing. Mutually exclusive with poll and quoteTweetId. | |
| communityId | No | Post into this Community id. | |
| quoteTweetId | No | ID of the post to quote. Enterprise-only on self-serve X API. Mutually exclusive with poll and mediaPaths. | |
| paidPartnership | No | Mark the post as a paid partnership. | |
| shareWithFollowers | No | When posting to a community, also share with followers. Requires communityId. | |
| allowLinksInMainPost | No | Opt out of the default no-links-in-main-post rule. Set true ONLY when the user explicitly insists on a URL in the main post (text / parts[0]). Default: false. |