Skip to content

MaintenanceThe former company search endpoint goes into maintenance on November 9Migration guide

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.

MethodEndpointCost
client.lists.list()All ListsFree.
client.lists.create()Create a ListFree.
client.lists.retrieve()Get a ListFree.
client.lists.delete()Delete a ListFree.
client.lists.importSignals()Import members and dataFree 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 ListFree.
client.lists.listAll()All ListsFree.
client.lists.members.list()List membersFree.
client.lists.members.add()Add membersFree 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 membersFree.
client.lists.members.listAll()List membersFree.
client.lists.operations.retrieve()Read a List operationFree even with a zero balance. Does not count against rate limits.
client.lists.operations.cancel()Cancel a List operationFree. Lines that had not started are never charged.
client.lists.operations.wait()Read a List operationFree 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()

TypeScript SDK

Signature

client.lists.list(
  params?: Query<"listLists">,
  options?: RequestOptions
): Promise<Page<Data<"listLists">["items"][number], undefined>>

Parameters

NameTypeDescription
paramsQuery<"listLists">Query parameters. Omit to use the defaults.
params.perPagenumberLists per page, from 1 to 200. Defaults to 200.
params.cursorstringThe nextCursor of the previous page. A malformed cursor, or one sent with other parameters, returns 400.
optionsRequestOptionsOptional 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

TypeScript SDK

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.

TypeScript SDK

Signature

client.lists.create(
  params: Body<"createList">,
  options?: IdempotentRequestOptions
): Promise<Result<Data<"createList">>>

Parameters

NameTypeDescription
params requiredBody<"createList">Request body. See the fields and their requirements below.
params.name requiredstringList name, 1 to 200 characters. Spaces around it are removed.
params.entity required"persons" | "companies"persons for people, companies for companies
optionsIdempotentRequestOptionsOptional 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

TypeScript SDK

Example

const created = await client.lists.create(
  { name: "Prospects", entity: "persons" },
  { idempotencyKey: "prospects-2026-11-04" }
);
console.log(created.data.id);

retrieve()

TypeScript SDK

Signature

client.lists.retrieve(
  listId: string,
  params?: Query<"getList">,
  options?: RequestOptions
): Promise<Result<Data<"getList">>>

Parameters

NameTypeDescription
listId requiredstringList UUID from client.lists.create() or client.lists.list().
paramsQuery<"getList">Query parameters. Omit to use the defaults.
params.perPagenumberRows per page, from 1 to 1,000. Defaults to 100.
params.cursorstringThe 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
optionsRequestOptionsOptional 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

TypeScript SDK

Example

const result = await client.lists.retrieve(listId, { kind: "all", perPage: 100 });
console.log(result.data.members, result.data.nextCursor);

delete()

TypeScript SDK

Signature

client.lists.delete(
  listId: string,
  options?: RequestOptions
): Promise<Result<Data<"deleteList">>>

Parameters

NameTypeDescription
listId requiredstringList UUID from client.lists.create() or client.lists.list().
optionsRequestOptionsOptional 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

TypeScript SDK

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.

TypeScript SDK

Signature

client.lists.importSignals(
  listId: string,
  params: Body<"importListSignals">,
  options?: RequestOptions
): Promise<Result<Data<"importListSignals">>>

Parameters

NameTypeDescription
listId requiredstringList UUID from client.lists.create() or client.lists.list().
params requiredBody<"importListSignals">Request body. See the fields and their requirements below.
params.signals conditionalBody<"importListSignals">["signals"]1 to 25,000 Signals, with the fields of Add members, externalId included
params.sourceUrl conditionalstringA 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.livebooleantrue 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 conditionalnumberThe 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.operationIdstringYour UUID for this operation. Sending the same request again with it returns the same operation and never charges twice.
params.webhookUrlstringPublic HTTPS URL that receives a callback each time the operation stops moving. See Webhook callback
optionsRequestOptionsOptional 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

TypeScript SDK

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()

TypeScript SDK

Signature

client.lists.export(
  listId: string,
  options?: RequestOptions
): Promise<string>

Parameters

NameTypeDescription
listId requiredstringList UUID from client.lists.create() or client.lists.list().
optionsRequestOptionsOptional 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

TypeScript SDK

Example

const csv = await client.lists.export(listId);
console.log(csv);

listAll()

TypeScript SDK

Signature

client.lists.listAll(
  params?: Query<"listLists">,
  options?: ListIteratorOptions
): AsyncGenerator<Data<"listLists">["items"][number], void, unknown>

Parameters

