Skip to main content
Access Lists endpoints via client.Lists (ListsClient).

Methods

AddMemberAsync

POST /2/lists/{id}/members Add List Member Adds a User to a specific List by its ID.

Parameters

string
required
id (path parameter).
AddListsMemberRequest
required
Request payload.
Returns: Task<AddListsMemberResponse>

CreateAsync

POST /2/lists Create List Creates a new List for the authenticated user.

Parameters

CreateListsRequest
required
Request payload.
Returns: Task<CreateListsResponse>

DeleteAsync

DELETE /2/lists/{id} Delete List Deletes a specific List owned by the authenticated user by its ID.

Parameters

string
required
id (path parameter).
Returns: Task<DeleteListsResponse>

GetByIdAsync

GET /2/lists/{id} Get List by ID Retrieves details of a specific List by its ID.

Parameters

string
required
id (path parameter).
Returns: Task<GetListsByIdResponse>

GetFollowersAsync

GET /2/lists/{id}/followers Paginated Get List Followers Retrieves a list of Users who follow a specific List by its ID.

Parameters

string
required
id (path parameter).
Returns: Task<GetListsFollowersResponse> (use GetFollowersPages(...) for IAsyncEnumerable page iteration)

GetMembersAsync

GET /2/lists/{id}/members Paginated Get List Members Retrieves a list of Users who are members of a specific List by its ID.

Parameters

string
required
id (path parameter).
Returns: Task<GetListsMembersResponse> (use GetMembersPages(...) for IAsyncEnumerable page iteration)

GetPostsAsync

GET /2/lists/{id}/tweets Paginated Get List Posts Retrieves a list of Posts associated with a specific List by its ID.

Parameters

string
required
id (path parameter).
Returns: Task<GetListsPostsResponse> (use GetPostsPages(...) for IAsyncEnumerable page iteration)

RemoveMemberByUserIdAsync

DELETE /2/lists/{id}/members/{user_id} Remove List Member Removes a User from a List by their ID.

Parameters

string
required
id (path parameter).
string
required
user_id (path parameter).
Returns: Task<RemoveListsMemberByUserIdResponse>

UpdateAsync

PUT /2/lists/{id} Update List Updates the details of a specific List owned by the authenticated user by its ID.

Parameters

string
required
id (path parameter).
UpdateListsRequest
required
Request payload.
Returns: Task<UpdateListsResponse>