{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/twitter/refs/heads/main/json-schema/x-api-tweet-create-request-schema.json", "title": "TweetCreateRequest", "description": "TweetCreateRequest schema from X API v2", "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.", "pattern": "^[0-9]{1,19}$", "example": "1146654567674912769" }, "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": { "$ref": "#/components/schemas/TweetId" } }, "additionalProperties": false }, "for_super_followers_only": { "type": "boolean", "description": "Exclusive Tweet for super followers.", "default": false }, "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": { "media_ids": { "type": "array", "description": "A list of Media Ids to be attached to a created Tweet.", "minItems": 1, "maxItems": 4, "items": { "$ref": "#/components/schemas/MediaId" } }, "tagged_user_ids": { "type": "array", "description": "A list of User Ids to be tagged in the media for created Tweet.", "minItems": 0, "maxItems": 10, "items": { "$ref": "#/components/schemas/UserId" } } }, "additionalProperties": false }, "nullcast": { "type": "boolean", "description": "Nullcasted (promoted-only) Posts do not appear in the public timeline and are not served to followers.", "default": false }, "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": [ "options", "duration_minutes" ], "properties": { "duration_minutes": { "type": "integer", "description": "Duration of the poll in minutes.", "minimum": 5, "maximum": 10080, "format": "int32" }, "options": { "type": "array", "minItems": 2, "maxItems": 4, "items": { "type": "string", "description": "The text of a poll choice.", "minLength": 1, "maxLength": 25 } }, "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.", "pattern": "^[0-9]{1,19}$", "example": "1346889436626259968" }, "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": { "$ref": "#/components/schemas/UserId" } }, "in_reply_to_tweet_id": { "$ref": "#/components/schemas/TweetId" } }, "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.", "default": false }, "text": { "type": "string", "description": "The content of the Tweet.", "example": "Learn how to use the user Tweet timeline and user mention timeline endpoints in the X API v2 to explore Tweet\\u2026 https:\\/\\/t.co\\/56a0vZUx7i" } }, "additionalProperties": false }