Skip to main content
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 Creates a new community notes client instance

Parameters

NameTypeDescription
clientClientThe main X API client instance

Returns

CommunityNotesClient

Defined in

community_notes/client.ts:120

Methods

searchEligiblePosts

searchEligiblePosts(testMode, options?): Promise<Get2NotesSearchPostsEligibleForNotesResponse> Search for Posts Eligible for Community Notes Returns all the posts that are eligible for community notes.

Parameters

NameTypeDescription
testModebooleanIf 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.
optionsSearchEligiblePostsOptions-

Returns

Promise<Get2NotesSearchPostsEligibleForNotesResponse> Promise resolving to the API response

Defined in

community_notes/client.ts:137

searchWritten

searchWritten(testMode, options?): Promise<Get2NotesSearchNotesWrittenResponse> Search for Community Notes Written Returns all the community notes written by the user.

Parameters

NameTypeDescription
testModebooleanIf true, return the notes the caller wrote for the test. If false, return the notes the caller wrote on the product.
optionsSearchWrittenOptions-

Returns

Promise<Get2NotesSearchNotesWrittenResponse> Promise resolving to the API response

Defined in

community_notes/client.ts:231

delete

delete(id): Promise<DeleteNoteResponse> Delete a Community Note Deletes a community note.

Parameters

NameTypeDescription
idstringThe community note id to delete.

Returns

Promise<DeleteNoteResponse> Promise resolving to the API response

Defined in

community_notes/client.ts:295

evaluate

evaluate(options?): Promise<EvaluateNoteResponse> Evaluate a Community Note Endpoint to evaluate a community note.

Parameters

NameType
optionsEvaluateOptions

Returns

Promise<EvaluateNoteResponse> Promise resolving to the API response

Defined in

community_notes/client.ts:329

create

create(options?): Promise<CreateNoteResponse> Create a Community Note Creates a community note endpoint for LLM use case.

Parameters

NameType
optionsCreateOptions

Returns

Promise<CreateNoteResponse> Promise resolving to the API response

Defined in

community_notes/client.ts:368