Skip to main content
POST
Complete a knowledge base upload
Confirms that the file was uploaded to the presigned URL, and makes the document usable on calls.

Overview

This is the third step of the upload flow. Until it succeeds the document stays PENDING and no call will consult it.

What Gets Verified

The stored object is checked before the document is accepted:
  • it exists — a completion call for a file that was never uploaded is rejected
  • it is within the 20 MiB (20,971,520 bytes) size limit
  • it carries the content type the upload URL was issued for
A file that fails verification is deleted from storage, and the document slot is released. Fix the problem and start a new upload.
The size you declared when reserving the slot is a fast pre-check, not the authoritative one. What is measured here is the object storage actually holds.

Idempotency

Completing a document that is already READY returns it unchanged, with no error. A completion call that times out on your side is safe to retry.

After Completion

The document is READY and isActive: true. It is attached to the agent’s next call automatically — there is no publish step, and no need to update the agent itself. To park a document without deleting it, deactivate it.

Error Scenarios

  • 400 Bad Request: Nothing was uploaded to the URL, or the stored file failed verification
  • 404 Not Found: No such document on that agent
  • 429 Too Many Requests: Rate limit exceeded — wait for Retry-After seconds

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.

Response

Upload verified; the document is now READY

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