DELETE /2/users/:id/pinned_lists/:list_id

DELETE /2/users/:id/pinned_lists/:list_id

Enables the authenticated user to unpin a List.

Endpoint URL

https://api.x.com/2/users/:id/pinned_lists/:list_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): 50 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 user ID who you are unpin a List 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.
list_id
 Required 
stringThe ID of the List that you would like the user id to unpin.


Example code with offical SDKs

TypeScript
Java
      (async () => {
  try {
    const unpinList = await twitterClient.lists.listUserUnpin(
      //The ID of the authenticated source user that will remove the pinned List
      2244994945,

      //The ID of the List to unpin
      1441162269824405510
    );
    console.dir(unpinList, {
      depth: null,
    });
  } catch (error) {
    console.log(error);
  }
})();

    
      // Set the params values

// String | The ID of the authenticated source user that will remove the pinned List
String id = "2244994945"; 

// String | The ID of the List to unpin
String listId = "1441162269824405510";
try {
    ListPinnedResponse result = apiInstance.lists().listUserUnpin(id, listId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ListsApi#listUserUnpin");
    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": {
    "pinned": false
  }
}
    

Response fields

NameTypeDescription
pinnedbooleanIndicates whether the user unpinned the specified List as a result of the request.