Skip to content
PUT /v1/knowledge/{corpus}/documents

Upsert a document

Adds or replaces a document in a corpus, carrying the access rules it should be retrieved under.

Adds or replaces a document in a corpus, carrying the access rules it should be retrieved under.

Headers
Authorization Bearer nx_live_…
Content-Type application/json
Request body
{
  "external_id": "policy-returns-v7",
  "title": "Returns policy",
  "body": "…",
  "acl": { "groups": ["support", "legal"] }
}
Response
{
  "id": "doc_5c02",
  "external_id": "policy-returns-v7",
  "chunks": 34,
  "indexed": true,
  "replaced_version": "policy-returns-v6"
}