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.
curl --request POST \
--url https://api.x.com/2/tweets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"card_uri": "<string>",
"community_id": "1146654567674912769",
"direct_message_deep_link": "<string>",
"for_super_followers_only": false,
"geo": {
"place_id": "<string>"
},
"made_with_ai": true,
"nullcast": false,
"paid_partnership": true,
"quote_tweet_id": "1346889436626259968",
"reply_settings": "following",
"share_with_followers": false,
"text": "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"
}
'{
"data": {
"id": "1346889436626259968",
"text": "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"
},
"errors": [
{
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"status": 123
}
]
}Documentation Index
Fetch the complete documentation index at: https://docs.x.com/llms.txt
Use this file to discover all available pages before exploring further.
The access token received from the authorization server in the OAuth 2.0 flow.
Card Uri Parameter. This is mutually exclusive from Quote Tweet Id, Poll, Media, and Direct Message Deep Link.
The unique identifier of this Community.
^[0-9]{1,19}$"1146654567674912769"
Link to take the conversation from the public timeline to a private Direct Message.
Options for editing an existing Post. When provided, this request will edit the specified Post instead of creating a new one.
Show child attributes
Exclusive Tweet for super followers.
Place ID being attached to the Tweet for geo location.
Show child attributes
Whether this Post contains AI-generated media. When true, the Post will be labeled accordingly.
Media information being attached to created Tweet. This is mutually exclusive from Quote Tweet Id, Poll, and Card URI.
Show child attributes
Nullcasted (promoted-only) Posts do not appear in the public timeline and are not served to followers.
Whether this Post is a paid partnership. When true, the Post will be labeled as a paid promotion.
Poll options for a Tweet with a poll. This is mutually exclusive from Media, Quote Tweet Id, and Card URI.
Show child attributes
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.
^[0-9]{1,19}$"1346889436626259968"
Tweet information of the Tweet being replied to.
Show child attributes
Settings to indicate who can reply to the Tweet.
following, mentionedUsers, subscribers, verified Share community post with followers too.
The content of the Tweet.
"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"
The request has succeeded.
Show child attributes
1An HTTP Problem Details object, as defined in IETF RFC 7807 (https://tools.ietf.org/html/rfc7807).
Show child attributes
curl --request POST \
--url https://api.x.com/2/tweets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"card_uri": "<string>",
"community_id": "1146654567674912769",
"direct_message_deep_link": "<string>",
"for_super_followers_only": false,
"geo": {
"place_id": "<string>"
},
"made_with_ai": true,
"nullcast": false,
"paid_partnership": true,
"quote_tweet_id": "1346889436626259968",
"reply_settings": "following",
"share_with_followers": false,
"text": "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"
}
'{
"data": {
"id": "1346889436626259968",
"text": "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"
},
"errors": [
{
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"status": 123
}
]
}