Skip to content

List a client's contacts

GET
/clients/{id}/contacts
Code sample: Shell / cURL
curl --request GET \
--url 'https://example.com/api/v1/clients/example/contacts?page=1&perPage=100&sort=name' \
--header 'Authorization: Bearer <token>'

Lists a client’s contacts, the users of the company as its Users tab shows them: q matches every word against the first name, last name or email, and sort orders them by name A–Z (the default), Z–A or most recently added, the primary contact always first. Search, order and pagination run in the database; perPage defaults to 100. A contact is the person and always has a portal account, identified by memberId; portalInvitation says how the last portal invitation or welcome email to them fared (pending, sent, delivered, failed, bounced or marked as spam) and why the provider refused it. Requires the clients.view permission. A client outside the caller’s assignments returns 404 unless the caller has clients.view_all.

id
required

Resource identifier (CUID2).

string
>= 1 characters

Resource identifier (CUID2).

page
integer
default: 1 >= 1 <= 9007199254740991
perPage
integer
default: 100 >= 1 <= 100
q

Each whitespace-separated word must match the first name, last name or email.

string

Each whitespace-separated word must match the first name, last name or email.

sort

name (A–Z, the default), name-desc (Z–A) or newest (recently added first). The primary contact always comes first.

string
default: name
Allowed values: name name-desc newest

name (A–Z, the default), name-desc (Z–A) or newest (recently added first). The primary contact always comes first.

One page of the client’s contacts.

Media typeapplication/json
object
data
required
Array<object>

A person attached to a client company.

object
accessLevel
required

Data-scope attribute of the person: OWNER, BILLING, LEAD, MEMBER or COLLABORATOR (tickets only: the person reaches just the tickets they opened or were added to and gets no company notices).

string
clientId
required
string
createdAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
email
required
string
firstName
required
string
id
required
string
isPrimary
required
boolean
lastName
required
string
memberId
required

WorkspaceMember id of the person’s portal account.

string
phone
required

E.164 phone, e.g. +13055551234, or null when none is saved.

string | null
portalInvitation

The last portal invitation or welcome email tried for this contact, or null when none is recorded. Returned by the contact list; absent from create and update responses.

Any of:

The delivery of the last portal invitation or welcome email tried for a contact.

object
at
required

When the outcome last changed.

string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
outcome
required

PENDING while handed to the provider, SENT once accepted, FAILED when it never left, then DELAYED, DELIVERED, BOUNCED or COMPLAINED (marked as spam) as the provider reports.

string
Allowed values: PENDING SENT FAILED DELAYED DELIVERED BOUNCED COMPLAINED
reason
required

Why the provider refused or bounced it, when it said.

string | null
projectScopeEnabled
required

Explicit portal project-scope switch. False means the contact sees everything its client sees.

boolean
roles
required
Array<string>
Allowed values: TICKETS BILLING HOURS
source
required
string
Allowed values: manual backfill_client_member invite registration inbound_email lead_conversion
updatedAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
meta
required

Pagination metadata for list responses.

object
page
required
integer
>= -9007199254740991 <= 9007199254740991
perPage
required
integer
>= -9007199254740991 <= 9007199254740991
total
required
integer
>= -9007199254740991 <= 9007199254740991
totalPages
required
integer
>= -9007199254740991 <= 9007199254740991

Example

{
"data": [
{
"portalInvitation": {
"outcome": "PENDING"
},
"roles": [
"TICKETS"
],
"source": "manual"
}
]
}

Validation error. Parse failures include field paths and expectations.

Media typeapplication/json

Validation error with safe field paths and expected values; submitted values are never returned.

object
error
required
object
code
required

Stable machine-readable error code.

string
issues
Array<object>
object
expected
required
string
message
required
string
path
required
Array<string | number>
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Client not found.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.