Skip to content

companyRAG API

The companyRAG Indexer exposes an HTTP API for managing files, collections, indexing jobs and data sources programmatically. It allows content to be ingested into companyRAG automatically, for example from an existing document management system or through a nightly sync.

This page covers the essentials: authentication, base URL and error handling. The full reference for every endpoint is generated directly from the OpenAPI specification and therefore always matches the implementation.

All endpoints require authentication via an API key. The key is sent in the Authorization header as a Bearer token:

Authorization: Bearer rag_a1b2c3d4e5f67890abcdef1234567890abcdef1234567890abcdef1234567890

API keys are created in the admin area and have the format rag_ followed by a 64-character hex string.

The API also accepts an access_token cookie. That path exists as a fallback for browser clients already signed in to companyRAG; integrations and scripts should use the Bearer token.

The API is available under the domain of your CompanyGPT instance:

https://[COMPANY].company-gpt.com/companygpt/rag/api

Replace [COMPANY] with your own subdomain. You can read it from the browser address bar while the companyRAG UI is open — for example innfactory for https://innfactory.company-gpt.com.

Errors are mostly returned as a JSON object with an error field:

{
"error": "Error message description"
}

A few endpoints return a plain-text body instead; these are noted on the respective endpoint in the reference.

StatusMeaning
400 Bad RequestInvalid request parameters
401 UnauthorizedMissing or invalid authentication
403 ForbiddenInsufficient permissions
404 Not FoundResource not found
409 ConflictConflict with the current state of the resource, such as a job that cannot be retried in its current status
500 Internal Server ErrorServer-side error

The endpoints are grouped by area in the reference:

  • Files – upload, list, retrieve, delete and reindex files.
  • Jobs – monitor, retry, cancel and clean up indexing jobs.
  • Collections – create, update and delete collections and manage their shares.
  • Ingest – ingest structured datasets row by row and truncate tables.
  • Sources – configure and synchronize data sources such as SharePoint or Firecrawl.
  • Admin – API Keys – list, create and revoke API keys (administrators only).