Clienvy API documentation

List contacts

GET
https://api.clienvy.io/employee/v1
/relation/contacts

Returns a paginated list of contacts.

List contacts › query Parameters

search
​string

Full-text search across first name, last name, e-mail address and phone number.

company_ids
​string

Only return contacts linked to one of these companies. Accepts a comma-separated list of UUIDs.

sort_field
​string

Field to sort by. Supported: name.

sort_direction
​string

Sort direction: asc or desc.

page
​integer

Page number of the paginated result set.

per_page
​integer

Number of items per page. Defaults to the endpoint's own page size; capped at 500.

List contacts › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

List contacts › Responses

Array of ContactResource

​object

Create a contact

POST
https://api.clienvy.io/employee/v1
/relation/contacts

Creates a new contact. A contact must be linked to a company on creation through company_id.

Create a contact › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Create a contact › Request Body

first_name
​string · maxLength: 32 · required
company_id
​string · uuid · required

UUID of the company to link the contact to on creation.

function
​string · maxLength: 64 · required

The contact's function within the company.

last_name
​string · maxLength: 64
​object[]
​object[]
address
​string · maxLength: 255
postal_code
​string · maxLength: 16
city
​string · maxLength: 255
country
​string · ISO 3166-1 alpha-2
date_of_birth
​string · date
remark
​string · maxLength: 10000

Create a contact › Responses

ContactResource

id
​string · uuid
first_name
​string
last_name
​string | null
full_name
​string
address
​string | null
postal_code
​string | null
city
​string | null
country
​string · ISO 3166-1 alpha-2
remark
​string | null
date_of_birth
​string | null · date
​object
account_activated
​boolean

Whether the contact completed the registration for the customer portal, the same as account_activated_at being set.

account_last_activity
​string | null · date-time

last moment the contact used the customer portal, to within five minutes

account_activated_at
​string | null · date-time

when the contact completed the registration, null until then

account_invited_at
​string | null · date-time

when the contact was last invited to register, null when it never was

​object[]
​object[]
updated_at
​string · date-time
created_at
​string · date-time

Get a contact

GET
https://api.clienvy.io/employee/v1
/relation/contacts/{contact}

Returns a single contact by ID, including its linked companies, e-mail addresses and phone numbers.

Get a contact › path Parameters

contact
​string · uuid · required

The contact UUID

Get a contact › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Get a contact › Responses

ContactResource

id
​string · uuid
first_name
​string
last_name
​string | null
full_name
​string
address
​string | null
postal_code
​string | null
city
​string | null
country
​string · ISO 3166-1 alpha-2
remark
​string | null
date_of_birth
​string | null · date
​object
account_activated
​boolean

Whether the contact completed the registration for the customer portal, the same as account_activated_at being set.

account_last_activity
​string | null · date-time

last moment the contact used the customer portal, to within five minutes

account_activated_at
​string | null · date-time

when the contact completed the registration, null until then

account_invited_at
​string | null · date-time

when the contact was last invited to register, null when it never was

​object[]
​object[]
updated_at
​string · date-time
created_at
​string · date-time

Update a contact

PUT
https://api.clienvy.io/employee/v1
/relation/contacts/{contact}

Updates an existing contact. Only the fields present in the request are changed.

Update a contact › path Parameters

contact
​string · uuid · required

The contact UUID

Update a contact › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Update a contact › Request Body

first_name
​string · maxLength: 32
last_name
​string · maxLength: 64
​object[]
​object[]
address
​string · maxLength: 255
postal_code
​string · maxLength: 16
city
​string · maxLength: 255
country
​string · ISO 3166-1 alpha-2
date_of_birth
​string · date
remark
​string · maxLength: 10000

Update a contact › Responses

ContactResource

id
​string · uuid
first_name
​string
last_name
​string | null
full_name
​string
address
​string | null
postal_code
​string | null
city
​string | null
country
​string · ISO 3166-1 alpha-2
remark
​string | null
date_of_birth
​string | null · date
​object
account_activated
​boolean

Whether the contact completed the registration for the customer portal, the same as account_activated_at being set.

account_last_activity
​string | null · date-time

last moment the contact used the customer portal, to within five minutes

account_activated_at
​string | null · date-time

when the contact completed the registration, null until then

account_invited_at
​string | null · date-time

when the contact was last invited to register, null when it never was

​object[]
​object[]
updated_at
​string · date-time
created_at
​string · date-time

Merge two contacts

POST
https://api.clienvy.io/employee/v1
/relation/contacts/{contact}/merge

Merges the contact identified by merge_contact_id into this contact and removes the duplicate.

Merge two contacts › path Parameters

contact
​string · uuid · required

The contact UUID

Merge two contacts › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Merge two contacts › Request Body

merge_contact_id
​string · uuid · required

UUID of the contact to merge into this one.

Merge two contacts › Responses

ContactResource

id
​string · uuid
first_name
​string
last_name
​string | null
full_name
​string
address
​string | null
postal_code
​string | null
city
​string | null
country
​string · ISO 3166-1 alpha-2
remark
​string | null
date_of_birth
​string | null · date
​object
account_activated
​boolean

Whether the contact completed the registration for the customer portal, the same as account_activated_at being set.

account_last_activity
​string | null · date-time

last moment the contact used the customer portal, to within five minutes

