action x_create_post { label: "Create or Edit Post" description: "Creates a new Post for the authenticated user, or edits an existing Post when edit_options are provided. Supports paid partnership disclosure via the paid_partnership field." provider: x method: POST path: "/2/tweets" encoding: json scopes: ["tweet.write", "tweet.read", "users.read"] input: { type: "object" properties: { card_uri: { type: "string" description: "Card Uri Parameter. This is mutually exclusive from Quote Tweet Id, Poll, Media, and Direct Message Deep Link." } community_id: { type: "string" description: "The unique identifier of this Community." } direct_message_deep_link: { type: "string" description: "Link to take the conversation from the public timeline to a private Direct Message." } edit_options: { type: "object" description: "Options for editing an existing Post. When provided, this request will edit the specified Post instead of creating a new one." required: ["previous_post_id"] properties: { previous_post_id: { type: "string" description: "Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers." } } additionalProperties: false } for_super_followers_only: { type: "boolean" description: "Exclusive Tweet for super followers." } geo: { type: "object" description: "Place ID being attached to the Tweet for geo location." properties: { place_id: { type: "string" } } additionalProperties: false } made_with_ai: { type: "boolean" description: "Whether this Post contains AI-generated media. When true, the Post will be labeled accordingly." } media: { type: "object" description: "Media information being attached to created Tweet. This is mutually exclusive from Quote Tweet Id, Poll, and Card URI." required: ["media_ids"] properties: { call_to_actions: { type: "object" description: "Call-to-action button rendered on the media entity. Exactly one variant should be set." properties: { app_install: { type: "object" description: "App Install CTA. At least one store id should be provided." properties: { app_store_id: { type: "string" description: "Apple App Store iPhone app id." } ipad_app_store_id: { type: "string" description: "Apple App Store iPad app id." } play_store_id: { type: "string" description: "Google Play Store app id." } } additionalProperties: false } visit_site: { type: "object" description: "Visit Site CTA." required: ["url"] properties: { url: { type: "string" description: "HTTPS URL the CTA links to." } } additionalProperties: false } watch_now: { type: "object" description: "Watch Now CTA." required: ["url"] properties: { url: { type: "string" description: "HTTPS URL the CTA links to." } } additionalProperties: false } } additionalProperties: false } description: { type: "string" description: "Description for the media. Rendered on the Post card for video and Amplify content." } embeddable: { type: "boolean" description: "When true, the media's asset URLs do not expire and external syndicated playback is allowed." } media_ids: { type: "array" description: "A list of Media Ids to be attached to a created Tweet." items: { type: "string" description: "The unique identifier of this Media." } } preview_media_id: { type: "string" description: "The unique identifier of this Media." } tagged_user_ids: { type: "array" description: "A list of User Ids to be tagged in the media for created Tweet." items: { type: "string" description: "Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers." } } title: { type: "string" description: "Title for the media. Rendered on the Post card for video and Amplify content." } } additionalProperties: false } nullcast: { type: "boolean" description: "Nullcasted (promoted-only) Posts do not appear in the public timeline and are not served to followers." } paid_partnership: { type: "boolean" description: "Whether this Post is a paid partnership. When true, the Post will be labeled as a paid promotion." } poll: { type: "object" description: "Poll options for a Tweet with a poll. This is mutually exclusive from Media, Quote Tweet Id, and Card URI." required: ["duration_minutes", "options"] properties: { duration_minutes: { type: "integer" format: "int32" description: "Duration of the poll in minutes." } options: { type: "array" items: { type: "string" description: "The text of a poll choice." } } reply_settings: { type: "string" description: "Settings to indicate who can reply to the Tweet." enum: ["following", "mentionedUsers", "subscribers", "verified"] } } additionalProperties: false } quote_tweet_id: { type: "string" description: "Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers." } reply: { type: "object" description: "Tweet information of the Tweet being replied to." required: ["in_reply_to_tweet_id"] properties: { auto_populate_reply_metadata: { type: "boolean" description: "If set to true, reply metadata will be automatically populated." } exclude_reply_user_ids: { type: "array" description: "A list of User Ids to be excluded from the reply Tweet." items: { type: "string" description: "Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers." } } in_reply_to_tweet_id: { type: "string" description: "Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers." } } additionalProperties: false } reply_settings: { type: "string" description: "Settings to indicate who can reply to the Tweet." enum: ["following", "mentionedUsers", "subscribers", "verified"] } share_with_followers: { type: "boolean" description: "Share community post with followers too." } text: { type: "string" description: "The content of the Tweet." } } additionalProperties: false } output: { type: "object" properties: { data: { type: "object" required: ["id", "text"] properties: { id: { type: "string" description: "Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers." } text: { type: "string" description: "The content of the Tweet." } } } errors: { type: "array" items: { type: "object" description: "An HTTP Problem Details object, as defined in IETF RFC 7807 (https://tools.ietf.org/html/rfc7807)." required: ["type", "title"] properties: { detail: { type: "string" } status: { type: "integer" } title: { type: "string" } type: { type: "string" } } } } } } }