SDKs // TypeScript // Resources
client.lists
Last verified
Use client.lists in the Reverse Contact TypeScript SDK to create Lists, manage members, import data, follow operations and export CSV with typed methods.
Create Lists, manage their members, and follow import operations.
| Method | Endpoint | Cost |
|---|---|---|
client.lists.list() | All Lists | Free. |
client.lists.create() | Create a List | Free. |
client.lists.retrieve() | Get a List | Free. |
client.lists.delete() | Delete a List | Free. |
client.lists.importSignals() | Import members and data | Free to queue. Each new member costs its identity price. Each data family you request costs the same as its endpoint, up to your maxCredits. |
client.lists.export() | Export a List | Free. |
client.lists.listAll() | All Lists | Free. |
client.lists.members.list() | List members | Free. |
client.lists.members.add() | Add members | Free to call. Each new person costs 1 credit from a Social profile URL (2 with live), 2 from an email or a name. Each new company costs 1 credit from a company page URL or a company id (2 when the page is read live), 2 from a domain. A member already on the List, or a Signal no one matches, is free. |
client.lists.members.remove() | Remove members | Free. |
client.lists.members.listAll() | List members | Free. |
client.lists.operations.retrieve() | Read a List operation | Free even with a zero balance. Does not count against rate limits. |
client.lists.operations.cancel() | Cancel a List operation | Free. Lines that had not started are never charged. |
client.lists.operations.wait() | Read a List operation | Free even with a zero balance. Does not count against rate limits. |
Create client by following Install and configure. The examples use listId, operationId and memberId values saved from earlier responses. The @reverse-contact/sdk package exports Body, Data, Query and the other types used in the signatures.
JSON responses contain data and optional quotas and metadata. They also include the original response, with its body already read. See First call for response handling.
HTTP errors use the APIError subclasses and retry rules: BadRequestError, AuthenticationError, InsufficientCreditsError, PermissionDeniedError, NotFoundError, ConflictError, GoneError, UnprocessableEntityError, RateLimitError, DailyLimitError, KeyCreditLimitError, UnavailableForLegalReasonsError and InternalServerError, according to the API response. Other statuses use APIError.
list()
Signature
client.lists.list(
params?: Query<"listLists">,
options?: RequestOptions
): Promise<Page<Data<"listLists">["items"][number], undefined>>Parameters
| Name | Type | Description |
|---|---|---|
params | Query<"listLists"> | Query parameters. Omit to use the defaults. |
params.perPage | number | Lists per page, from 1 to 200. Defaults to 200. |
params.cursor | string | The nextCursor of the previous page. A malformed cursor, or one sent with other parameters, returns 400. |
options | RequestOptions | Optional per-request timeout, maxRetries, headers and signal. See Client options. |
Returns
A Page with results in data and pagination through nextCursor, hasNextPage() and getNextPage(). The page also includes optional quotas and metadata, and the original response.
Errors
Calls can raise the HTTP APIError subclasses listed above. Network failures or cancellation raise APIConnectionError, and attempt timeouts raise APITimeoutError. ReverseContactError reports invalid SDK options or an invalid successful JSON response.
Example
Example
const page = await client.lists.list({ perPage: 20 });
for (const list of page.data) console.log(list.id, list.name);create()
The SDK generates an Idempotency-Key if you omit it and reuses the key on automatic retries. Save your own key if you need to repeat the request after a restart.
Signature
client.lists.create(
params: Body<"createList">,
options?: IdempotentRequestOptions
): Promise<Result<Data<"createList">>>Parameters
| Name | Type | Description |
|---|---|---|
params required | Body<"createList"> | Request body. See the fields and their requirements below. |
params.name required | string | List name, 1 to 200 characters. Spaces around it are removed. |
params.entity required | "persons" | "companies" | persons for people, companies for companies |
options | IdempotentRequestOptions | Optional per-request timeout, maxRetries, headers and signal. See Client options. Also accepts idempotencyKey. The SDK generates a key if you omit it. |
Returns
A response with the new List in data. Save data.id for later operations.
Errors
Calls can raise the HTTP APIError subclasses listed above. Network failures or cancellation raise APIConnectionError, and attempt timeouts raise APITimeoutError. ReverseContactError reports invalid SDK options or an invalid successful JSON response.
Example
Example
const created = await client.lists.create(
{ name: "Prospects", entity: "persons" },
{ idempotencyKey: "prospects-2026-11-04" }
);
console.log(created.data.id);retrieve()
Signature
client.lists.retrieve(
listId: string,
params?: Query<"getList">,
options?: RequestOptions
): Promise<Result<Data<"getList">>>Parameters
| Name | Type | Description |
|---|---|---|
listId required | string | List UUID from client.lists.create() or client.lists.list(). |
params | Query<"getList"> | Query parameters. Omit to use the defaults. |
params.perPage | number | Rows per page, from 1 to 1,000. Defaults to 100. |
params.cursor | string | The nextCursor of the previous page, sent with the same kind. A malformed cursor, or one sent with other parameters, returns 400. |
params.kind | "all" | "members" | "pending" | all (default) combines members and Pending Intake by added date. Use members or pending to return only that kind |
options | RequestOptions | Optional per-request timeout, maxRetries, headers and signal. See Client options. |
Returns
A response envelope with List details, data.members and data.nextCursor. This method does not return a Page object.
Errors
Calls can raise the HTTP APIError subclasses listed above. Network failures or cancellation raise APIConnectionError, and attempt timeouts raise APITimeoutError. ReverseContactError reports invalid SDK options or an invalid successful JSON response.
Example
Example
const result = await client.lists.retrieve(listId, { kind: "all", perPage: 100 });
console.log(result.data.members, result.data.nextCursor);delete()
Signature
client.lists.delete(
listId: string,
options?: RequestOptions
): Promise<Result<Data<"deleteList">>>Parameters
| Name | Type | Description |
|---|---|---|
listId required | string | List UUID from client.lists.create() or client.lists.list(). |
options | RequestOptions | Optional per-request timeout, maxRetries, headers and signal. See Client options. |
Returns
A response envelope containing the deletion acknowledgement in data.
Errors
Calls can raise the HTTP APIError subclasses listed above. Network failures or cancellation raise APIConnectionError, and attempt timeouts raise APITimeoutError. ReverseContactError reports invalid SDK options or an invalid successful JSON response.
Example
Example
const result = await client.lists.delete(listId);
console.log(result.data);importSignals()
Send signals or sourceUrl, not both. The SDK generates operationId when omitted. Keep your own operation UUID to resume after a restart. Inspect clientAction and nextStep before resending. You must set maxCredits when you request data families and the worst-case cost of the operation exceeds 25 credits.
Signature
client.lists.importSignals(
listId: string,
params: Body<"importListSignals">,
options?: RequestOptions
): Promise<Result<Data<"importListSignals">>>Parameters
| Name | Type | Description |
|---|---|---|
listId required | string | List UUID from client.lists.create() or client.lists.list(). |
params required | Body<"importListSignals"> | Request body. See the fields and their requirements below. |
params.signals conditional | Body<"importListSignals">["signals"] | 1 to 25,000 Signals, with the fields of Add members, externalId included |
params.sourceUrl conditional | string | A public HTTPS CSV file or Google Sheet URL instead of signals: up to 25,000 rows and 25 MiB. Columns are matched from their headers (Social URL, email, first name, last name, company, domain). |
params.live | boolean | true fetches the profile of each Social profile URL live. Omitted or false, saved data is used. No effect on a companies List. |
params.families | ("profile" | "contact_email" | "contact_phone" | "company")[] | Data to buy for each member: profile, company, contact_email, contact_phone. A companies List takes company only. |
params.maxCredits conditional | number | The most this operation may spend. Required with families when the worst case is above 25 credits. If omitted, the ceiling is the worst-case cost of the import. |
params.operationId | string | Your UUID for this operation. Sending the same request again with it returns the same operation and never charges twice. |
params.webhookUrl | string | Public HTTPS URL that receives a callback each time the operation stops moving. See Webhook callback |
options | RequestOptions | Optional per-request timeout, maxRetries, headers and signal. See Client options. |
Returns
An operation acknowledgement in data, including operationId and pollUrl. Call client.lists.operations.wait(listId, operationId) to follow progress. See Lists and Bulk enrichment.
Errors
Calls can raise the HTTP APIError subclasses listed above. Network failures or cancellation raise APIConnectionError, and attempt timeouts raise APITimeoutError. ReverseContactError reports invalid SDK options or an invalid successful JSON response.
Example
Example
const imported = await client.lists.importSignals(listId, {
signals: [{ email: "jane@acme.com", externalId: "crm-001" }],
families: ["contact_email"],
maxCredits: 100
});
console.log("Save operation id:", imported.data.operationId);
const progress = await client.lists.operations.wait(listId, imported.data.operationId);
console.log(progress.data.clientAction, progress.data.nextStep);export()
Signature
client.lists.export(
listId: string,
options?: RequestOptions
): Promise<string>Parameters
| Name | Type | Description |
|---|---|---|
listId required | string | List UUID from client.lists.create() or client.lists.list(). |
options | RequestOptions | Optional per-request timeout, maxRetries, headers and signal. See Client options. |
Returns
A CSV string, not a JSON response envelope.
Errors
Calls can raise the HTTP APIError subclasses listed above. Network failures or cancellation raise APIConnectionError, and attempt timeouts raise APITimeoutError. ReverseContactError reports invalid SDK options.
Example
Example
const csv = await client.lists.export(listId);
console.log(csv);listAll()
Signature
client.lists.listAll(
params?: Query<"listLists">,
options?: ListIteratorOptions
): AsyncGenerator<Data<"listLists">["items"][number], void, unknown>Parameters
| Name | Type | Description |
|---|---|---|
params | Query<"listLists"> | Query parameters. Omit to use the defaults. |
params.perPage | number | Lists per page, from 1 to 200. Defaults to 200. |
params.cursor | string | The nextCursor of the previous page. A malformed cursor, or one sent with other parameters, returns 400. |
options | ListIteratorOptions | Optional maxResults, a nonnegative safe integer. Omit to read all pages. Also accepts request options. |
Returns
An AsyncGenerator of individual results. The iterator requests pages as needed. A repeated cursor raises ReverseContactError.
Errors
Calls can raise the HTTP APIError subclasses listed above. Network failures or cancellation raise APIConnectionError, and attempt timeouts raise APITimeoutError. ReverseContactError reports invalid SDK options or an invalid successful JSON response. ReverseContactError also reports invalid perPage or maxResults values and repeated cursors.
Example
Example
for await (const list of client.lists.listAll()) {
console.log(list.id, list.name);
}members.list()
Signature
client.lists.members.list(
listId: string,
params?: Query<"listListMembers">,
options?: RequestOptions
): Promise<Page<Data<"listListMembers">["items"][number], undefined>>Parameters
| Name | Type | Description |
|---|---|---|
listId required | string | List UUID from client.lists.create() or client.lists.list(). |
params | Query<"listListMembers"> | Query parameters. Omit to use the defaults. |
params.perPage | number | Rows per page, from 1 to 1,000. Defaults to 100. |
params.cursor | string | The nextCursor of the previous page, sent with the same filters. A malformed cursor, or one sent with other filters, returns 400. |
params.kind | "all" | "members" | "pending" | all (default) combines members and Pending Intake by added date. Use members or pending to return only that kind |
params.externalId | string | Returns members with this identifier from your system (1 to 200 characters) |
options | RequestOptions | Optional per-request timeout, maxRetries, headers and signal. See Client options. |
Returns
A Page with results in data and pagination through nextCursor, hasNextPage() and getNextPage(). The page also includes optional quotas and metadata, and the original response. Member pages also expose memberCount, pendingIntakeCount and extras.
Errors
Calls can raise the HTTP APIError subclasses listed above. Network failures or cancellation raise APIConnectionError, and attempt timeouts raise APITimeoutError. ReverseContactError reports invalid SDK options or an invalid successful JSON response.
Example
Example
const page = await client.lists.members.list(listId, { kind: "members", perPage: 100 });
console.log(page.data, page.memberCount, page.pendingIntakeCount);members.add()
Add up to 1,000 Signals. If any Signal is invalid, the API rejects the whole request before charging. error.details.signalIndex identifies the invalid entry.
Signature
client.lists.members.add(
listId: string,
params: Body<"addListMembers">,
options?: RequestOptions
): Promise<Result<Data<"addListMembers">>>Parameters
| Name | Type | Description |
|---|---|---|
listId required | string | List UUID from client.lists.create() or client.lists.list(). |
params required | Body<"addListMembers"> | Request body. See the fields and their requirements below. |
params.signals required | Body<"addListMembers">["signals"] | 1 to 1,000 Signals, described below |
params.source | "file" | "paste" | paste (default) or file: records how a Pending Intake line arrived |
params.live | boolean | true fetches the profile of a Social profile URL live (2 credits). Omitted or false, saved data is used (1 credit). No effect on a companies List. |
options | RequestOptions | Optional per-request timeout, maxRetries, headers and signal. See Client options. |
Returns
A response with the outcome for each Signal in data. See the endpoint response structure for member and Pending Intake results.
Errors
Calls can raise the HTTP APIError subclasses listed above. Network failures or cancellation raise APIConnectionError, and attempt timeouts raise APITimeoutError. ReverseContactError reports invalid SDK options or an invalid successful JSON response.
Example
Example
const result = await client.lists.members.add(listId, {
signals: [{ email: "jane@acme.com", externalId: "crm-001" }]
});
console.log(result.data);members.remove()
Send the member or Pending Intake ids to remove. The SDK sends the JSON body with DELETE.
Signature
client.lists.members.remove(
listId: string,
params: Body<"removeListMembers">,
options?: RequestOptions
): Promise<Result<Data<"removeListMembers">>>Parameters
| Name | Type | Description |
|---|---|---|
listId required | string | List UUID from client.lists.create() or client.lists.list(). |
params required | Body<"removeListMembers"> | Request body. See the fields and their requirements below. |
params.memberIds conditional | string[] | Member ids (UUID) to remove, the id of rows with kind: "member" |
params.pendingIds conditional | string[] | Pending Intake ids (UUID) to dismiss, the id of rows with kind: "pending" |
options | RequestOptions | Optional per-request timeout, maxRetries, headers and signal. See Client options. |
Returns
A response envelope with the removal result in data.
Errors
Calls can raise the HTTP APIError subclasses listed above. Network failures or cancellation raise APIConnectionError, and attempt timeouts raise APITimeoutError. ReverseContactError reports invalid SDK options or an invalid successful JSON response.
Example
Example
const result = await client.lists.members.remove(listId, { memberIds: [memberId] });
console.log(result.data);members.listAll()
Signature
client.lists.members.listAll(
listId: string,
params?: Query<"listListMembers">,
options?: ListIteratorOptions
): AsyncGenerator<Data<"listListMembers">["items"][number], void, unknown>Parameters
| Name | Type | Description |
|---|---|---|
listId required | string | List UUID from client.lists.create() or client.lists.list(). |
params | Query<"listListMembers"> | Query parameters. Omit to use the defaults. |
params.perPage | number | Rows per page, from 1 to 1,000. Defaults to 100. |
params.cursor | string | The nextCursor of the previous page, sent with the same filters. A malformed cursor, or one sent with other filters, returns 400. |
params.kind | "all" | "members" | "pending" | all (default) combines members and Pending Intake by added date. Use members or pending to return only that kind |
params.externalId | string | Returns members with this identifier from your system (1 to 200 characters) |
options | ListIteratorOptions | Optional maxResults, a nonnegative safe integer. Omit to read all pages. Also accepts request options. |
Returns
An AsyncGenerator of individual results. The iterator requests pages as needed. A repeated cursor raises ReverseContactError.
Errors
Calls can raise the HTTP APIError subclasses listed above. Network failures or cancellation raise APIConnectionError, and attempt timeouts raise APITimeoutError. ReverseContactError reports invalid SDK options or an invalid successful JSON response. ReverseContactError also reports invalid perPage or maxResults values and repeated cursors.
Example
Example
for await (const member of client.lists.members.listAll(listId, { kind: "members" })) {
console.log(member);
}operations.retrieve()
Use rows: "true" to include a page of line results. perPage and cursor require rows: "true".
Signature
client.lists.operations.retrieve(
listId: string,
operationId: string,
params?: Query<"getListOperation">,
options?: RequestOptions
): Promise<Result<Data<"getListOperation">>>Parameters
| Name | Type | Description |
|---|---|---|
listId required | string | List UUID from client.lists.create() or client.lists.list(). |
operationId required | string | Import UUID from client.lists.importSignals(). |
params | Query<"getListOperation"> | Query parameters. Omit to use the defaults. |
params.wait | number | Hold the request up to this many seconds, 0 to 20, while the operation runs. It answers as soon as the operation settles, pauses or stops, or with the operation still running when the wait ends. Defaults to 0. |
params.rows | "true" | "false" | true adds one page of per-line results |
params.cursor | string | With rows=true: the rows.nextCursor of the previous page |
params.perPage | number | With rows=true: lines per page, from 1 to 1,000. Defaults to 200. |
options | RequestOptions | Optional per-request timeout, maxRetries, headers and signal. See Client options. |
Returns
Result<ListOperation> with progress, clientAction, stopReason and nextStep in data.
Errors
Calls can raise the HTTP APIError subclasses listed above. Network failures or cancellation raise APIConnectionError, and attempt timeouts raise APITimeoutError. ReverseContactError reports invalid SDK options or an invalid successful JSON response.
Example
Example
const result = await client.lists.operations.retrieve(listId, operationId, { rows: "true", wait: 20 });
console.log(result.data.clientAction, result.data.nextStep);operations.cancel()
Request cancellation of this List import. Lines that have not started are not charged.
Signature
client.lists.operations.cancel(
listId: string,
operationId: string,
options?: RequestOptions
): Promise<Result<Data<"cancelListOperation">>>Parameters
| Name | Type | Description |
|---|---|---|
listId required | string | List UUID from client.lists.create() or client.lists.list(). |
operationId required | string | Import UUID from client.lists.importSignals(). |
options | RequestOptions | Optional per-request timeout, maxRetries, headers and signal. See Client options. |
Returns
A response envelope with the operation cancellation result in data.
Errors
Calls can raise the HTTP APIError subclasses listed above. Network failures or cancellation raise APIConnectionError, and attempt timeouts raise APITimeoutError. ReverseContactError reports invalid SDK options or an invalid successful JSON response.
Example
Example
const result = await client.lists.operations.cancel(listId, operationId);
console.log(result.data);operations.wait()
Follow clientAction, not just status. The SDK polls on poll and returns on done, resume or reconcile. Inspect stopReason and nextStep. The SDK never replays an operation that needs reconciliation.
Signature
client.lists.operations.wait(
listId: string,
operationId: string,
options?: WaitOptions<ListOperation>
): Promise<Result<ListOperation>>Parameters
| Name | Type | Description |
|---|---|---|
listId required | string | List UUID from client.lists.create() or client.lists.list(). |
operationId required | string | Import UUID from client.lists.importSignals(). |
options | WaitOptions<ListOperation> | Optional overall timeout, pollWait, onPoll, headers and signal. See Wait options. |
Returns
Result<ListOperation> when clientAction becomes done, resume or reconcile. A pause or unsuccessful operation does not by itself raise JobFailedError.
Errors
Calls can raise the HTTP APIError subclasses listed above. Network failures or cancellation raise APIConnectionError, and attempt timeouts raise APITimeoutError. ReverseContactError reports invalid SDK options or an invalid successful JSON response. JobTimeoutError means the overall wait deadline has expired. An unsuccessful terminal state does not raise JobFailedError. An unknown clientAction raises ReverseContactError.
Example
Example
const result = await client.lists.operations.wait(listId, operationId, {
timeout: 30 * 60 * 1000,
onPoll: snapshot => { console.log(snapshot.data.status); }
});
console.log(result.data.clientAction, result.data.nextStep);Related guides
Lists and Bulk enrichment, Timeouts and cancellation. Return to the TypeScript SDK overview.
FAQ
How do I read every member of a List with the SDK?
Iterate over client.lists.members.listAll(listId). Pagination is free and maxResults is optional.
How do I wait for a List import to stop?
Call client.lists.operations.wait(listId, operationId). The method returns when clientAction is done, resume or reconcile.
Does client.lists.export return JSON?
client.lists.export(listId) returns CSV text as a string, not a JSON response envelope.