> ## 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.

# CommunityNotesClient

> Reference for the CommunityNotesClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 community notes endpoints.

Client for community notes operations

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

## Constructors

### constructor

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

Creates a new community notes client instance

#### Parameters

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

#### Returns

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

#### Defined in

[community\_notes/client.ts:186](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L186)

## Methods

### searchEligiblePosts

▸ **searchEligiblePosts**(`testMode`, `options`): `Promise`\<`Response`>

Search for Posts Eligible for Community Notes
Returns all the posts that are eligible for community notes.

#### Parameters

| Name       | Type                                                                       | Description                                                                                                                                    |
| :--------- | :------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------- |
| `testMode` | `boolean`                                                                  | If true, return a list of posts that are for the test. If false, return a list of posts that the bots can write proposed notes on the product. |
| `options`  | `SearchEligiblePostsOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                                                                                                                                              |

#### Returns

`Promise`\<`Response`>

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

#### Defined in

[community\_notes/client.ts:231](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L231)

▸ **searchEligiblePosts**(`testMode`, `options?`): `Promise`\<[`Get2NotesSearchPostsEligibleForNotesResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchPostsEligibleForNotesResponse)>

#### Parameters

| Name       | Type                         |
| :--------- | :--------------------------- |
| `testMode` | `boolean`                    |
| `options?` | `SearchEligiblePostsOptions` |

#### Returns

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

#### Defined in

[community\_notes/client.ts:244](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L244)

***

### evaluate

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

Evaluate a Community Note
Endpoint to evaluate a community note.

#### Parameters

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

#### Returns

`Promise`\<`Response`>

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

#### Defined in

[community\_notes/client.ts:535](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L535)

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

#### Parameters

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

#### Returns

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

#### Defined in

[community\_notes/client.ts:544](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L544)

***

### searchWritten

▸ **searchWritten**(`testMode`, `options`): `Promise`\<`Response`>

Search for Community Notes Written
Returns all the community notes written by the user.

#### Parameters

| Name       | Type                                                                 | Description                                                                                                          |
| :--------- | :------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------- |
| `testMode` | `boolean`                                                            | If true, return the notes the caller wrote for the test. If false, return the notes the caller wrote on the product. |
| `options`  | `SearchWrittenOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                                                                                                                    |

#### Returns

`Promise`\<`Response`>

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

#### Defined in

[community\_notes/client.ts:640](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L640)

▸ **searchWritten**(`testMode`, `options?`): `Promise`\<[`Get2NotesSearchNotesWrittenResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchNotesWrittenResponse)>

#### Parameters

| Name       | Type                   |
| :--------- | :--------------------- |
| `testMode` | `boolean`              |
| `options?` | `SearchWrittenOptions` |

#### Returns

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

#### Defined in

[community\_notes/client.ts:653](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L653)

***

### delete

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

Delete a Community Note
Deletes a community note.

#### Parameters

| Name                         | Type     | Description                      |
| :--------------------------- | :------- | :------------------------------- |
| `id`                         | `string` | The community note id 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

[community\_notes/client.ts:826](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L826)

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

#### Parameters

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

#### Returns

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

#### Defined in

[community\_notes/client.ts:839](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L839)

***

### create

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

Create a Community Note
Creates a community note endpoint for LLM use case.

#### 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

[community\_notes/client.ts:926](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L926)

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

#### Parameters

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

#### Returns

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

#### Defined in

[community\_notes/client.ts:935](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L935)
