DELETE /2/users/:id/retweets/:source_tweet_id

DELETE /2/users/:id/retweets/:source_tweet_id

Allows a user or authenticated user ID to remove the Retweet of a Tweet.

The request succeeds with no action when the user sends a request to a user they're not Retweeting the Tweet or have already removed the Retweet of.

Endpoint URL

https://api.x.com/2/users/:id/retweets/:source_tweet_id

Authentication and rate limits

Authentication methods
supported by this endpoint

OAuth 2.0 Authorization Code with PKCE

OAuth 1.0a is also available for this endpoint.

Rate limit

User rate limit (User context): 50 requests per 15-minute window per each authenticated user

OAuth 2.0 scopes required by this endpoint

tweet.read

tweet.write

users.read

Learn more about OAuth 2.0 Authorization Code with PKCE

Path parameters

NameTypeDescription
id
 Required 
stringThe user ID who you are removing a the Retweet of a Tweet on behalf of. It must match your own user ID or that of an authenticating user, meaning that you must pass the Access Tokens associated with the user ID when authenticating your request.
source_tweet_id
 Required 
stringThe ID of the Tweet that you would like the id to remove the Retweet of.


Example code with offical SDKs

TypeScript
Java
      (async () => {
  try {
    const deleteRetweet = await twitterClient.tweets.usersIdUnretweets(
      //The ID of the user that is requesting to unretweet the tweet
      "2244994945",

      //The ID of the tweet that the user is requesting to unretweet
      "1228393702244134912"
    );
    console.dir(deleteRetweet, {
      depth: null,
    });
  } catch (error) {
    console.log(error);
  }
})();

    
      // String | The ID of the user that is requesting to unretweet the tweet
String id = "2244994945";

// String | The ID of the tweet that the user is requesting to unretweet
String sourceTweetId = "1228393702244134912";

try {  
    UsersRetweetsDeleteResponse result = apiInstance.tweets().usersIdUnretweets(id, sourceTweetId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TweetsApi#usersIdUnretweets");
    System.err.println("Status code: " + e.getCode());
    System.err.println("Reason: " + e.getResponseBody());
    System.err.println("Response headers: " + e.getResponseHeaders());
    e.printStackTrace();
  }

    

Example responses

Successful response
      {
  "data": {
    "retweeted": false
  }
}
    

Response fields

NameTypeDescription
retweetedbooleanIndicates whether the user has removed the Retweet of the specified Tweet as a result of this request. The returned value is false for a successful unretweet request.