> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ListsClient

> Reference for the ListsClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 lists endpoints.

Client for lists operations

This client provides methods for interacting with the lists endpoints
of the X API. It handles authentication, request formatting, and response
parsing for all lists related operations.

## Constructors

### constructor

• **new ListsClient**(`client`): [`ListsClient`](/xdks/typescript/reference/classes/ListsClient)

Creates a new lists client instance

#### Parameters

| Name     | Type                                                  | Description                    |
| :------- | :---------------------------------------------------- | :----------------------------- |
| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance |

#### Returns

[`ListsClient`](/xdks/typescript/reference/classes/ListsClient)

#### Defined in

[lists/client.ts:294](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L294)

## Methods

### getFollowers

▸ **getFollowers**(`id`, `options`): `Promise`\<`Response`>

Get List followers
Retrieves a list of Users who follow a specific List by its ID.

#### Parameters

| Name      | Type                                                                | Description         |
| :-------- | :------------------------------------------------------------------ | :------------------ |
| `id`      | `string`                                                            | The ID of the List. |
| `options` | `GetFollowersOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                   |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[lists/client.ts:339](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L339)

▸ **getFollowers**(`id`, `options?`): `Promise`\<[`Get2ListsIdFollowersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdFollowersResponse)>

#### Parameters

| Name       | Type                  |
| :--------- | :-------------------- |
| `id`       | `string`              |
| `options?` | `GetFollowersOptions` |

#### Returns

`Promise`\<[`Get2ListsIdFollowersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdFollowersResponse)>

#### Defined in

[lists/client.ts:352](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L352)

***

### create

▸ **create**(`options`): `Promise`\<`Response`>

Create List
Creates a new List for the authenticated user.

#### Parameters

| Name      | Type                                                          |
| :-------- | :------------------------------------------------------------ |
| `options` | `CreateOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[lists/client.ts:560](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L560)

▸ **create**(`options?`): `Promise`\<[`ListCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListCreateResponse)>

#### Parameters

| Name       | Type            |
| :--------- | :-------------- |
| `options?` | `CreateOptions` |

#### Returns

`Promise`\<[`ListCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListCreateResponse)>

#### Defined in

[lists/client.ts:569](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L569)

***

### getMembers

▸ **getMembers**(`id`, `options`): `Promise`\<`Response`>

Get List members
Retrieves a list of Users who are members of a specific List by its ID.

#### Parameters

| Name      | Type                                                              | Description         |
| :-------- | :---------------------------------------------------------------- | :------------------ |
| `id`      | `string`                                                          | The ID of the List. |
| `options` | `GetMembersOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                   |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[lists/client.ts:665](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L665)

▸ **getMembers**(`id`, `options?`): `Promise`\<[`Get2ListsIdMembersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdMembersResponse)>

#### Parameters

| Name       | Type                |
| :--------- | :------------------ |
| `id`       | `string`            |
| `options?` | `GetMembersOptions` |

#### Returns

`Promise`\<[`Get2ListsIdMembersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdMembersResponse)>

#### Defined in

[lists/client.ts:678](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L678)

***

### addMember

▸ **addMember**(`id`, `options`): `Promise`\<`Response`>

Add List member
Adds a User to a specific List by its ID.

#### Parameters

| Name      | Type                                                             | Description                                   |
| :-------- | :--------------------------------------------------------------- | :-------------------------------------------- |
| `id`      | `string`                                                         | The ID of the List for which to add a member. |
| `options` | `AddMemberOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                                             |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[lists/client.ts:890](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L890)

▸ **addMember**(`id`, `options?`): `Promise`\<[`ListMutateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListMutateResponse)>

#### Parameters

| Name       | Type               |
| :--------- | :----------------- |
| `id`       | `string`           |
| `options?` | `AddMemberOptions` |

#### Returns

`Promise`\<[`ListMutateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListMutateResponse)>

#### Defined in

[lists/client.ts:903](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L903)

***

### getPosts

▸ **getPosts**(`id`, `options`): `Promise`\<`Response`>

Get List Posts
Retrieves a list of Posts associated with a specific List by its ID.

#### Parameters

| Name      | Type                                                            | Description         |
| :-------- | :-------------------------------------------------------------- | :------------------ |
| `id`      | `string`                                                        | The ID of the List. |
| `options` | `GetPostsOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                   |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[lists/client.ts:1011](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1011)

▸ **getPosts**(`id`, `options?`): `Promise`\<[`Get2ListsIdTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdTweetsResponse)>

