Clienvy API documentation

List projects

GET
https://api.clienvy.io/employee/v1
/projects

Returns a paginated list of projects, newest first. By default every project you may see is returned. Employees with project.financial also get the totals and billing figures.

List projects › query Parameters

scope
​string

Which projects to return: all (default) for every project you may see, or mine for projects you are assigned to.

search
​string

Full-text search across the project name and company name.

company_ids
​string

Only return projects for these companies. Accepts a comma-separated list of UUIDs.

project_status_ids
​string

Only return projects in these statuses. Accepts a comma-separated list of UUIDs.

types
​string

Only return projects of these types (fixed, recurring). Accepts a comma-separated list.

sort_field
​string

Field to sort by: name or created_at.

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

X-Organization-Id
​string · uuid · required

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

List projects › Responses

Array of ProjectListWithFinancialResource

Array of ProjectListResource

​
​object

Create a project

POST
https://api.clienvy.io/employee/v1
/projects

Creates a new project for a company and its contacts, optionally linked to websites.

Create a project › Headers

X-Organization-Id
​string · uuid · required

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

Create a project › Request Body

company_id
​string · uuid · required

UUID of the company the project is for.

contact_ids
​string[] · required

UUIDs of the company contacts on the project.

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

How the project is run: fixed (one-off, with phases) or recurring. Cannot be changed afterwards.

start_date
​string · date

Recurring projects only, required for them: the day the first period starts.

end_date
​string · date

Recurring projects only, required for them: the last day of the last period, on or after start_date.

period_interval
​integer

Recurring projects only, required for them: length of a period in period_interval_type units, 1 to 365.

period_interval_type
​string

Recurring projects only, required for them: days, weeks, months or years.

​object[]

Recurring projects only, required for them: what a period is worth, each entry from a day onward. At least one entry.

​array | null

Recurring projects only: hours sold per period, each entry from a day onward.

po_number
​string | null · maxLength: 128

Purchase-order number.

project_status_id
​string · uuid

UUID of the project status. Defaults to the first active status.

website_ids
​array | null

UUIDs of websites to link to the project.

project_template_id
​string | null · uuid

UUID of a project template of the same type as the project. A fixed project then starts with the phases of the template instead of the default phase. The default template of the organization is not applied automatically, so pass it explicitly.

Create a project › Responses

ProjectResource

id
​string · uuid
name
​string
type
​ProjectType · enum

Chosen when the project is created and fixed from then on: the types are counted in different ways (phases against periods), so switching would reinterpret everything already logged.

Enum values:
fixed
recurring
start_date
​string | null · date
end_date
​string | null · date
period_interval
​integer | null
period_interval_type
​string | null · enum
Enum values:
days
weeks
months
years
po_number
​string | null
created_at
​string | null · date-time
updated_at
​string | null · date-time

Get a project

GET
https://api.clienvy.io/employee/v1
/projects/{project}

Returns a single project by ID, including its contacts, websites, phases, assigned employees and deals. Its time and what it is worth are read separately, see the time statistics and financial endpoints.

Get a project › path Parameters

project
​string · uuid · required

The project UUID

Get a project › Headers

X-Organization-Id
​string · uuid · required

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

Get a project › Responses

ProjectResource

id
​string · uuid
name
​string
type
​ProjectType · enum

Chosen when the project is created and fixed from then on: the types are counted in different ways (phases against periods), so switching would reinterpret everything already logged.

Enum values:
fixed
recurring
start_date
​string | null · date
end_date
​string | null · date
period_interval
​integer | null
period_interval_type
​string | null · enum
Enum values:
days
weeks
months
years
po_number
​string | null
created_at
​string | null · date-time
updated_at
​string | null · date-time

Update a project

PUT
https://api.clienvy.io/employee/v1
/projects/{project}

Updates an existing project. Only the fields present in the request are changed. The type of a project cannot be changed. On a recurring project the dates have to keep covering the hours and planning already on it.

Update a project › path Parameters

project
​string · uuid · required

The project UUID

Update a project › Headers

X-Organization-Id
​string · uuid · required

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

Update a project › Request Body

company_id
​string · uuid

UUID of the company the project is for. Send it together with contact_ids.

contact_ids
​string[]

UUIDs of the company contacts on the project. Only applied together with company_id.

name
​string · maxLength: 128
po_number
​string | null · maxLength: 128

Purchase-order number.

project_status_id
​string · uuid

UUID of the project status.

website_ids
​array | null

UUIDs of websites to link to the project. Replaces the linked websites.

start_date
​string · date