NameTypeDescription
paramsQuery<"listLists">Query parameters. Omit to use the defaults.
params.perPagenumberLists per page, from 1 to 200. Defaults to 200.
params.cursorstringThe nextCursor of the previous page. A malformed cursor, or one sent with other parameters, returns 400.
optionsListIteratorOptionsOptional 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

TypeScript SDK

Example

for await (const list of client.lists.listAll()) {
  console.log(list.id, list.name);
}

members.list()

TypeScript SDK

Signature

client.lists.members.list(
  listId: string,
  params?: Query<"listListMembers">,
  options?: RequestOptions
): Promise<Page<Data<"listListMembers">["items"][number], undefined>>

Parameters

NameTypeDescription
listId requiredstringList UUID from client.lists.create() or client.lists.list().
paramsQuery<"listListMembers">Query parameters. Omit to use the defaults.
params.perPagenumberRows per page, from 1 to 1,000. Defaults to 100.
params.cursorstringThe 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.externalIdstringReturns members with this identifier from your system (1 to 200 characters)
optionsRequestOptionsOptional 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

TypeScript SDK

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.

TypeScript SDK

Signature

client.lists.members.add(
  listId: string,
  params: Body<"addListMembers">,
  options?: RequestOptions
): Promise<Result<Data<"addListMembers">>>

Parameters

NameTypeDescription
listId requiredstringList UUID from client.lists.create() or client.lists.list().
params requiredBody<"addListMembers">Request body. See the fields and their requirements below.
params.signals requiredBody<"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.livebooleantrue 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.
optionsRequestOptionsOptional 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

TypeScript SDK

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.

TypeScript SDK

Signature

client.lists.members.remove(
  listId: string,
  params: Body<"removeListMembers">,
  options?: RequestOptions
): Promise<Result<Data<"removeListMembers">>>

Parameters

NameTypeDescription
listId requiredstringList UUID from client.lists.create() or client.lists.list().
params requiredBody<"removeListMembers">Request body. See the fields and their requirements below.
params.memberIds conditionalstring[]Member ids (UUID) to remove, the id of rows with kind: "member"
params.pendingIds conditionalstring[]Pending Intake ids (UUID) to dismiss, the id of rows with kind: "pending"
optionsRequestOptionsOptional 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

TypeScript SDK

Example

const result = await client.lists.members.remove(listId, { memberIds: [memberId] });
console.log(result.data);

members.listAll()

TypeScript SDK

Signature

client.lists.members.listAll(
  listId: string,
  params?: Query<"listListMembers">,
  options?: ListIteratorOptions
): AsyncGenerator<Data<"listListMembers">["items"][number], void, unknown>

Parameters

NameTypeDescription
listId requiredstringList UUID from client.lists.create() or client.lists.list().
paramsQuery<"listListMembers">Query parameters. Omit to use the defaults.
params.perPagenumberRows per page, from 1 to 1,000. Defaults to 100.
params.cursorstringThe 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.externalIdstringReturns members with this identifier from your system (1 to 200 characters)
optionsListIteratorOptionsOptional 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

TypeScript SDK

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

TypeScript SDK

Signature

client.lists.operations.retrieve(
  listId: string,
  operationId: string,
  params?: Query<"getListOperation">,
  options?: RequestOptions
): Promise<Result<Data<"getListOperation">>>

Parameters

NameTypeDescription
listId requiredstringList UUID from client.lists.create() or client.lists.list().
operationId requiredstringImport UUID from client.lists.importSignals().
paramsQuery<"getListOperation">Query parameters. Omit to use the defaults.
params.waitnumberHold 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.cursorstringWith rows=true: the rows.nextCursor of the previous page
params.perPagenumberWith rows=true: lines per page, from 1 to 1,000. Defaults to 200.
optionsRequestOptionsOptional 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

TypeScript SDK

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.

TypeScript SDK

Signature

client.lists.operations.cancel(
  listId: string,
  operationId: string,
  options?: RequestOptions
): Promise<Result<Data<"cancelListOperation">>>

Parameters

NameTypeDescription
listId requiredstringList UUID from client.lists.create() or client.lists.list().
operationId requiredstringImport UUID from client.lists.importSignals().
optionsRequestOptionsOptional 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

TypeScript SDK

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.

TypeScript SDK

Signature

client.lists.operations.wait(
  listId: string,
  operationId: string,
  options?: WaitOptions<ListOperation>
): Promise<Result<ListOperation>>

Parameters

NameTypeDescription
listId requiredstringList UUID from client.lists.create() or client.lists.list().
operationId requiredstringImport UUID from client.lists.importSignals().
optionsWaitOptions<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

TypeScript SDK

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);

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.