Clienvy API documentation

List companies

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

Returns a paginated list of companies.

List companies › query Parameters

search
​string

Full-text search across company name, legal name, linked contacts, e-mail addresses and phone numbers.

sort_field
​string

Field to sort by: name or active_credits.

sort_direction
​string

Sort direction: asc or desc.

​object

Only return companies whose active credits fall in this range: active_credits[operator] is greater-than (reads from), less-than (reads to) or between (reads both, ends included).

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 companies › Headers

X-Organization-Id
​string · uuid · required

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

List companies › Responses

Array of CompanyListResource

​object

Create a company

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

Creates a new company, optionally with e-mail addresses, phone numbers and automatic credit billing settings.

Create a company › Headers

X-Organization-Id
​string · uuid · required

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

Create a company › Request Body

name
​string · maxLength: 64 · required
type
​string

Company type: customer or supplier.

invoice_email
​string · email · maxLength: 255

E-mail address invoices are sent to.

coc_number
​string · maxLength: 30
tax_number
​string · maxLength: 30
bundle_invoices
​boolean

Whether invoices for this company are bundled.

default_tax_rate_id
​string · uuid
auto_bill_credits
​boolean

Whether credits are billed automatically.

auto_bill_credits_contact_id
​string · uuid

UUID of the contact billed for credits. Required when auto_bill_credits is true.

auto_bill_credits_threshold
​integer

Credit balance at which auto-billing triggers. Required when auto_bill_credits is true.

price_per_credit
​number · decimal

Price per credit. Required when auto_bill_credits is true.

auto_bill_tax_rate_id
​string · uuid

UUID of the tax rate used for auto-billing. Required when auto_bill_credits is true.

auto_bill_flow_id
​string · uuid

UUID of the invoice flow used for auto-billing. Required when auto_bill_credits is true.

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

Create a company › Responses

CompanyResource

id
​string · uuid
name
​string
legal_name
​string | null
invoice_email
​string | null
​ContactReferenceResource | null
bundle_invoices
​boolean
​TaxRateResource
default_mandate_id
​string | null
active_credits
​integer
auto_bill_credits
​boolean
​ContactReferenceResource | null
auto_bill_credits_threshold
​integer
price_per_credit
​number
​TaxRateResource | null
​InvoiceFlowResource | null
coc_number
​string | null
tax_number
​string | null
address
​string | null
postal_code
​string | null
city
​string | null
country
​string · ISO 3166-1 alpha-2
type
​CompanyType · enum
Enum values:
customer
supplier
remark
​string | null
​object
​object[]
​object[]
​AccountingLinkResource[]
updated_at
​string · date-time
created_at
​string · date-time

Get a company

GET
https://api.clienvy.io/employee/v1
/relation/companies/{company}

Returns a single company by ID, including its linked contacts, mandates and billing settings.

Get a company › path Parameters

company
​string · uuid · required

The company UUID

Get a company › Headers

X-Organization-Id
​string · uuid · required

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

Get a company › Responses

CompanyResource

id
​string · uuid
name
​string
legal_name
​string | null
invoice_email
​string | null
​ContactReferenceResource | null
bundle_invoices
​boolean
​TaxRateResource
default_mandate_id
​string | null
active_credits
​integer
auto_bill_credits
​boolean
​ContactReferenceResource | null
auto_bill_credits_threshold
​integer
price_per_credit
​number
​TaxRateResource | null
​InvoiceFlowResource | null
coc_number
​string | null
tax_number
​string | null
address
​string | null
postal_code
​string | null
city
​string | null
country
​string · ISO 3166-1 alpha-2
type
​CompanyType · enum
Enum values:
customer
supplier
remark
​string | null
​object
​object[]
​object[]
​AccountingLinkResource[]
updated_at
​string · date-time
created_at
​string · date-time

Update a company

PUT
https://api.clienvy.io/employee/v1
/relation/companies/{company}

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

Update a company › path Parameters

company
​string · uuid · required

The company UUID

Update a company › Headers

X-Organization-Id
​string · uuid · required

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

Update a company › Request Body

name
​string · maxLength: 64
type
​string

Company type: customer or supplier.

invoice_email
​string · email · maxLength: 255

E-mail address invoices are sent to.

coc_number
​string · maxLength: 30
tax_number
​string · maxLength: 30
bundle_invoices
​boolean

Whether invoices for this company are bundled.

default_tax_rate_id
​string · uuid
auto_bill_credits
​boolean

Whether credits are billed automatically.

auto_bill_credits_contact_id
​string · uuid

UUID of the contact billed for credits. Required when auto_bill_credits is true.

auto_bill_credits_threshold
​integer