Recurring projects only: the day the first period starts, on or before end_date.

end_date
​string · date

Recurring projects only: the last day of the last period, on or after start_date.

period_interval
​integer

Recurring projects only: length of a period in period_interval_type units, 1 to 365.

period_interval_type
​string

Recurring projects only: days, weeks, months or years.

​object[]

Recurring projects only: what a period is worth, each entry from a day onward. Replaces the list, at least one entry.

​array | null

Recurring projects only: hours sold per period, each entry from a day onward. Replaces the list.

Update a project › Responses

ProjectResource

id
​string · uuid
name
​string
type
​ProjectType · enum

Chosen when the project is created and fixed from then on: the types are counted in different ways (phases against periods), so switching would reinterpret everything already logged.

Enum values:
fixed
recurring
start_date
​string | null · date
end_date
​string | null · date
period_interval
​integer | null
period_interval_type
​string | null · enum
Enum values:
days
weeks
months
years
po_number
​string | null
created_at
​string | null · date-time
updated_at
​string | null · date-time

Delete a project

DELETE
https://api.clienvy.io/employee/v1
/projects/{project}

Deletes a project together with its spaces. A project whose spaces hold collection items cannot be deleted.

Delete a project › path Parameters

project
​string · uuid · required

The project UUID

Delete a project › Headers

X-Organization-Id
​string · uuid · required

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

Delete a project › Responses

ProjectResource

id
​string · uuid
name
​string
type
​ProjectType · enum

Chosen when the project is created and fixed from then on: the types are counted in different ways (phases against periods), so switching would reinterpret everything already logged.

Enum values:
fixed
recurring
start_date
​string | null · date
end_date
​string | null · date
period_interval
​integer | null
period_interval_type
​string | null · enum
Enum values:
days
weeks
months
years
po_number
​string | null
created_at
​string | null · date-time
updated_at
​string | null · date-time

Get project time statistics

GET
https://api.clienvy.io/employee/v1
/projects/{project}/time-statistics

Returns what the project holds in time: worked, planned and available, in total, per phase and per period, all in minutes. per_phase is empty on a recurring project and per_period is null on a fixed one. The entries and the planning themselves are listed through their own endpoints.

Get project time statistics › path Parameters

project
​string · uuid · required

The project UUID

Get project time statistics › Headers

X-Organization-Id
​string · uuid · required

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

Get project time statistics › Responses

ProjectTimeStatisticsResource

id
​string · uuid
worked_minutes
​integer
scheduled_minutes
​integer
available_minutes
​integer
time_entry_count
​integer · min: 0
planning_allocation_count
​integer · min: 0
​object[]
​array | null
​array | null

Recurring projects only: the hours a period holds as they were agreed, each entry from a day onward, oldest first. Kept in hours, the way they are entered and sent back.


Get project financials

GET
https://api.clienvy.io/employee/v1
/projects/{project}/financial

Returns what the project is worth: the agreed amounts, its revenue items, what is billed of it and the cost of the hours worked on it.

Get project financials › path Parameters

project
​string · uuid · required

The project UUID

Get project financials › Headers

X-Organization-Id
​string · uuid · required

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

Get project financials › Responses

ProjectFinancialResource

id
​string · uuid
non_recurring_total_revenue_excluding_tax
​number
non_recurring_total_revenue_including_tax
​number
non_recurring_billed_revenue_excluding_tax
​number
non_recurring_billed_revenue_including_tax
​number
​ProjectRevenueItemResource[]
​ProjectInvoiceItemResource[]
hour_purchase_cost
​number

The logged hours at their purchase rate, the project rate before the employee's own.

hour_sale_cost
​number

The logged hours at their sale rate, the project rate before the employee's own.

hour_purchase_margin
​number | null

The non-recurring revenue less hour_purchase_cost. Null on a recurring project.

hour_sale_margin
​number | null

The non-recurring revenue less hour_sale_cost. Null on a recurring project.

​object[]
​array | null

Recurring projects only: what a period is worth, each entry from a day onward, oldest first.

current_period
​object | null

Recurring projects only: the period of today, measured against what it was sold for.


Update project revenue items

PUT
https://api.clienvy.io/employee/v1
/projects/{project}/revenue-items

Replaces the project's non-recurring revenue items and their priced sub-items. Send the UUIDs of existing items and sub-items to keep them. Items that are left out are removed. Answers with the financials of the project.

Update project revenue items › path Parameters

project
​string · uuid · required

The project UUID

Update project revenue items › Headers

X-Organization-Id
​string · uuid · required

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

Update project revenue items › Request Body

