List Contacts

Lists contacts in an organization.

This endpoint supports two pagination methods:

  1. Offset-based pagination (default): Use offset and limit parameters

    • Default offset is 0 and default limit is 50
    • Maximum limit is 500
  2. Cursor-based pagination: Use cursor and limit parameters

    • Default limit is 50
    • Maximum limit is 500
    • Provides more efficient pagination for large datasets
    • Uses the same ordering on contact name (and ID as a tiebreaker)
    • Use the next_cursor from metadata for subsequent requests
    • Filters are not included in the cursor - you still have to include them in subsequent requests
      or you'll get different data.
    • When next_cursor is null, there are no more results
    • Note: Only forward pagination is supported (no backward navigation for now)

Cursor-based pagination is automatically triggered when a cursor parameter is provided,
if the offset parameter is not specified. If both parameters are provided, an error is returned.

Both pagination methods return a metadata object containing a next_cursor field.
When there are more results available, next_cursor contains a cursor string that can be used
to fetch the next page. When there are no more results, next_cursor is null.
This allows you to start with offset-based pagination and switch to cursor-based pagination
for subsequent requests if desired.

It is recommended to use cursor-based pagination for large datasets,
and offset-based pagination for random access at various parts of the dataset.

The cursor is a base64-encoded string that represents a position in the dataset,
based on the default composite ordering by ascending name first, and ID second (as a tiebreaker when there are tied names), used in order to have
more deterministic results.

The cursor is built from a JSON object that has a contact ID and the name of the contact
that corresponds to the ID. It has a format of {"name": "contact_name", "id": "contact_id"}, encoded as a URL-safe base64 string,
with padding removed. If necessary, you can generate the cursor before making an initial request, and start directly at the provided cursor, if it is valid.

For example, this is how you could do that in Python:

import json
import base64

def encode_cursor(name, id):
    cursor_data = {
        "name": name,
        "id": id
    }

    json_string = json.dumps(cursor_data)
    base64_bytes = base64.urlsafe_b64encode(json_string.encode('utf-8'))

    # remove padding (trailing '=' characters)
    return base64_bytes.decode('utf-8').rstrip('=')

Invalid or unusable cursors

  • A malformed cursor — not valid URL-safe base64, not JSON, or a JSON
    object without exactly the name and id keys — is rejected with a
    422 Unprocessable Content and {"description": "Invalid cursor format"}.
    The literal strings null and undefined are treated as malformed.
  • A well-formed but stale cursor (e.g. the contact it pointed at was
    since deleted or renamed) is still a valid position: the request succeeds
    and returns the contacts after that position. cursor_reset is false.
  • A well-formed but unusable cursor (correct keys, but a value that
    can't be a position — e.g. an id that isn't a UUID) does not error.
    The request resets to the first page and the response sets
    cursor_reset to true so you can detect the reset rather than looping.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
integer

Number of results to return.

integer

Offset for traditional pagination. Cannot be combined with cursor.

string

Cursor for keyset pagination. Use the next_cursor value from the previous response. A malformed cursor (bad base64/JSON, or wrong keys) returns a 422 with "Invalid cursor format"; a well-formed but unusable cursor resets to the first page and sets cursor_reset to true. Cannot be combined with offset.

string

Can be set to any string or nil/null to return contacts with no name

string

email

string

phone

string

Filter by the contact's external ID (exact match). Useful for integrations that track contacts by their own system identifier.

created_at
object

created at date

updated_at
object

updated at date

channels[][id]
array of strings

channel IDs

channels[][id]
channels[][phone]
array of strings

channel phones

channels[][phone]
Responses

Callback
Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json