Skip to main content
GET
List contacts

Authorizations

Authorization
string
header
required

The id_token from POST /auth/v1/signin, sent as Authorization: Bearer <id_token>. Not the access_token — that one does not carry the identity Cloud Chat authorizes on.

Headers

cloudchat-instance
integer
required

Your Cloud Chat instance ID — an integer, fixed for your company, told at onboarding. The API overview explains how instances work, how to find yours, and the errors a wrong or missing value produces.

Example:

1

Path Parameters

accountId
integer
required

Your Cloud Chat account. It has to be an account your token grants membership on, and it has to live on the instance in the cloudchat-instance header — the two travel together. Account numbers are only unique within an instance, so the same number is a different company on another instance. Usually a mismatched pair fails closed with a 401, because your user does not exist on the other instance — but if your identity happens to exist on both, the call succeeds against the other company's data, silently. Read it and you are looking at the wrong help center; write it and you have stored into the wrong account. Send the two values that were given to you together, and never try a number to see what answers.

Example:

1

Query Parameters

ids
string

Comma-separated contact ids, e.g. 12,34,56. Up to 100 distinct ids per request; a repeated id counts once and comes back once. Empty, non-numeric, sent as an array (ids[]=) or over 100 distinct ids answers 400, with error.details naming ids. When present, after_id and per_page are ignored and the response has no meta. Leave it out to walk the whole contact base.

Example:

"12,34,56"

after_id
integer

Cursor for walking the contact base: returns contacts whose id is greater than this one. Leave it out on the first request, then send the meta.next_after_id of the previous page. A value that is not a positive integer, or that is sent as an array, answers 400 with error.details naming after_id. Ignored when ids is present.

Example:

1234

per_page
integer
default:25

Results per page when walking the contact base. Clamped, never rejected: above 100 you get 100, below 1 you get the default 25. Ignored when ids is present.

Required range: 1 <= x <= 100
Example:

25

Response

With ids, the contacts found among the requested ids, ordered by id; data is empty when none of them is a contact of this account. Without ids, one page of the contact base, with meta.

The contacts found among the requested ids, or one page of the contact base.

data
object[]
required

Ordered by id. Requested ids that are not contacts of this account are absent.

meta
object

Where you are in the contact base. Present only when walking without ids. There is no total count — walk forward while has_next is true.