> ## Documentation Index
> Fetch the complete documentation index at: https://docs.verbeo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit a text or FAQ list

> Save new words for a text or an FAQ list in the place of a ready file, as Replace does.

Saves a text, or a list of questions and answers, as the new version of a ready file: the dashboard's **Edit**. It works like [Replace](https://docs.verbeo.ai/api-reference/knowledge-bases/replace-file.md): assistants keep the old version until the new one is ready, then switch at once. The body is the one [Add text or FAQs](https://docs.verbeo.ai/api-reference/knowledge-bases/add-text.md) takes, and the new file is `<title>.md`.

To change a text, read its current words first: [download](https://docs.verbeo.ai/api-reference/knowledge-bases/download.md) the file, or read its [passages](https://docs.verbeo.ai/api-reference/knowledge-bases/passages.md).

## Path parameters

**fileId** `string` *required*

UUID of the ready file the new words take the place of.

## Body

**title** `string` *required*

The name, 1 to 252 characters: the new file is `<title>.md`.

**text** `string`

The new text. Send `text` or `faqs`, not both.

**faqs** `object[]`

The new list: `[{ "question": "…", "answer": "…" }]`.

## Request

```bash theme={null}
curl -X PUT "https://api.verbeo.ai/v1/knowledge-base/files/7d0e1f2a-3b4c-4d5e-8f6a-7b8c9d0e1f2a/text" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "title": "Holiday hours", "text": "We are closed from 24 to 26 December." }'
```

## Response

`201 Created` with the new [file object](https://docs.verbeo.ai/api-reference/knowledge-bases/overview.md#the-file-object), `processing`, its `replaces_id` the old file's id.

## Errors

| Code | Status | When |
| - | - | - |
| `KB_FILE_NOT_READY` | 409 | `Holiday hours.md: Only a ready file can be replaced.` |
| `KB_FILE_BEING_REPLACED` | 409 | The file already has a replacement on its way. |
| `KB_DUPLICATE_FILE` | 409 | The same words are already a file of this knowledge base. |
| `VALIDATION_FAILED` | 422 | One of [the text's rules](https://docs.verbeo.ai/api-reference/knowledge-bases/add-text.md#errors). |
| `NOT_FOUND` | 404 | No such file: `File not found`. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.