Base Path & Authentication
All/v1/documents/* endpoints require your organization API key passed in either X-API-Key or Authorization: Bearer:
Manual & API Uploads Only: The Documents API returns and manages documents uploaded manually or via the API. Files synced through Connected Sources (SharePoint, OneDrive, Google Drive) are managed by their cloud sync connection and are excluded from
/v1/documents (returning 404 Not Found if queried by ID).The Document Object
Endpoints that return a document (GET, POST, PATCH) use the following schema:
Health Check Ping
GET /
Verifies that the Omnifact Public API service is online. This endpoint does not require authentication.
Example Request
Response (200 OK, text/plain)
List Supported File Types
GET /v1/documents/supported-file-types
Returns a JSON array of all 17 MIME types and file extensions (without leading dots) accepted by Space Uploaded Files.
Spreadsheet workbooks (
.xls, .xlsx, .ods) and raster images (.png, .jpg, .webp, etc.) are intentionally excluded from Space Uploaded Files. Attach spreadsheets or images directly in chat instead.Example Request
Response (200 OK)
List Documents
GET /v1/documents
Retrieves manually and API-uploaded documents in a Space, sorted newest-first (contentUpdatedAt descending).
Query Parameters
Example Request
Response (200 OK)
Upload Document
POST /v1/documents
Uploads a new document into a Space’s Uploaded Files. Ingestion runs asynchronously: Omnifact extracts text per page or slide, runs Privacy Filter entity detection, builds searchable chunks and vector embeddings, and updates status from "processing" to "ready" (or "error").
Query Parameters
Optional Headers
Request Body (multipart/form-data)
Example Request
Response (201 Created)
Get Document Details
GET /v1/documents/{id}
Fetches metadata, last content timestamp, and indexing status for a specific document.
Path Parameters
Example Request
Response (200 OK)
Update Document
PATCH /v1/documents/{id}
Updates a document’s display name or metadata object (maximum JSON body size: 1 MB).
Path Parameters
Request Body (application/json)
Example Request
Response (200 OK)
Delete Document
DELETE /v1/documents/{id}
Permanently deletes the document file from storage, removes its extracted text parts, chunks, and embeddings from the database, and triggers a clean rebuild of the Space summary.
Example Request
Response (204 No Content)
Returns an empty body with status 204 No Content.
Error Codes
WhenPOST /v1/documents or PATCH /v1/documents/{id} fails validation, the API returns 400 Bad Request (or 403 Forbidden) with a structured error code:
Next Steps
- Query published Space agents with the Published Spaces Chat API
- Review supported formats and page quotas in Managing Uploaded Files