DELETE /2/users/:id/bookmarks/:tweet_id

DELETE /2/users/:id/bookmarks/:tweet_id

Allows a user or authenticated user ID to remove a Bookmark of a Tweet.

Endpoint URL

https://api.x.com/2/users/:id/bookmarks/:tweet_id

Authentication and rate limits

Authentication methods
supported by this endpoint

OAuth 2.0 Authorization Code with PKCE

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

users.read

bookmark.write

Learn more about OAuth 2.0 Authorization Code with PKCE

Path parameters

NameTypeDescription
id
 Required 
stringThe user ID of an authenticated user who you are removing a Bookmark 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.
tweet_id
 Required 
stringThe ID of the Tweet that you would like the id to remove a Bookmark of.


Example code with offical SDKs

TypeScript
Java
      (async () => {
  try {
    const removeBookmark =
      await twitterClient.bookmarks.usersIdBookmarksDelete(
        //The ID of the user whose bookmark is to be removed.
        "2244994945",

        //The ID of the tweet that the user is removing from bookmarks
        "1228393702244134912"
      );
    console.dir(removeBookmark, {
      depth: null,
    });
  } catch (error) {
    console.log(error);
  }
})();

    
      // String | The ID of the user whose bookmark is to be removed.
String id = "2244994945";

// String | The ID of the tweet that the user is removing from bookmarks
String tweetId = "1228393702244134912";

try {  
    BookmarkMutationResponse result = apiInstance.bookmarks().usersIdBookmarksDelete(id, tweetId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BookmarksApi#usersIdBookmarksDelete");
    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": {
    "bookmarked": false
  }
}
    

Response fields

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