v1

latestOpenAPI 3.1.02026-07-24770322.0 KB

Create Client

This API endpoint creates a client.

post/v1/clients

Query parameters

sendInviteboolean

If true then send an account invite to the client.

Request body

givenNamestring required

The client's given name (first name)

familyNamestring required

The client's family name (last name)

emailstring required

The client's email

companyIdstring

The ID of the company this client belongs to. When no ID is provided, a placeholder company will be created and returned in the response object

customFieldsstring json

The keys are the key of the custom field property, and the values are an array of custom field option keys (in the case of multiSelect custom fields), or the direct value in the case of all other types of custom fields.

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