​object[]

The project revenue items.

Update project revenue items › Responses

ProjectFinancialResource

id
​string · uuid
non_recurring_total_revenue_excluding_tax
​number
non_recurring_total_revenue_including_tax
​number
non_recurring_billed_revenue_excluding_tax
​number
non_recurring_billed_revenue_including_tax
​number
​ProjectRevenueItemResource[]
​ProjectInvoiceItemResource[]
hour_purchase_cost
​number

The logged hours at their purchase rate, the project rate before the employee's own.

hour_sale_cost
​number

The logged hours at their sale rate, the project rate before the employee's own.

hour_purchase_margin
​number | null

The non-recurring revenue less hour_purchase_cost. Null on a recurring project.

hour_sale_margin
​number | null

The non-recurring revenue less hour_sale_cost. Null on a recurring project.

​object[]
​array | null

Recurring projects only: what a period is worth, each entry from a day onward, oldest first.

current_period
​object | null

Recurring projects only: the period of today, measured against what it was sold for.


Bill project revenue

POST
https://api.clienvy.io/employee/v1
/projects/{project}/bill

Creates an invoice for the given revenue sub-items of the project and returns the new invoice.

Bill project revenue › path Parameters

project
​string · uuid · required

The project UUID

Bill project revenue › Headers

X-Organization-Id
​string · uuid · required

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

Bill project revenue › Request Body

reference
​string · maxLength: 128 · required

Reference/title of the invoice.

subitem_ids
​string[] · required

UUIDs of the project revenue sub-items to bill.

Bill project revenue › Responses

InvoiceReferenceResource

id
​string · uuid
reference
​string
formatted_number
​string | null
document_title
​string
status
​InvoiceStatus · enum
Enum values:
concept
proforma
open
expired
paid
total_excluding_tax
​number
total_including_tax
​number

Add a project phase

POST
https://api.clienvy.io/employee/v1
/projects/{project}/phases

Adds a phase at the end of a fixed project. available_hours is the number of hours sold for the phase. Logged and planned hours are measured against it. The project's start and end date follow from the earliest and latest phase dates. Answers with the phase and the updated project. A recurring project has no phases and is answered with a 422.

Add a project phase › path Parameters

project
​string · uuid · required

The project UUID

Add a project phase › Headers

X-Organization-Id
​string · uuid · required

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

Add a project phase › Request Body

name
​string · maxLength: 64 · required
available_hours
​number | null

Hours sold for the phase, at most 10000.

start_date
​string | null · date

First day of the phase. Given together with end_date, or both null.

end_date
​string | null · date

Last day of the phase. Given together with start_date, or both null.

Add a project phase › Responses

ProjectPhaseResource

​ProjectPhaseResource · required
​ProjectResource · required

Reorder the project phases

PUT
https://api.clienvy.io/employee/v1
/projects/{project}/phases/order

Sets the position of the project's phases. Phases of other projects are ignored. Returns the project with its phases in the new order. Only on a fixed project.

Reorder the project phases › path Parameters

project
​string · uuid · required

The project UUID

Reorder the project phases › Headers

X-Organization-Id
​string · uuid · required

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

Reorder the project phases › Request Body

​object[] · required

The phases and their new positions.

Reorder the project phases › Responses

ProjectResource

id
​string · uuid
name
​string
type
​ProjectType · enum

Chosen when the project is created and fixed from then on: the types are counted in different ways (phases against periods), so switching would reinterpret everything already logged.

Enum values:
fixed
recurring
start_date
​string | null · date
end_date
​string | null · date
period_interval
​integer | null
period_interval_type
​string | null · enum
Enum values:
days
weeks
months
years
po_number
​string | null
created_at
​string | null · date-time
updated_at
​string | null · date-time

Update a project phase

PUT
https://api.clienvy.io/employee/v1
/projects/{project}/phases/{projectPhase}

Updates a phase. Only the fields present in the request are changed. Send start_date and end_date together, or both as null. Answers with the phase and the updated project. Only on a fixed project.

Update a project phase › path Parameters

project
​string · uuid · required

The project UUID

projectPhase
​string · uuid · required

The project phase UUID

Update a project phase › Headers

X-Organization-Id
​string · uuid · required

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

Update a project phase › Request Body

name
​string · maxLength: 64
available_hours
​number | null

Hours sold for the phase, at most 10000.

start_date
​string | null · date

First day of the phase. Given together with end_date, or both null.

end_date
​string | null · date

Last day of the phase. Given together with start_date, or both null.

Update a project phase › Responses

ProjectPhaseResource

