POST
/
2
/
tweets
curl --request POST \
  --url https://api.twitter.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>"
  },
  "media": {
    "media_ids": [
      "1146654567674912769"
    ],
    "tagged_user_ids": [
      "2244994945"
    ]
  },
  "nullcast": false,
  "poll": {
    "duration_minutes": 5042,
    "options": [
      "<string>"
    ],
    "reply_settings": "following"
  },
  "quote_tweet_id": "1346889436626259968",
  "reply": {
    "exclude_reply_user_ids": [
      "2244994945"
    ],
    "in_reply_to_tweet_id": "1346889436626259968"
  },
  "reply_settings": "following",
  "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": [
    {
      "detail": "<string>",
      "status": 123,
      "title": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Response

201
application/json
The request has succeeded.

The response is of type object.