DELETE /2/lists/:id/members/:user_id

DELETE /2/lists/:id/members/:user_id

Enables the authenticated user to remove a member from a List they own.

Endpoint URL

https://api.x.com/2/lists/:id/members/:user_id

Authentication and rate limits

Authentication methods
supported by this endpoint

OAuth 1.0a is also available for this endpoint.

OAuth 2.0 Authorization Code with PKCE

Rate limit

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

OAuth 2.0 scopes required by this endpoint

tweet.read

users.read

list.write

Learn more about OAuth 2.0 Authorization Code with PKCE

Path parameters

NameTypeDescription
id
 Required 
stringThe ID of the List you are removing a member from.
user_id
 Required 
stringThe ID of the user you wish to remove as a member of the List.


Example code with offical SDKs

TypeScript
Java
      (async () => {
  try {
    const removeMember = await twitterClient.lists.listRemoveMember(
      //The ID of the List to remove a member
      1441162269824405510,

      //The ID of user that will be removed from the List
      2244994945
    );
    console.dir(removeMember, {
      depth: null,
    });
  } catch (error) {
    console.log(error);
  }
})();

    
      // Set the params values

// String |The ID of the List to remove a member
String id = "1441162269824405510"; 

// String | The ID of user that will be removed from the List
String userId = "2244994945";
try {
    ListMemberResponse result = apiInstance.lists().listRemoveMember(id, userId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ListsApi#listRemoveMember");
    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": {
    "is_member": false
  }
}
    

Response fields

NameTypeDescription
is_memberbooleanIndicates whether the member specified in the request has been removed from the List.