Skip to main content
POST
/
2
/
tweets
पोस्ट बनाएँ या संपादित करें
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>"
  },
  "nullcast": false,
  "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"
}
'
{
  "errors": [
    {
      "title": "<string>",
      "type": "<string>",
      "detail": "<string>",
      "status": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json
card_uri
string

Card Uri पैरामीटर। यह Quote Tweet Id, Poll, Media और Direct Message Deep Link के साथ mutually exclusive है।

community_id
string

इस Community का अद्वितीय पहचानकर्ता।

Pattern: ^[0-9]{1,19}$
Example:

"1146654567674912769"

बातचीत को सार्वजनिक timeline से निजी Direct Message में ले जाने का लिंक।

edit_options
object

किसी मौजूदा पोस्ट को संपादित करने के विकल्प। दिए जाने पर, यह अनुरोध नया पोस्ट बनाने के बजाय निर्दिष्ट पोस्ट को संपादित करेगा।

for_super_followers_only
boolean
default:false

Super followers के लिए exclusive Tweet।

geo
object

जियोलोकेशन के लिए Tweet से जोड़ा जा रहा Place ID।

media
object

बनाए जा रहे Tweet से जोड़ी जा रही media जानकारी। यह Quote Tweet Id, Poll और Card URI के साथ mutually exclusive है।

nullcast
boolean
default:false

Nullcasted (केवल promoted) पोस्ट्स सार्वजनिक timeline में दिखाई नहीं देते और फ़ॉलोअर्स को नहीं दिखाए जाते।

poll
object

poll वाले Tweet के लिए poll विकल्प। यह Media, Quote Tweet Id और Card URI के साथ mutually exclusive है।

quote_tweet_id
string

इस Tweet का विशिष्ट पहचानकर्ता। इसे स्ट्रिंग के रूप में लौटाया जाता है, ताकि उन भाषाओं और टूल्स में जटिलताओं से बचा जा सके जो बड़े पूर्णांकों को संभाल नहीं सकते।

Pattern: ^[0-9]{1,19}$
Example:

"1346889436626259968"

reply
object

जिस Tweet का जवाब दिया जा रहा है, उसकी Tweet जानकारी।

reply_settings
enum<string>

यह बताने वाली सेटिंग कि Tweet का जवाब कौन दे सकता है।

Available options:
following,
mentionedUsers,
subscribers,
verified
share_with_followers
boolean
default:false

कम्युनिटी पोस्ट को फ़ॉलोअर्स के साथ भी साझा करें।

text
string

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"

Response

अनुरोध सफल रहा है।

data
object
errors
object[]
Minimum array length: 1

IETF RFC 7807 (https://tools.ietf.org/html/rfc7807) में परिभाषित एक HTTP Problem Details ऑब्जेक्ट।