Body
-
Link to take the conversation from the public timeline to a private Direct Message.
-
The content of the Tweet.
-
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.
Format should match the following pattern:
^[0-9]{1,19}$
. -
Exclusive Tweet for super followers.
-
Tweet information of the Tweet being replied to.
-
Media information being attached to created Tweet. This is mutually exclusive from Quote Tweet Id and Poll.
-
Poll options for a Tweet with a poll. This is mutually exclusive from Media and Quote Tweet Id.
-
Settings to indicate who can reply to the Tweet.
Values are
following
ormentionedUsers
. -
Place ID being attached to the Tweet for geo location.
POST
/2/tweets
curl \
-X POST https://api.twitter.com/2/tweets \
-H "Authorization: Oauth $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"text":"Learn how to use the user Tweet timeline and user mention timeline endpoints in the Twitter API v2 to explore Tweet\\u2026 https:\\/\\/t.co\\/56a0vZUx7i","direct_message_deep_link":"string","quote_tweet_id":"1346889436626259968","for_super_followers_only":true,"reply":{"in_reply_to_tweet_id":"1346889436626259968","exclude_reply_user_ids":["2244994945"]},"media":{"media_ids":["1146654567674912769"],"tagged_user_ids":["2244994945"]},"poll":{"options":["string"],"duration_minutes":42},"reply_settings":"following","geo":{"place_id":"string"}}'
Request example
{
"text": "Learn how to use the user Tweet timeline and user mention timeline endpoints in the Twitter API v2 to explore Tweet\\u2026 https:\\/\\/t.co\\/56a0vZUx7i",
"direct_message_deep_link": "string",
"quote_tweet_id": "1346889436626259968",
"for_super_followers_only": true,
"reply": {
"in_reply_to_tweet_id": "1346889436626259968",
"exclude_reply_user_ids": [
"2244994945"
]
},
"media": {
"media_ids": [
"1146654567674912769"
],
"tagged_user_ids": [
"2244994945"
]
},
"poll": {
"options": [
"string"
],
"duration_minutes": 42
},
"reply_settings": "following",
"geo": {
"place_id": "string"
}
}
Request examples
{
"direct_message_deep_link": "string",
"text": "Learn how to use the user Tweet timeline and user mention timeline endpoints in the Twitter API v2 to explore Tweet\\u2026 https:\\/\\/t.co\\/56a0vZUx7i",
"quote_tweet_id": "1346889436626259968",
"for_super_followers_only": true,
"reply": {
"in_reply_to_tweet_id": "1346889436626259968",
"exclude_reply_user_ids": [
"2244994945"
]
},
"media": {
"media_ids": [
"1146654567674912769"
],
"tagged_user_ids": [
"2244994945"
]
},
"poll": {
"options": [
"string"
],
"duration_minutes": 42
},
"reply_settings": "following",
"geo": {
"place_id": "string"
}
}
Response examples (201)
{
"data": {
"id": "1346889436626259968",
"text": "Learn how to use the user Tweet timeline and user mention timeline endpoints in the Twitter API v2 to explore Tweet\\u2026 https:\\/\\/t.co\\/56a0vZUx7i"
},
"errors": [
{
"type": "string",
"title": "string",
"detail": "string",
"status": 42
}
]
}
Response examples (201)
{
"data": {
"id": "1346889436626259968",
"text": "Learn how to use the user Tweet timeline and user mention timeline endpoints in the Twitter API v2 to explore Tweet\\u2026 https:\\/\\/t.co\\/56a0vZUx7i"
},
"errors": [
{
"type": "string",
"title": "string",
"detail": "string",
"status": 42
}
]
}
Response examples (default)
{
"code": 42,
"message": "string"
}
Response examples (default)
{
"code": 42,
"message": "string"
}