Skip to main content
PUT
Update a knowledge document

Authorizations

Authorization
string
header
required

API key starting with sk_. Generate one in Settings > API Keys.

Path Parameters

knowledgeDocumentId
string
required

Knowledge document ID.

Body

application/json
content
string

New text. Only accepted on text documents.

Minimum string length: 1
name
string

New display name.

Minimum string length: 1
summary
string

New summary.

Required string length: 1 - 800

Response

200 - application/json

Default Response

contentType
string | null
required

MIME type of the uploaded file. Null when the document has no file.

createdAt
string
required

ISO 8601 creation date.

createdById
string | null
required

ID of the user who created the document.

failureReason
enum<string> | null
required

Why processing failed. Null unless the status is failed.

Available options:
upload_expired,
unsupported_type,
encrypted,
page_too_large,
too_large,
optimization_timeout,
processing_error,
kb_failed
fileName
string | null
required

Original file name. Null when the document has no file.

fileSize
integer | null
required

File size in bytes. Null when the document has no file.

id
string
required

Unique identifier of the knowledge document.

knowledgeFolderId
string | null
required

Knowledge folder holding the document. Null for the General folder and for page documents.

name
string
required

Name of the document.

nbCitations
integer | null
required

Number of times AI content cited this document. Null for a document created before citations were counted and never cited since.

pageId
string | null
required

Page the document is attached to. Null for workspace documents.

reviewStatus
enum<string> | null
required

to_validate when the document is 18 months old or more and was not validated in the last 3 months, up_to_date otherwise. Null until processing has succeeded.

Available options:
to_validate,
up_to_date
status
enum<string> | null
required

Processing status.

Available options:
pending,
success,
failed
summary
string | null
required

Summary of the document content.

type
enum<string> | null
required

Document type.

Available options:
text,
url,
file
updatedAt
string | null
required

ISO 8601 date of the last update.

updatedById
string | null
required

ID of the user who last updated the document.

url
string | null
required

Source URL of a url document. Known on the single-document routes only, null elsewhere.

validatedAt
string | null
required

ISO 8601 date of the last validation.

validatedById
string | null
required

ID of the user who last validated the document.

workspace
object
required

Workspace this knowledge document belongs to.

content
string | null
required

Indexed text of the document. Null until processing has succeeded.