> ## 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.

# Retry failed files

> Process failed files again from the bytes Verbeo already holds: one file, or up to 25 of a knowledge base.

Processes failed files again, from the bytes Verbeo already holds: for a temporary failure such as `EMBEDDING_FAILED`, or after you have made room under a plan limit. A file that has not failed is answered as it is. Retrying counts its passages toward the month again.

A file whose error is in the file itself (`ENCRYPTED`, `NO_TEXT`, `CORRUPT`…) fails the same way again: fix it and [upload it](https://docs.verbeo.ai/api-reference/knowledge-bases/upload-files.md) instead.

## Several files

**id** `string` *required*

UUID of the knowledge base.

**file\_ids** `string[]` *required*

1 to 25 of its files, each once.

Each file is retried on its own: a refused one is listed in `refused` with its reason, and the others still run.

```bash theme={null}
curl -X POST "https://api.verbeo.ai/v1/knowledge-base/5df09066-0842-4c92-8ef0-6cf2ff6d7455/files/retry" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "file_ids": ["c4ff0c9c-4b3b-4a94-a86e-3d3b64088ae0", "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d"] }'
```

`200 OK`: the files that run again, as they now are, and each one refused.

```json theme={null}
{
  "success": true,
  "data": {
    "files": [
      { "id": "c4ff0c9c-4b3b-4a94-a86e-3d3b64088ae0", "status": "processing", "…": "every field of the file object" }
    ],
    "refused": [
      {
        "id": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",
        "message": "This knowledge base already has 100 files, the most your plan allows. Delete a file first.",
        "code": "KB_FILE_LIMIT"
      }
    ]
  }
}
```

## One file

`POST /knowledge-base/files/{fileId}/retry`, with no body, retries one file and answers its [file object](https://docs.verbeo.ai/api-reference/knowledge-bases/overview.md#the-file-object) with `200 OK`. A refusal is the error itself.

```bash theme={null}
curl -X POST "https://api.verbeo.ai/v1/knowledge-base/files/c4ff0c9c-4b3b-4a94-a86e-3d3b64088ae0/retry" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Errors

| Code | Status | When |
| - | - | - |
| `VALIDATION_FAILED` | 422 | `file_ids: must name at least one file`, `file_ids: must name at most 25 files`, `file_ids: must name each file once`. |
| `NOT_FOUND` | 404 | No such knowledge base, or an id that is not one of its files: nothing is retried. |
| `KB_FILE_LIMIT`, `KB_DUPLICATE_FILE`, `KB_UPLOAD_AGAIN` | 409 | One file: why it cannot run again. |
| `CONFLICT` | 409 | `This file is no longer stored. Upload it again.` |


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