DELETE /2/users/:source_user_id/muting/:target_user_id

DELETE /2/users/:source_user_id/muting/:target_user_id

Allows an authenticated user ID to unmute the target user.

The request succeeds with no action when the user sends a request to a user they're not muting or have already unmuted.

Endpoint URL

https://api.x.com/2/users/:source_user_id/muting/:target_user_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

users.read

mute.write

Learn more about OAuth 2.0 Authorization Code with PKCE

Path parameters

NameTypeDescription
source_user_id
 Required 
stringThe user ID who you would like to initiate an unmute on behalf of. The user’s ID must correspond to the user ID of the authenticating user, meaning that you must pass the Access Tokens associated with the user ID when authenticating your request.
target_user_id
 Required 
stringThe user ID of the user that you would like the source_user_id to unmute.


Example code with offical SDKs

TypeScript
Java
      (async () => {
  try {
    const unmuteUser = await twitterClient.users.usersIdUnmute(
      //The ID of the user that is requesting to unmute the target user
      "2244994945",

      //The ID of the user that the source user is requesting to unmute
      "6253282"
    );
    console.dir(unmuteUser, {
      depth: null,
    });
  } catch (error) {
    console.log(error);
  }
})();

    
      // Set the params values

// String | The ID of the user that is requesting to unmute the target user
String sourceUserId = "2244994945";

// String | The ID of the user that the source user is requesting to unmute
String targetUserId = "6253282";

try {
    UsersMutingMutationResponse result = apiInstance.users().usersIdUnmute(sourceUserId, targetUserId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UsersApi#usersIdUnmute");
    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": {
    "muting": false
  }
}
    

Response fields

NameTypeDescription
mutingbooleanIndicates whether the user is muting the specified user as a result of this request. The returned value is false for a successful unmute request.