​ProjectPhaseResource · required
​ProjectResource · required

Delete a project phase

DELETE
https://api.clienvy.io/employee/v1
/projects/{project}/phases/{projectPhase}

Deletes a phase. A phase with logged or planned hours cannot be deleted, and neither can the last phase of a project. Answers with the deleted phase and the updated project. Only on a fixed project.

Delete a project phase › path Parameters

project
​string · uuid · required

The project UUID

projectPhase
​string · uuid · required

The project phase UUID

Delete a project phase › Headers

X-Organization-Id
​string · uuid · required

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

Delete a project phase › Responses

ProjectPhaseResource

​ProjectPhaseResource · required
​ProjectResource · required

Assign an employee to a project

POST
https://api.clienvy.io/employee/v1
/projects/{project}/employees/{employee}

Adds the employee (identified in the path) to the project team, with the employee's own hourly rates as the project rates. Assigning an employee who is already on the team changes nothing. A deactivated employee cannot be assigned.

Assign an employee to a project › path Parameters

project
​string · uuid · required

The project UUID

employee
​string · uuid · required

The employee UUID

Assign an employee to a project › Headers

X-Organization-Id
​string · uuid · required

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

Assign an employee to a project › Responses

ProjectResource

id
​string · uuid
name
​string
type
​ProjectType · enum

Chosen when the project is created and fixed from then on: the types are counted in different ways (phases against periods), so switching would reinterpret everything already logged.

Enum values:
fixed
recurring
start_date
​string | null · date
end_date
​string | null · date
period_interval
​integer | null
period_interval_type
​string | null · enum
Enum values:
days
weeks
months
years
po_number
​string | null
created_at
​string | null · date-time
updated_at
​string | null · date-time

Remove an employee from a project

DELETE
https://api.clienvy.io/employee/v1
/projects/{project}/employees/{employee}

Removes the employee (identified in the path) from the project team. An employee who has logged time or is planned on the project cannot be removed.

Remove an employee from a project › path Parameters

project
​string · uuid · required

The project UUID

employee
​string · uuid · required

The employee UUID

Remove an employee from a project › Headers

X-Organization-Id
​string · uuid · required

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

Remove an employee from a project › Responses

ProjectResource

id
​string · uuid
name
​string
type
​ProjectType · enum

Chosen when the project is created and fixed from then on: the types are counted in different ways (phases against periods), so switching would reinterpret everything already logged.

Enum values:
fixed
recurring
start_date
​string | null · date
end_date
​string | null · date
period_interval
​integer | null
period_interval_type
​string | null · enum
Enum values:
days
weeks
months
years
po_number
​string | null
created_at
​string | null · date-time
updated_at
​string | null · date-time

Update an employee's project rates

PUT
https://api.clienvy.io/employee/v1
/projects/{project}/employees/{employee}/rate

Sets the purchase and sale hourly rates for the employee on this project. Both rates are written on every call: a rate that is left out or null is cleared, and the employee's own rate applies again. Answers with the financials of the project.

Update an employee's project rates › path Parameters

project
​string · uuid · required

The project UUID

employee
​string · uuid · required

The employee UUID

Update an employee's project rates › Headers

X-Organization-Id
​string · uuid · required

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

Update an employee's project rates › Request Body

purchase_hourly_rate
​number | null · decimal

Cost (purchase) hourly rate for the employee on this project.

sale_hourly_rate
​number | null · decimal

Billable (sale) hourly rate for the employee on this project.

Update an employee's project rates › Responses

ProjectFinancialResource

id
​string · uuid
non_recurring_total_revenue_excluding_tax
​number
non_recurring_total_revenue_including_tax
​number
non_recurring_billed_revenue_excluding_tax
​number
non_recurring_billed_revenue_including_tax
​number
​ProjectRevenueItemResource[]
​ProjectInvoiceItemResource[]
hour_purchase_cost
​number

The logged hours at their purchase rate, the project rate before the employee's own.

hour_sale_cost
​number

The logged hours at their sale rate, the project rate before the employee's own.

hour_purchase_margin
​number | null

The non-recurring revenue less hour_purchase_cost. Null on a recurring project.

hour_sale_margin
​number | null

The non-recurring revenue less hour_sale_cost. Null on a recurring project.

​object[]
​array | null

Recurring projects only: what a period is worth, each entry from a day onward, oldest first.

current_period
​object | null

Recurring projects only: the period of today, measured against what it was sold for.


List activities

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

project
​string · uuid · required

The project 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
/projects/{project}/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

project
​string · uuid · required

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