Credit balance at which auto-billing triggers. Required when auto_bill_credits is true.

price_per_credit
​number · decimal

Price per credit. Required when auto_bill_credits is true.

auto_bill_tax_rate_id
​string · uuid

UUID of the tax rate used for auto-billing. Required when auto_bill_credits is true.

auto_bill_flow_id
​string · uuid

UUID of the invoice flow used for auto-billing. Required when auto_bill_credits is true.

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

Update a company › Responses

CompanyResource

id
​string · uuid
name
​string
legal_name
​string | null
invoice_email
​string | null
​ContactReferenceResource | null
bundle_invoices
​boolean
​TaxRateResource
default_mandate_id
​string | null
active_credits
​integer
auto_bill_credits
​boolean
​ContactReferenceResource | null
auto_bill_credits_threshold
​integer
price_per_credit
​number
​TaxRateResource | null
​InvoiceFlowResource | null
coc_number
​string | null
tax_number
​string | null
address
​string | null
postal_code
​string | null
city
​string | null
country
​string · ISO 3166-1 alpha-2
type
​CompanyType · enum
Enum values:
customer
supplier
remark
​string | null
​object
​object[]
​object[]
​AccountingLinkResource[]
updated_at
​string · date-time
created_at
​string · date-time

Delete a company

DELETE
https://api.clienvy.io/employee/v1
/relation/companies/{company}

Deletes a company. A company can only be deleted when it has no linked contacts or other resources.

Delete a company › path Parameters

company
​string · uuid · required

The company UUID

Delete a company › Headers

X-Organization-Id
​string · uuid · required

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

Delete a company › Responses

CompanyResource

id
​string · uuid
name
​string
legal_name
​string | null
invoice_email
​string | null
​ContactReferenceResource | null
bundle_invoices
​boolean
​TaxRateResource
default_mandate_id
​string | null
active_credits
​integer
auto_bill_credits
​boolean
​ContactReferenceResource | null
auto_bill_credits_threshold
​integer
price_per_credit
​number
​TaxRateResource | null
​InvoiceFlowResource | null
coc_number
​string | null
tax_number
​string | null
address
​string | null
postal_code
​string | null
city
​string | null
country
​string · ISO 3166-1 alpha-2
type
​CompanyType · enum
Enum values:
customer
supplier
remark
​string | null
​object
​object[]
​object[]
​AccountingLinkResource[]
updated_at
​string · date-time
created_at
​string · date-time

Merge two companies

POST
https://api.clienvy.io/employee/v1
/relation/companies/{company}/merge

Merges the company identified by merge_company_id into this company and removes the duplicate.

Merge two companies › path Parameters

company
​string · uuid · required

The company UUID

Merge two companies › Headers

X-Organization-Id
​string · uuid · required

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

Merge two companies › Request Body

merge_company_id
​string · uuid · required

UUID of the company to merge into this one.

Merge two companies › Responses

CompanyResource

id
​string · uuid
name
​string
legal_name
​string | null
invoice_email
​string | null
​ContactReferenceResource | null
bundle_invoices
​boolean
​TaxRateResource
default_mandate_id
​string | null
active_credits
​integer
auto_bill_credits
​boolean
​ContactReferenceResource | null
auto_bill_credits_threshold
​integer
price_per_credit
​number
​TaxRateResource | null
​InvoiceFlowResource | null
coc_number
​string | null
tax_number
​string | null
address
​string | null
postal_code
​string | null
city
​string | null
country
​string · ISO 3166-1 alpha-2
type
​CompanyType · enum
Enum values:
customer
supplier
remark
​string | null
​object
​object[]
​object[]
​AccountingLinkResource[]
updated_at
​string · date-time
created_at
​string · date-time

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

Updates the function of a contact within the company.

Update a company-contact link › path Parameters

company
​string · uuid · required

The company UUID

contact
​string · uuid · required

The contact UUID

Update a company-contact link › Headers

X-Organization-Id
​string · uuid · required

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

Update a company-contact link › Request Body

function
​string · maxLength: 64 · required

The contact's function within the company.

Update a company-contact link › Responses

CompanyResource

id
​string · uuid
name
​string
legal_name
​string | null
invoice_email
​string | null
​ContactReferenceResource | null
bundle_invoices
​boolean
​TaxRateResource
default_mandate_id
​string | null
active_credits
​integer
auto_bill_credits
​boolean
​ContactReferenceResource | null
auto_bill_credits_threshold
​integer
price_per_credit
​number
​TaxRateResource | null
​InvoiceFlowResource | null
coc_number
​string | null
tax_number
​string | null
address
​string | null
postal_code
​string | null
city
​string | null
country
​string · ISO 3166-1 alpha-2
type
​CompanyType · enum
Enum values:
customer
supplier
remark
​string | null
​object
​object[]
​object[]
​AccountingLinkResource[]
updated_at
​string · date-time
created_at
​string · date-time

