PUT /2/lists/:id

Enables the authenticated user to update the meta data of a specified List that they own.

Endpoint URL

https://api.twitter.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 updated.


JSON body parameters

NameTypeDescription
description
 Optional 
stringUpdates the description of the List.
name
 Optional 
stringUpdates the name of the List.
private
 Optional 
booleanDetermines whether the List should be private.


Example code with offical SDKs

      (async () => {
  try {
    const updateList = await twitterClient.lists.listIdUpdate(
      //The ID of the List to modify
      1441163524802158595,
      {
        name: "test v2 create list",
        description: "example code",
        private: false,
      }
    );
    console.dir(updateList, {
      depth: null,
    });
  } catch (error) {
    console.log(error);
  }
})();

    
      // Set the params values

ListUpdateRequest listUpdateRequest = new ListUpdateRequest();
listUpdateRequest.name("test v2 update list");
listUpdateRequest.description("example update");
listUpdateRequest.private(false);

// String | The ID of the List to modify
String id = "1441163524802158595";

try {
    ListUpdateResponse result = apiInstance.lists().listIdUpdate(listUpdateRequest, id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ListsApi#listIdUpdate");
    System.err.println("Status code: " + e.getCode());
    System.err.println("Reason: " + e.getResponseBody());
    System.err.println("Response headers: " + e.getResponseHeaders());
    e.printStackTrace();
}

    

Example responses

      {
  "data": {
    "updated": true
  }
}
    

Response fields

NameTypeDescription
updatedbooleanIndicates whether the List specified in the request has been updated.