Create X post

Publish a post to a connected X account.

← All X / Twitter endpoints · Capability overview

POST/v1/x-twitter/posts

https://api.vee3.io/v1/x-twitter/posts

60 tokens

Publish a post to a connected X account.

Authorization

Send your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

MCP

The same capability is available as an MCP tool on Vee3 hosted MCP.

Tool name

x-twitter.create_post
Parameters14 fields
user_idstringOptional

Numeric X user id from x-twitter.connected_accounts. Pass user_id or user_name to target a specific account, not both. Omit both to use the default account.

user_namestringOptional

X handle from x-twitter.connected_accounts, with or without a leading @. Pass user_id or user_name to target a specific account, not both. Omit both to use the default account.

textstringOptional

Post text content. At least one of text, poll, media, or card_uri is required.

max length 25000

pollobjectOptional

Poll object with `options` (array of 2-4 strings, each up to 25 characters) and `duration_minutes` (integer from 5 to 10080). Optional `reply_settings` uses the same values as the top-level reply_settings field. Mutually exclusive with media and card_uri.

mediaarrayOptional

File names from meta-tools.list_uploaded_files to attach (up to 4). Upload with meta-tools.upload_file and @vee3/upload first, then list_uploaded_files to get the stored file_name values.

min 1, max 4

reply_settings"following" | "mentionedUsers" | "subscribers" | "verified"Optional

Who can reply to the post.

paid_partnershipbooleanOptional

Whether the post is a paid partnership.

made_with_aibooleanOptional

Whether the post contains AI-generated media.

for_super_followers_onlybooleanOptional

Whether the post is exclusive to super followers.

Default: false

nullcastbooleanOptional

Whether the post is promoted-only and hidden from the public timeline.

Default: false

card_uristringOptional

Card URI for the post. Mutually exclusive with poll and media.

community_idstringOptional

Community id when posting to an X community.

direct_message_deep_linkstringOptional

Deep link that moves the conversation into Direct Messages.

share_with_followersbooleanOptional

Whether to share a community post with followers too.

Default: false

Response4 fields
tweet_idstring

Numeric id of the created or edited post.

textstring

Post text returned by the X API.

user_idstring

Numeric X user id of the connected account that published the post.

user_namestring

X handle of the connected account that published the post.

HTTP errors: unauthorized, validation_error, insufficient_tokens, payment_required, uploaded_file_not_found, uploaded_file_not_supported_for_x_media, x_connection_required, x_connection_not_found, x_connection_refresh_failed, x_twitter_write_unauthorized, x_twitter_write_rate_limited, x_twitter_write_upstream_error