DELETE /2/lists/:id

DELETE /2/lists/:id

Enables the authenticated user to delete a List that they own.

Endpoint URL

https://api.x.com/2/lists/: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): 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 to be deleted.


Example code with offical SDKs

TypeScript
Java
      (async () => {
  try {
    const deleteList = await twitterClient.lists.listIdDelete(
      //The ID of the List to delete
      1441162269824405510,
    );
    console.dir(deleteList, {
      depth: null,
    });
  } catch (error) {
    console.log(error);
  }
})();

    
      // Set the params values

//The ID of the List to delete
String id = "1441162269824405510"; 

try {
    ListDeleteResponse result = apiInstance.lists().listIdDelete(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ListsApi#listIdDelete");
    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": {
    "deleted": true
  }
}
    

Response fields

NameTypeDescription
deletedbooleanIndicates whether the List specified in the request has been deleted.