v1

latestOpenAPI 3.1.02026-07-24770322.0 KB

Update Client

This API endpoint updates a specific client. <br><br> This PATCH request will only update the fields you specify (including custom fields), leaving the rest as they were. <br><br>Please note that for multi-select (tag) custom fields, all custom field options (tag values) must be included, the PATCH request will not preserve existing custom field options (tags).

patch/v1/clients/{id}

Path parameters

idstring required

The ID of the client to update

Query parameters

sendInviteboolean

Sends an email invitation to the updated client.

Request body

givenNamestring

The client's given name.

familyNamestring

The client's family name.

companyIdstring

The ID of the company to assign this client to. This will replace the current companies that the client is assigned to.

customFieldsstring json

The key is the custom field’s key, and the value is either an array of option keys (for multi-select fields) or a direct value for all other types. You can clear a field by passing an empty string (or empty array for multi-select); omitting the field leaves it unchanged.

Response

200

idstring
objectstring
createdAtstring
givenNamestring
familyNamestring
emailstring
companyIdstring
companyIdsstring[]
statusstring
fallbackColorstring
inviteUrlstring
avatarImageUrlstring
firstLoginDatestring
lastLoginDatestring
creationMethodstring
updatedAtstring

Example response

{
  "id": "1fe85b46-6a3d-4dcc-abbc-b76ac720784e",
  "object": "client",
  "createdAt": "2024-02-02T21:30:28.929541031Z",
  "givenName": "John",
  "familyName": "Doe",
  "email": "johndoe@copilot.app",
  "companyId": "bca425ea-daf0-4fb1-add1-c010a95de999",
  "companyIds": [
    "bca425ea-daf0-4fb1-add1-c010a95de999"
  ],
  "status": "active",
  "fallbackColor": "#938EAB",
  "inviteUrl": "https://productiondemo.copilot.app",
  "avatarImageUrl": "https://lightout-portal.s3-accelerate.amazonaws.com/public/b1VRvR-zM/images/profile_pictures/7f4331ef-101b-4248-9c74-3337661b1821/a3bc03a8-627e-4e27-ae59-2dbc2e831d36",
  "firstLoginDate": "2024-02-02T21:30:30.200075382Z",
  "lastLoginDate": "2024-02-02T21:30:30.200075382Z",
  "customFields": {
    "phoneNumber": "+18185552345",
    "tags": [
      "sampleTag"
    ],
    "address": {
      "country": "US",
      "region": "New York",
      "postalCode": "10001",
      "addressLine1": "1201 Broadway",
      "addressLine2": "704",
      "city": "New York",
      "fullAddress": "1201 Broadway\n704\nNew York, New York, 10001\nUnited States"
    }
  },
  "creationMethod": "internalUser"
}