Manage Posts
Creation of a Post
Overview
- Introduction
- Getting started
- Tools and libraries
- Migration guide
- What to build
- Fundamentals
Posts
- Search
- Post Counts
- Filtered Stream
- Timelines
- Post Lookup
- Bookmarks
- Manage Posts
- Reposts
- Quotes
- Hide replies
- Volume Streams
Users
- User Lookup
- Search
- Follows
- Mutes
- Blocks
Engagement Metrics
Direct Messages
- Manage
- Lookup
- Blocks
Likes
- Introduction
- Guides
- GETReturns Post objects liked by the provided User ID
- GETReturns User objects that have liked the provided Post ID
- POSTCauses the User (in the path) to like the specified Post
- DELCauses the User (in the path) to unlike the specified Post
- GETLikes Firehose stream
- GETLikes Sample 10 stream
Lists
- Lookup Lists
- Lookup List Posts
- Manage Lists
- List Members
- Pinned Lists
Spaces
- Introduction
- Spaces Lookup
- Search Spaces
Communities
- Communities Lookup
- Search Communities
Trends
- Trends
- Personalized Trends
Media
- Introduction
- Upload
- Metadata
Compliance
- Batch Compliance
- Compliance streams
Enterprise (Gnip 2.0)
Manage Posts
Creation of a Post
Causes the User to create a Post under the authorized account.
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
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
.
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>"
}
]
}