# List documents

> GET https://api.nabrah.ai/api/ext/document

Group: Documents. Page: https://www.nabrah.ai/en/docs/api-reference/documents/list-documents

Lists documents across all knowledge bases in your project (deleted documents are excluded). Each item includes `id`, `knowledge_base_id`, `type`, `status`, `title`, `filename`, and timestamps. Poll a document's `status` to track ingestion progress.

## Document status

`QUEUED → EXTRACTING → CHUNKING → EMBEDDING → INDEXING → DONE` (or `FAILED`). Only `DONE` documents are used for retrieval.

## Authorization

- `X-API-Key` (string, header, required): your workspace API key.

## Response

### 200 Successful Response

Content type: `application/json`

```json
[
  {
    "id": "00000000-0000-4000-8000-000000000000",
    "knowledge_base_id": "00000000-0000-4000-8000-000000000000",
    "type": "file",
    "status": "unknown",
    "title": "string",
    "summary": "string",
    "filename": "string",
    "created_at": "2026-01-15T12:00:00.000Z",
    "updated_at": "2026-01-15T12:00:00.000Z"
  }
]
```

## Request examples

### cURL

```bash
curl --request GET \
  --url 'https://api.nabrah.ai/api/ext/document' \
  --header 'X-API-Key: <your-api-key>'
```

### Python

```python
import requests

url = "https://api.nabrah.ai/api/ext/document"
headers = {"X-API-Key": "<your-api-key>"}

response = requests.get(url, headers=headers)
response.raise_for_status()
print(response.json())
```

### JavaScript

```javascript
const response = await fetch("https://api.nabrah.ai/api/ext/document", {
  method: "GET",
  headers: { "X-API-Key": "<your-api-key>" },
});

const data = await response.json();
console.log(data);
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.nabrah.ai/api/ext/document", nil)
	req.Header.Set("X-API-Key", "<your-api-key>")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	out, _ := io.ReadAll(res.Body)
	fmt.Println(string(out))
}
```
