client from the Quickstart. Replace resource IDs with IDs from your workspace.
Resource shortcuts
The following groups offer concise methods. Useclient.api for operations not listed here.
Campaign-specific leads are available through
client.api.listLeads with the campaign ID in path.id, or famulor list-leads <campaign-id> in the CLI. client.contacts manages the shared workspace audience.
Read responses
Resource methods keep the API response envelope: your result is indata, and list responses can include meta.pagination.
null are different actions; send null only where the API reference allows it.
Fetch pages as you need them
Use the async iterator for supported paginated resources:limit is the page size, not a limit on the total items yielded. The iterator preserves your filters and advances the offset until it reaches the end. Breaking out of the loop stops fetching new pages. Offset pagination is not a snapshot: concurrent inserts or updates can change page contents. To set a safety bound, pass a second argument such as { maxPages: 100 }. Reaching the bound before the list ends throws an error; it does not silently return a partial result.
For manual page control, call client.calls.list() with limit and offset, then inspect meta.pagination. Typical list endpoints default to 50 items and allow up to 200; follow each endpoint’s limits.
The equivalent CLI request is famulor list-calls --status completed --limit 50; add --all to fetch all pages.
Use any public API operation
client.api exposes the operation IDs from the API reference as typed methods. Inputs are grouped into path, query, body and headers instead of combining unrelated parameters.
client.calls.create(body). Both methods call the same API and retain the same response envelope and permissions.
Use your editor’s autocomplete for all operation methods. See MCP tools and scopes for using the corresponding capabilities inside an AI assistant.
Download binary responses
Audio endpoints return anArrayBuffer, without a JSON data wrapper. For example, download an existing Full Duplex voice preview as WAV audio:
Upload files
Pass aFormData body to operations that accept multipart uploads. The SDK sets the multipart content type and boundary:
Override one request
Request options are the last argument, after the method’s input parameters. Generatedclient.api methods take grouped input first and request options second. Resource shortcuts have different argument counts. For example, a list takes its query first, then options:
account.me(). Pass an empty query to keep its defaults. Replace the resource IDs below before running these examples; updating an assistant changes its configuration.