Knowledge base schemas
The record shapes form-backed knowledge bases use, including the standard templates a new base starts from.
List schemas
Returns the record schemas knowledge bases can be built from — the workspace's own and the standard templates the product ships.
query Parameters
cursor^[A-Za-z0-9_-]+$form_activeform_createdform_descriptionform_idform_managed_byform_nameform_updatedlimitoffsetsort^-?[a-z0-9_]+$Headers
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
List schemas › Responses
Success
has_moreWhether more rows exist past this page.
next_cursorPass back as cursor for the next page. Null on the last page.
Create a schema
Creates an empty schema to define fields on. POST /knowledge-bases with ds_type: form and no schema named also creates one, already linked to the base.
Headers
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Create a schema › Request Body
form_nameform_descriptionform_configform_metadataCreate a schema › Responses
Created
form_idform_nameform_descriptionform_configform_metadataform_managed_byform_activeform_createdform_updatedGet a schema
Returns the schema with its field definitions. A knowledge base names its schema in form_id.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Get a schema › Responses
Success
form_idform_nameform_descriptionform_configform_metadataform_managed_byform_activeform_createdform_updatedDelete a schema
Deactivates the schema. Records already collected with it are unaffected. A schema an active knowledge base is built on cannot be removed: deactivate the base first.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Delete a schema › Responses
Success. No content.
Update a schema
Applies the form_-prefixed fields present in the body. Records already collected keep the shape they were collected with. A product-shipped template cannot be changed — fork it through the knowledge base that uses it.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Update a schema › Request Body optional
form_nameform_descriptionform_activeform_configform_metadataUpdate a schema › Responses
Success
form_idform_nameform_descriptionform_configform_metadataform_managed_byform_activeform_createdform_updated