> Revox API docs for developers and AI agents. Index: https://www.getrevox.com/docs/api/llms.txt · Everything in one file: https://www.getrevox.com/docs/api/llms-full.txt · OpenAPI 3.1: https://www.getrevox.com/openapi.json · MCP server: https://www.getrevox.com/mcp
> Base URL https://www.getrevox.com/api · Auth: `Authorization: Bearer $REVOX_API_KEY`

# Add a text to the knowledge base

`POST https://www.getrevox.com/api/assistants/{id}/knowledge`

A text written or pasted, or the content of a .txt or .md file.

## Before you call

- Once a document is `ready`, the agent gets a `search_knowledge` tool on its calls. Say in the prompt when to use it, e.g. "the agency's listings are in your knowledge base: search them with search_knowledge".
- The text is indexed in a few seconds.

## Request

```bash
curl -X POST "https://www.getrevox.com/api/assistants/3f6c2a1e-8b4d-4c7a-9e2f-5d1b7a9c0e34/knowledge" \
  -H "Authorization: Bearer $REVOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Biens en vente",
    "content": "## Toulon\n\n- Appartement · 65 m² · 289 000 € (réf. 1234)\n  - Le Mourillon, 3 pièces avec terrasse"
  }'
```

## Path parameters

- `id` (string, required): ID of the assistant, as returned by [`GET /assistants`](https://www.getrevox.com/docs/api/assistants/get-assistants.md).

## Body

JSON.

- `title` (string, required): Name of the document, unique per assistant. Shown to the agent with each passage it finds. 1 to 200 characters. Example: `"Biens en vente"`.
- `content` (string, required): The text, plain or markdown. Headings and list items are kept together when it is split for search: one listing per list item finds best. 1 to 500000 characters. Example: `"## Toulon\n\n- Appartement · 65 m² · 289 000 € (réf. 1234)\n  - Le Mourillon, 3 pièces avec terrasse"`.

## Response 200

```json
{
  "document": {
    "id": "9b8a7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
    "assistant_id": "3f6c2a1e-8b4d-4c7a-9e2f-5d1b7a9c0e34",
    "title": "Biens en vente",
    "file": {
      "content_type": "application/pdf",
      "url": "https://example.com"
    },
    "content": "Hello, this is Julie from Acme.",
    "status": "ready",
    "error": null,
    "created_at": "2026-11-05T09:00:00Z",
    "updated_at": "2026-11-05T09:00:00Z"
  }
}
```

- `document` (object)
  - `document.id` (string)
  - `document.assistant_id` (string)
  - `document.title` (string): Name of the document, unique per assistant. Shown to the agent with each passage it finds. 1 to 200 characters. Example: `"Biens en vente"`.
  - `document.file` (object | null): The uploaded file. Null for a text document.
    - `document.file.content_type` (enum (5 values)): Values: `"application/pdf"`, `"image/jpeg"`, `"image/png"`, `"image/webp"`, `"image/heic"`.
    - `document.file.url` (string): Signed link to the original file, valid 5 minutes.
  - `document.content` (string): The searchable text: as written for a text document, the OCR of the file otherwise (empty until processed).
  - `document.status` ("processing" | "ready" | "failed"): `processing` while the text is read and indexed (a few seconds, up to a minute for a long PDF), `ready` once the agent can search it, `failed` with `error` otherwise.
  - `document.error` (string | null)
  - `document.created_at` (string): ISO 8601 timestamp.
  - `document.updated_at` (string): ISO 8601 timestamp.

## Errors

- `400` Invalid request: a field or parameter failed validation: `{"message":"Request validation failed","bodyErrors":{"issues":[{"path":["title"],"message":"Invalid input: expected string, received undefined","code":"invalid_type"}]}}`
- `404` Not found in your organization: `{"error":"Not found"}`
- Every status is explained under Errors in https://www.getrevox.com/docs/api.md#errors.