Knowledge
List knowledge items
Returns a paginated list of knowledge items without their content; the summary says what each one
holds, so open only the ones you need. Every item lives in one place (parent_type, parent_id):
the organization (organization, no id) or one record. A record falls under the company it
belongs to (company).
company_id: everything of a company, including what lives on its contacts, deals, projects, websites, invoices and subscriptions.model_type+model_id: what applies to one record: what lives on it and on the company it falls under (a deal also returns its company's knowledge).recordthen names that record.company_id+model_type+model_id: the same for a record seen from that company, which it has to fall under: what lives on the record and on that company (record.company).parent_types=organization: the organization's own knowledge.
query Parameters
company_idReturn everything of one company: what lives on it and on the records under it.
model_typeReturn what applies to one record: company, contact, deal, project, website, invoice or subscription. Use together with model_id.
model_idUUID of that record.
typesOnly return these types. Accepts a comma-separated list of note, transcript, skill.
parent_typesOnly return items living here: organization for the organization's own knowledge, or a kind of record, e.g. deal for what is on the deals of a company. Accepts a comma-separated list of organization, company, contact, deal, project, website, invoice, subscription.
searchSearch across title, description and content.
pagePage number of the paginated result set.
per_pageNumber of items per page. Defaults to the endpoint's own page size; capped at 500.
Headers
X-Organization-IdUUID of the organization (tenant) the request operates on.
List knowledge items › Responses
Array of KnowledgeItemListResource
Create a knowledge item
Stores knowledge for AI use. Say where it lives: parent_type=organization for knowledge of the
organization as a whole, or the record it is about (a company, contact, deal, project, website,
invoice or subscription) as parent_type + parent_id. Knowledge on a deal or project shows up
at its company as well, so put it on the most specific record. Give it a title, and a description that says what the item holds
or when to use it: lists show the description, and for a skill it is how AI clients know when to
use it. Send the content as markdown; Clienvy turns it into blocks for its editor. Skills are
instructions, for the organization as a whole or for one record, such as a customer's
monthly report on its company.
Knowledge on a record needs the permission that changes that record (deal.edit for a deal,
relation.edit for a company or contact); knowledge of the organization needs
organization.manage-knowledge. Search the context first and update an existing item on the same
subject rather than creating a near duplicate.
Headers
X-Organization-IdUUID of the organization (tenant) the request operates on.
Create a knowledge item › Request Body
typeOne of note (information), transcript (what was said in a call or meeting) or skill (an instruction an AI client follows). Any item can carry files, such as a briefing, contract or template.
parent_typeWhere the item lives: organization, or the type of the record it is on: company, contact, deal, project, website, invoice or subscription.
titleA short title. Always give one, even though an item can be nameless.
descriptionWhat the item holds or when to use it. Shown in lists instead of the content; for a skill it is how AI clients know when to use it, so always give one.
markdownThe content as markdown. At most 10,000 characters for a pinned item.
markdown_file_idInstead of markdown: an uploaded text file (such as txt, json, md, vtt or srt, up to 512 KB) whose text becomes the content, for a long transcript or document that is too large to send as markdown.
is_pinnedSend the full content along whenever its context is used (the organization: every conversation; a company: whenever you work for that company) instead of only the summary. The organization profile is a pinned note.
parent_idUUID of that record. Leave it out for the organization.
Create a knowledge item › Responses
KnowledgeItemResource
idtypetitleNull while the item is nameless.
descriptionsummaryThe description, or the start of the text when there is none.
markdownThe content as markdown: read this one.
contentThe content as blocks of the Clienvy editor.
is_pinnedparent_typeWhere the item lives: organization, or the type of the record it is on (company, contact, deal, project, website, invoice, subscription).
parent_idThe record it is on; null for the organization.
The record the item lives on, with its name; null for the organization.
The company the item falls under: the company it lives on, or that of its record.
created_atupdated_atdeleted_atList deleted knowledge items
Returns the knowledge items in the trash, most recently deleted first. A deleted item can be put back with the restore endpoint.
query Parameters
pagePage number of the paginated result set.
per_pageNumber of items per page. Defaults to the endpoint's own page size; capped at 500.
Headers
X-Organization-IdUUID of the organization (tenant) the request operates on.
List deleted knowledge items › Responses
Array of KnowledgeItemListResource
Get a trashed knowledge item
Returns a knowledge item from the trash as it was when it was deleted, to see what it held before restoring it.
path Parameters
knowledgeItemThe knowledge item UUID
Headers
X-Organization-IdUUID of the organization (tenant) the request operates on.
Get a trashed knowledge item › Responses
KnowledgeItemResource
idtypetitleNull while the item is nameless.
descriptionsummaryThe description, or the start of the text when there is none.
markdownThe content as markdown: read this one.
contentThe content as blocks of the Clienvy editor.
is_pinnedparent_typeWhere the item lives: organization, or the type of the record it is on (company, contact, deal, project, website, invoice, subscription).
parent_idThe record it is on; null for the organization.
The record the item lives on, with its name; null for the organization.
The company the item falls under: the company it lives on, or that of its record.
created_atupdated_atdeleted_atRestore a deleted knowledge item
Takes the item out of the trash. Takes the same permission as deleting it.
path Parameters
knowledgeItemThe knowledge item UUID
Headers
X-Organization-IdUUID of the organization (tenant) the request operates on.
Restore a deleted knowledge item › Responses
KnowledgeItemResource
idtypetitleNull while the item is nameless.
descriptionsummaryThe description, or the start of the text when there is none.
markdownThe content as markdown: read this one.
contentThe content as blocks of the Clienvy editor.
is_pinnedparent_typeWhere the item lives: organization, or the type of the record it is on (company, contact, deal, project, website, invoice, subscription).
parent_idThe record it is on; null for the organization.
The record the item lives on, with its name; null for the organization.
The company the item falls under: the company it lives on, or that of its record.
created_atupdated_atdeleted_atGet a knowledge item
Returns a knowledge item with its content, parent and attachments. The content comes twice: markdown
to read, and content as the blocks of the Clienvy editor. Read a text attachment (template,
example) with the file endpoint.
path Parameters
knowledgeItemThe knowledge item UUID
Headers
X-Organization-IdUUID of the organization (tenant) the request operates on.
Get a knowledge item › Responses
KnowledgeItemResource
idtypetitleNull while the item is nameless.
descriptionsummaryThe description, or the start of the text when there is none.
markdownThe content as markdown: read this one.
contentThe content as blocks of the Clienvy editor.
is_pinnedparent_typeWhere the item lives: organization, or the type of the record it is on (company, contact, deal, project, website, invoice, subscription).
parent_idThe record it is on; null for the organization.
The record the item lives on, with its name; null for the organization.
The company the item falls under: the company it lives on, or that of its record.
created_atupdated_atdeleted_atUpdate a knowledge item
Changes a knowledge item; only the fields present are changed. parent_type (with parent_id for
a record) moves it. Every change of the content is kept as a version that can be restored.
path Parameters
knowledgeItemThe knowledge item UUID
Headers
X-Organization-IdUUID of the organization (tenant) the request operates on.
Update a knowledge item › Request Body
titledescriptionmarkdownThe content as markdown; replaces the whole content.
markdown_file_idInstead of markdown: an uploaded text file whose text replaces the whole content.
is_pinnedparent_typeparent_idUpdate a knowledge item › Responses
KnowledgeItemResource
idtypetitleNull while the item is nameless.
descriptionsummaryThe description, or the start of the text when there is none.
markdownThe content as markdown: read this one.
contentThe content as blocks of the Clienvy editor.
is_pinnedparent_typeWhere the item lives: organization, or the type of the record it is on (company, contact, deal, project, website, invoice, subscription).
parent_idThe record it is on; null for the organization.
The record the item lives on, with its name; null for the organization.
The company the item falls under: the company it lives on, or that of its record.
created_atupdated_atdeleted_atDelete a knowledge item
Moves the item to the trash, from where it can be restored for 30 days; after that it is deleted
for good. Takes the permission that deletes the record it lives on (a deal: deal.delete), or
organization.manage-knowledge for knowledge of the organization.
path Parameters
knowledgeItemThe knowledge item UUID
Headers
X-Organization-IdUUID of the organization (tenant) the request operates on.
Delete a knowledge item › Responses
KnowledgeItemResource
idtypetitleNull while the item is nameless.
descriptionsummaryThe description, or the start of the text when there is none.
markdownThe content as markdown: read this one.
contentThe content as blocks of the Clienvy editor.
is_pinnedparent_typeWhere the item lives: organization, or the type of the record it is on (company, contact, deal, project, website, invoice, subscription).
parent_idThe record it is on; null for the organization.
The record the item lives on, with its name; null for the organization.
The company the item falls under: the company it lives on, or that of its record.
created_atupdated_atdeleted_atAdd a file to a knowledge item
Attaches a file to a knowledge item, e.g. a template a skill uses: one uploaded with the file
upload endpoint (file_id), or text with a name (including its extension) and its content,
which is stored as a file.
path Parameters
knowledgeItemThe knowledge item UUID
Headers
X-Organization-IdUUID of the organization (tenant) the request operates on.
Add a file to a knowledge item › Request Body
file_idUUID of a file uploaded with the file upload endpoint.
nameFile name with extension when sending text, e.g. proposal-template.html.
contentThe text of the file when sending text.
Add a file to a knowledge item › Responses
KnowledgeItemResource
idtypetitleNull while the item is nameless.
descriptionsummaryThe description, or the start of the text when there is none.
markdownThe content as markdown: read this one.
contentThe content as blocks of the Clienvy editor.
is_pinnedparent_typeWhere the item lives: organization, or the type of the record it is on (company, contact, deal, project, website, invoice, subscription).
parent_idThe record it is on; null for the organization.
The record the item lives on, with its name; null for the organization.
The company the item falls under: the company it lives on, or that of its record.
created_atupdated_atdeleted_atGet a file of a knowledge item
Returns a text attachment (txt, md, csv, json, xml, yml, yaml, html, css, scss, js, ts, php, sql,
svg, log, vtt or srt) with its content, so a template or example can be read within this connection. Up to
512 KB; another file type, or a larger file, is opened through its url.
path Parameters
knowledgeItemThe knowledge item UUID
fileThe file UUID
Headers
X-Organization-IdUUID of the organization (tenant) the request operates on.
Get a file of a knowledge item › Responses
KnowledgeItemFileResource
idnamefile_typeurlcontentThe file's text.
Remove a file from a knowledge item
Detaches the file. Earlier versions of the item still refer to it, so it can come back with a restore.
path Parameters
knowledgeItemThe knowledge item UUID
fileThe file UUID
Headers
X-Organization-IdUUID of the organization (tenant) the request operates on.
Remove a file from a knowledge item › Responses
KnowledgeItemResource
idtypetitleNull while the item is nameless.
descriptionsummaryThe description, or the start of the text when there is none.
markdownThe content as markdown: read this one.
contentThe content as blocks of the Clienvy editor.
is_pinnedparent_typeWhere the item lives: organization, or the type of the record it is on (company, contact, deal, project, website, invoice, subscription).
parent_idThe record it is on; null for the organization.
The record the item lives on, with its name; null for the organization.
The company the item falls under: the company it lives on, or that of its record.
created_atupdated_atdeleted_atList versions of a knowledge item
Returns the version history of the knowledge item, newest first, each version as markdown and with the files it had that still exist. Changes by the same employee, through the same AI connection, within a few minutes are combined into one version. The 100 most recent versions are kept.
path Parameters
knowledgeItemThe knowledge item UUID
Headers
X-Organization-IdUUID of the organization (tenant) the request operates on.
List versions of a knowledge item › Responses
Array of KnowledgeItemVersionResource
idThe content as it was, as blocks of the editor.
What the record was besides its content, such as its title; null for a record that versions only its content.
The contact who made the version in the customer portal, if not an employee.
The AI connection the change was made through, if any.
created_atupdated_atmarkdownThe content of this version as markdown: read this one.
The files the item had, as far as they still exist.
Restore a version of a knowledge item
Puts an earlier version of the knowledge item back: its text, title, description, whether it is pinned and the files it had that still exist. The restore itself is stored as a new version, so it can be undone. Answers with the version that was put back.
path Parameters
knowledgeItemThe knowledge item UUID
versionThe version UUID, as listed by the versions endpoint.
Headers
X-Organization-IdUUID of the organization (tenant) the request operates on.
Restore a version of a knowledge item › Responses
KnowledgeItemVersionResource
idThe content as it was, as blocks of the editor.
What the record was besides its content, such as its title; null for a record that versions only its content.
The contact who made the version in the customer portal, if not an employee.
The AI connection the change was made through, if any.
created_atupdated_atmarkdownThe content of this version as markdown: read this one.
The files the item had, as far as they still exist.
List skill templates
Returns the skill templates Clienvy provides: starting points for common skills, such as drawing up a proposal. A template is not an instruction: write the organization's own skill from it, in its language and fitted to how it works, and save that as a knowledge item.
Headers
X-Organization-IdUUID of the organization (tenant) the request operates on.
List skill templates › Responses
Array of SkillTemplateListResource
keytitledescriptionWhen the skill is used.
filesThe names of the files that come with it, not their text: read one with GET /skill-templates/{template}/files/{name}.
Get a skill template
Returns the text to write a skill from, and the names of the files that come with it.
path Parameters
templateThe key of the template.
Headers
X-Organization-IdUUID of the organization (tenant) the request operates on.
Get a skill template › Responses
SkillTemplateResource
keytitledescriptionWhen the skill is used.
markdownThe text to write the skill from.
filesThe names of the files that come with it, not their text: read one with GET /skill-templates/{template}/files/{name}.
Get a file of a skill template
Returns the text of a file that comes with a template, e.g. an HTML template for proposals.
path Parameters
templateThe key of the template.
nameThe file name, as listed by the template.
Headers
X-Organization-IdUUID of the organization (tenant) the request operates on.
Get a file of a skill template › Responses
SkillTemplateFileResource
namecontentThe file's text.