#### Parameters

| Name       | Type              |
| :--------- | :---------------- |
| `id`       | `string`          |
| `options?` | `GetPostsOptions` |

#### Returns

`Promise`\<[`Get2ListsIdTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdTweetsResponse)>

#### Defined in

[lists/client.ts:1024](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1024)

***

### removeMemberByUserId

▸ **removeMemberByUserId**(`id`, `userId`, `options`): `Promise`\<`Response`>

Remove List member
Removes a User from a specific List by its ID and the User’s ID.

#### Parameters

| Name                         | Type     | Description                                        |
| :--------------------------- | :------- | :------------------------------------------------- |
| `id`                         | `string` | The ID of the List to remove a member.             |
| `userId`                     | `string` | The ID of User that will be removed from the List. |
| `options`                    | `Object` | -                                                  |
| `options.requestOptions`     | `Object` | -                                                  |
| `options.requestOptions.raw` | `true`   | -                                                  |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[lists/client.ts:1303](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1303)

▸ **removeMemberByUserId**(`id`, `userId`): `Promise`\<[`ListMutateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListMutateResponse)>

#### Parameters

| Name     | Type     |
| :------- | :------- |
| `id`     | `string` |
| `userId` | `string` |

#### Returns

`Promise`\<[`ListMutateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListMutateResponse)>

#### Defined in

[lists/client.ts:1320](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1320)

***

### getById

▸ **getById**(`id`, `options`): `Promise`\<`Response`>

Get List by ID
Retrieves details of a specific List by its ID.

#### Parameters

| Name      | Type                                                           | Description         |
| :-------- | :------------------------------------------------------------- | :------------------ |
| `id`      | `string`                                                       | The ID of the List. |
| `options` | `GetByIdOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                   |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[lists/client.ts:1423](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1423)

▸ **getById**(`id`, `options?`): `Promise`\<[`Get2ListsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdResponse)>

#### Parameters

| Name       | Type             |
| :--------- | :--------------- |
| `id`       | `string`         |
| `options?` | `GetByIdOptions` |

#### Returns

`Promise`\<[`Get2ListsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdResponse)>

#### Defined in

[lists/client.ts:1436](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1436)

***

### update

▸ **update**(`id`, `options`): `Promise`\<`Response`>

Update List
Updates the details of a specific List owned by the authenticated user by its ID.

#### Parameters

| Name      | Type                                                          | Description                   |
| :-------- | :------------------------------------------------------------ | :---------------------------- |
| `id`      | `string`                                                      | The ID of the List to modify. |
| `options` | `UpdateOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                             |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[lists/client.ts:1610](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1610)

▸ **update**(`id`, `options?`): `Promise`\<[`ListUpdateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListUpdateResponse)>

#### Parameters

| Name       | Type            |
| :--------- | :-------------- |
| `id`       | `string`        |
| `options?` | `UpdateOptions` |

#### Returns

`Promise`\<[`ListUpdateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListUpdateResponse)>

#### Defined in

[lists/client.ts:1623](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1623)

***

### delete

▸ **delete**(`id`, `options`): `Promise`\<`Response`>

Delete List
Deletes a specific List owned by the authenticated user by its ID.

#### Parameters

| Name                         | Type     | Description                   |
| :--------------------------- | :------- | :---------------------------- |
| `id`                         | `string` | The ID of the List to delete. |
| `options`                    | `Object` | -                             |
| `options.requestOptions`     | `Object` | -                             |
| `options.requestOptions.raw` | `true`   | -                             |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[lists/client.ts:1731](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1731)

▸ **delete**(`id`): `Promise`\<[`ListDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.ListDeleteResponse)>

#### Parameters

| Name | Type     |
| :--- | :------- |
| `id` | `string` |

#### Returns

`Promise`\<[`ListDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.ListDeleteResponse)>

#### Defined in

[lists/client.ts:1744](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1744)
