Skip to main content
PATCH
Update a Semantic Layer document
Same rule as creating: the key edits as its creator. On Growth and Custom a member needs editor on the document; on Free and Starter permissions are not enforced, so every member’s key may edit any document. Changing folder moves the document. On Growth and Custom a member also needs editor on the destination, the folder, or the root when folder is null. A move resets the document’s manual sort position. Sending content re-parses the document’s mentions and reindexes it for semantic search. A document its creator cannot see answers 404, not 403: an id you cannot read is indistinguishable from one that does not exist.

Replace a document

PUT /api/v1/semantic-layer/documents/{id}/ applies the same rules as PATCH, with one difference: name is required in the body. content and folder are optional, and an omitted field keeps its current value.
DELETE is not available to an API key, whatever its creator’s role, and returns 403. Remove documents from the app.

Authorizations

x-api-key
string
header
required

API Key authentication. Format: 'x-api-key: api_key'

Path Parameters

id
string
required

Body

name
string
Maximum string length: 255
content
string
folder
string<uuid> | null

Folder to place the document in. Omit or send null to put it at the root.

Response

200 - application/json
id
string<uuid>
required
read-only
name
string
required
Maximum string length: 255
mentions
any
required
order
integer | null
required
read-only

Manual position among its siblings; NULL falls back to created_at ordering.

created_by
integer
required
read-only

Created by (Expandable)

created_at
string<date-time>
required
read-only
updated_at
string<date-time>
required
read-only
content
string
folder
string<uuid> | null

Folder to place the document in. Omit or send null to put it at the root.