Skip to content

Edit a user

PATCH
/client-members/{memberId}
Code sample: Shell / cURL
curl --request PATCH \
--url https://example.com/api/v1/client-members/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "hello@example.com", "firstName": "example", "lastName": "example" }'

Edits who a user (a person at a client company) is in this workspace: first name, last name and contact email; a field left out keeps its value. The name is mirrored onto the person’s account and every company contact they hold in this workspace; the contact email is written onto those contacts only, and is where ticket replies go and the address their inbound email is recognized by. The sign-in email (email in the response) is never changed: only the person changes it, from their profile. Requires the clients.view and clients.edit permissions, as the Edit user page does, and the same reach as GET /client-members: without clients.view_all, only people of the client companies the caller is assigned to; anyone else answers 404. A contact email answers 409 when another person at one of their companies already uses it and 400 when the person is on no company. The change is recorded in the person’s history.

memberId
required

WorkspaceMember id of the client person.

string
>= 1 characters

WorkspaceMember id of the client person.

Media typeapplication/json
object
email

The person’s contact email in this workspace, stored lowercase on every company contact they hold: where ticket replies go and the address their inbound email is recognized by. Never their sign-in email, which only they change from their profile. Refused when another person at one of their companies uses it, or when they are on no company. Omit to leave it untouched.

string format: email
<= 254 characters /^(?:[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

The person’s first name. Omit to leave it untouched.

string
>= 1 characters <= 100 characters
lastName

The person’s last name; an empty string clears it. Omit to leave it untouched.

string
<= 100 characters

Example generated

{
"email": "hello@example.com",
"firstName": "example",
"lastName": "example"
}

The person as saved.

Media typeapplication/json
object
data
required

A person at one or more client companies, with their portal status.

object
companies
required

The client companies the person holds that the caller reaches.

Array<object>
object
accessLevel
required

Data-scope attribute of the person on this company: OWNER, BILLING, LEAD, MEMBER or COLLABORATOR (tickets only).

string
clientId
required
string
contactId
required
string
isPrimary
required
boolean
name
required
string
portalInvitation
required

The last portal invitation or welcome email tried for this company, or null when none is recorded.

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
revokedAt
required
Any of:
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))$/
roles
required
Array<string>
Allowed values: TICKETS BILLING HOURS
statusId
required

The company’s client status catalog id, or null when it has none.

string | null
contactEmail
required

The person’s contact email in this workspace, from their first company the caller reaches; null when they are on none.

string | null
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

The email the person signs in with. Only they change it, from their profile.

string
firstName
required
string
lastName
required
string
memberId
required

WorkspaceMember id of the client person.

string
origin

How the person came in, in plain words; Not recorded when nothing reliable says it. Absent on an older server.

string
review

The team’s review of the person, null when there is none. Absent on an older server.

Any of:
string
Allowed values: PENDING EXTERNAL_AGENCY SPAM
status
required
string
Allowed values: inactive revoked active invited not_invited

Example

{
"data": {
"companies": [
{
"portalInvitation": {
"outcome": "PENDING"
},
"roles": [
"TICKETS"
]
}
],
"review": "PENDING",
"status": "inactive"
}
}

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

Another person at one of their companies already uses that email.

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.