Skip to main content
PATCH
Activate or deactivate a knowledge document
Activates or deactivates a document without deleting it.

Overview

Deactivating keeps the document and its stored file — it simply stops being attached to new calls. Use it to park seasonal or draft material you expect to bring back, instead of deleting and re-uploading. Calls already in progress are unaffected: a document is resolved when a call starts.

Example

Pending Documents

Only completed (READY) documents can be toggled. Activating a document whose file never arrived would produce something that lists as usable and fails when a call tries to read it, so it is rejected with a 409 instead.

Error Scenarios

  • 404 Not Found: No such document on that agent
  • 409 Conflict: The document’s upload has not been completed yet

Authorizations

Authorization
string
header
required

API key for authentication using Bearer scheme

Path Parameters

id
string<uuid>
required

Agent the knowledge base belongs to.

documentId
string<uuid>
required

Knowledge document id.

Query Parameters

companyId
string

Required for ATS API keys to specify which company to access. Ignored for standard company API keys.

Body

application/json
isActive
boolean
required

Whether the agent may consult this document during a call. Deactivating keeps the document — it simply stops being attached to new calls.

Example:

false

Response

Document updated

id
string<uuid>
required

Document ID

Example:

"123e4567-e89b-12d3-a456-426614174000"

title
string
required

Human-readable label for the document

Example:

"Benefits and perks"

status
enum<string>
required

PENDING while waiting for the file to be uploaded to the presigned URL and the upload to be completed; READY once the file is confirmed stored. Only READY documents are attached to calls.

Available options:
PENDING,
READY
Example:

"READY"

isActive
boolean
required

Whether the agent may consult this document during a call. Always false while the upload is PENDING.

Example:

true

createdAt
string<date-time>
required

When the document was created

Example:

"2026-08-08T10:15:00.000Z"

fileName
string

Original file name as uploaded

Example:

"benefits-and-perks.pdf"

mimeType
string

MIME type of the stored file

Example:

"application/pdf"

sizeBytes
number

Size of the stored file in bytes, as verified against storage. Absent until the upload is READY.

Example:

482133