POST
https://api.clienvy.io/employee/v1
/relation/companies/{company}/contact/{contact}

Links an existing contact to the company, setting their function.

company
​string · uuid · required

The company UUID

contact
​string · uuid · required

The contact UUID

X-Organization-Id
​string · uuid · required

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

function
​string · maxLength: 64 · required

The contact's function within the company.

CompanyResource

id
​string · uuid
name
​string
legal_name
​string | null
invoice_email
​string | null
​ContactReferenceResource | null
bundle_invoices
​boolean
​TaxRateResource
default_mandate_id
​string | null
active_credits
​integer
auto_bill_credits
​boolean
​ContactReferenceResource | null
auto_bill_credits_threshold
​integer
price_per_credit
​number
​TaxRateResource | null
​InvoiceFlowResource | null
coc_number
​string | null
tax_number
​string | null
address
​string | null
postal_code
​string | null
city
​string | null
country
​string · ISO 3166-1 alpha-2
type
​CompanyType · enum
Enum values:
customer
supplier
remark
​string | null
​object
​object[]
​object[]
​AccountingLinkResource[]
updated_at
​string · date-time
created_at
​string · date-time

POST
https://api.clienvy.io/employee/v1
/relation/companies/{company}/contact/{contact}/delete

Removes the contact from the company. Its resources are reassigned to the contact identified by assign_to_contact_id. A company must keep at least one contact.

company
​string · uuid · required

The company UUID

contact
​string · uuid · required

The contact UUID

X-Organization-Id
​string · uuid · required

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

assign_to_contact_id
​string · uuid · required

UUID of the contact the resources are reassigned to.

CompanyResource

id
​string · uuid
name
​string
legal_name
​string | null
invoice_email
​string | null
​ContactReferenceResource | null
bundle_invoices
​boolean
​TaxRateResource
default_mandate_id
​string | null
active_credits
​integer
auto_bill_credits
​boolean
​ContactReferenceResource | null
auto_bill_credits_threshold
​integer
price_per_credit
​number
​TaxRateResource | null
​InvoiceFlowResource | null
coc_number
​string | null
tax_number
​string | null
address
​string | null
postal_code
​string | null
city
​string | null
country
​string · ISO 3166-1 alpha-2
type
​CompanyType · enum
Enum values:
customer
supplier
remark
​string | null
​object
​object[]
​object[]
​AccountingLinkResource[]
updated_at
​string · date-time
created_at
​string · date-time

Set the customer portal permissions of a contact at a company

PUT
https://api.clienvy.io/employee/v1
/relation/companies/{company}/contact/{contact}/customer-portal/permissions

Replaces what the contact may open in the customer portal while working for this company. Unknown permissions are dropped and the permissions a granted one requires are added, so granting websites.manage-dns also grants websites.view. See GET permissions/customer for the catalog.

Set the customer portal permissions of a contact at a company › path Parameters

company
​string · uuid · required

The company UUID

contact
​string · uuid · required

The contact UUID

Set the customer portal permissions of a contact at a company › Headers

X-Organization-Id
​string · uuid · required

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

Set the customer portal permissions of a contact at a company › Request Body

permissions
​string[] · required

The customer portal permissions to grant, for example invoices.view.

Set the customer portal permissions of a contact at a company › 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

Preview the customer portal of a contact at a company

GET
https://api.clienvy.io/employee/v1
/relation/companies/{company}/contact/{contact}/customer-portal/preview

What the contact sees in the customer portal for this company, per permission, whether or not the permission is granted: counts always, the records themselves only for kinds of records the signed-in employee may see.

Preview the customer portal of a contact at a company › path Parameters

company
​string · uuid · required

The company UUID

contact
​string · uuid · required

The contact UUID

Preview the customer portal of a contact at a company › Headers

X-Organization-Id
​string · uuid · required

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

Preview the customer portal of a contact at a company › Responses

CustomerPortalPreviewResource

project_count
​integer · min: 0
​
ticket_count
​integer

tickets the contact takes part in

active_credits
​integer
subscription_count
​integer
invoice_count
​integer
website_count
​integer · min: 0
​
dns_domain_count
​integer

domains whose DNS records the customer can change

​
mailbox_domain_count
​integer · min: 0
​
wordpress_application_count
​integer

WordPress applications the customer can be logged in to

​

List activities

GET
https://api.clienvy.io/employee/v1
/relation/companies/{company}/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

company
​string · uuid · required

The company 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/companies/{company}/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

company
​string · uuid · required

The company 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