account_activated_at
​string | null · date-time

when the contact completed the registration, null until then

account_invited_at
​string | null · date-time

when the contact was last invited to register, null when it never was

​object[]
​object[]
updated_at
​string · date-time
created_at
​string · date-time

Send a client-portal registration invite

POST
https://api.clienvy.io/employee/v1
/relation/contacts/{contact}/customer-portal/send-invite

Sends the contact an e-mail inviting them to activate their client-portal account, using the provided subject and body.

Send a client-portal registration invite › path Parameters

contact
​string · uuid · required

The contact UUID

Send a client-portal registration invite › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Send a client-portal registration invite › Request Body

subject
​string · maxLength: 500 · required

Subject of the invitation e-mail.

body
​string · maxLength: 10000 · required

Body of the invitation e-mail.

Send a client-portal registration invite › Responses

ContactResource

id
​string · uuid
first_name
​string
last_name
​string | null
full_name
​string
address
​string | null
postal_code
​string | null
city
​string | null
country
​string · ISO 3166-1 alpha-2
remark
​string | null
date_of_birth
​string | null · date
​object
account_activated
​boolean

Whether the contact completed the registration for the customer portal, the same as account_activated_at being set.

account_last_activity
​string | null · date-time

last moment the contact used the customer portal, to within five minutes

account_activated_at
​string | null · date-time

when the contact completed the registration, null until then

account_invited_at
​string | null · date-time

when the contact was last invited to register, null when it never was

​object[]
​object[]
updated_at
​string · date-time
created_at
​string · date-time

Start impersonating a contact

POST
https://api.clienvy.io/employee/v1
/relation/contacts/{contact}/customer-portal/start-impersonation

Returns a one-time URL to log in to the client portal as this contact. The contact must have an activated account.

Start impersonating a contact › path Parameters

contact
​string · uuid · required

The contact UUID

Start impersonating a contact › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Start impersonating a contact › Responses

url
​string · required

Customer portal activities of a contact

GET
https://api.clienvy.io/employee/v1
/relation/contacts/{contact}/customer-portal/activities

What the contact did in the customer portal, newest first, across every record it worked on. Each activity names the record it belongs to in subject. Only records the signed-in employee may see are included.

Customer portal activities of a contact › path Parameters

contact
​string · uuid · required

The contact UUID

Customer portal activities of a contact › query Parameters

page
​integer

Page number of the paginated result set.

per_page
​integer

Number of items per page. Defaults to the endpoint's own page size; capped at 500.

Customer portal activities of a contact › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Customer portal activities of a contact › Responses

Array of ActivityWithSubjectResource

​object

Search relation e-mail addresses

GET
https://api.clienvy.io/employee/v1
/relation/emails

Returns a paginated list of e-mail addresses across all contacts and companies, each with its owning relation. Useful for looking up which relation an e-mail address belongs to.

Search relation e-mail addresses › query Parameters

search
​string

Full-text search across the e-mail address, contact name and company name.

page
​integer

Page number of the paginated result set.

per_page
​integer

Number of items per page. Defaults to the endpoint's own page size; capped at 500.

Search relation e-mail addresses › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Search relation e-mail addresses › Responses

Array of RelationEmailResource

​object

List activities

GET
https://api.clienvy.io/employee/v1
/relation/contacts/{contact}/activities

Returns a paginated list of activities logged on the parent resource, newest first. Activities cover both system-generated events and manually logged remarks.

With include_related the list is the timeline of the resource: its own activities together with those of the records that belong to it, such as the domain names, applications and mailbox domains of a website. Each activity then names the record it belongs to in subject.

List activities › path Parameters

contact
​string · uuid · required

The contact UUID

List activities › query Parameters

type
​string

Only return activities of this type (for example remark).

include_related
​boolean

Also return the activities of the records that belong to the resource, each naming its record in subject.

source
​string

With include_related: only return the activities of one record, as <type>:<id>, for example domain:<uuid>. The record has to be the resource itself or belong to it.

page
​integer

Page number of the paginated result set.

per_page
​integer

Number of items per page. Defaults to the endpoint's own page size; capped at 500.

List activities › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

List activities › Responses

Array of ActivityWithSubjectResource

Array of ActivityResource

​
​object

Log a remark

POST
https://api.clienvy.io/employee/v1
/relation/contacts/{contact}/activities

Logs a manual remark as an activity on the parent resource. The remark may contain basic HTML (p, br, b, strong, i, em, u, s, ul, ol, li, a, span). Other tags and attributes are stripped and line breaks become <br>. To mention an employee and notify them, add a span with a data-employee-id attribute holding the employee's UUID, for example <span data-employee-id="…">@Jan</span>. The answer names the record in subject, like the timeline does.

Log a remark › path Parameters

contact
​string · uuid · required

The contact UUID

Log a remark › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Log a remark › Request Body

remark
​string · maxLength: 20000 · required

Log a remark › Responses

ActivityWithSubjectResource

id
​string · uuid
type
​string
title
​string
data
​string
​ContactReferenceResource | null

The contact who did it in the customer portal, if any.

​OAuthConnectionReferenceResource | null

The AI connection the activity was done through, if any.

updated_at
​string · date-time
created_at
​string · date-time
​ActivitySubjectResource | null

null when the record is gone