Skip to content

Update a client contact

PATCH
/clients/{id}/contacts/{contactId}
Code sample: Shell / cURL
curl --request PATCH \
--url https://example.com/api/v1/clients/example/contacts/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "accessLevel": "OWNER", "email": "hello@example.com", "firstName": "example", "isPrimary": true, "lastName": "example", "phone": "example", "projectIds": [ "example" ], "projectScopeEnabled": true, "roles": [ "TICKETS" ] }'

Updates a contact scoped to both the client and the workspace, recording the change in the person’s history. phone must carry its country code and is stored in E.164; null or an empty string clears it, and a number without a country code is refused with 400. A company has at most one primary contact: setting isPrimary: true moves it to this contact, and isPrimary: false leaves the company with none. accessLevel is a data-scope attribute, never a permission source; the reserved COLLABORATOR is rejected. projectScopeEnabled and projectIds update the portal project scope — the switch is explicit, an omitted part is left untouched, and an enabled scope with no projects shows nothing. Requires the clients.edit permission.

id
required

Resource identifier (CUID2).

string
>= 1 characters

Resource identifier (CUID2).

contactId
required

The contact ID within this client company

string
>= 1 characters

The contact ID within this client company

Media typeapplication/json
object
accessLevel
string
Allowed values: OWNER BILLING LEAD MEMBER COLLABORATOR
email
string format: email
/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/
firstName
string
>= 1 characters
isPrimary
boolean
lastName
string
phone

The contact’s phone with its country code, e.g. +1 305 555 1234; stored and returned in E.164. A number without a country code is refused with 400; null or an empty string clears it.

Any of:
string
<= 40 characters
projectIds

Replaces the contact’s scoped project set. Every id must be a project of this client.

Array<string>
projectScopeEnabled

Explicit portal project-scope switch; omitted leaves it unchanged.

boolean
roles

Replaces what the contact receives for the company. An empty list leaves them only what they take part in.

Array<string>
Allowed values: TICKETS BILLING HOURS

The updated contact.

Media typeapplication/json
object
data
required

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))$/

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

Contact 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"
}
}

A contact with this email already exists for this client.

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.