---
docId: doc_1ca0e098e43e43ab94bb4f238ecf546f
title: List files
description: List the workspace's files, with their processing state and how many agents use them.
api:
  group: archivos
  auth: bearer
  operations:
    - operationId: listFiles
      method: GET
      path: '/v1/files'
      postmanName: List files
---

<script>
  import { Ways } from '$lib/components';
</script>

# List files

Find a file by type or state and use its `fileId` to read, edit or connect it to an agent. The list includes workspace files in pages. To see only an agent’s files, use [List agent files](/api-reference/agents/files/list).

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl "https://api.platic.ai/v1/files" \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.files.list();
```

</Ways.Way>
</Ways>

## Query parameters

| Parameter | Type | Description | Default |
|-----------|------|-------------|---------|
| `kind` | string | Only one type: `text`, `url` or `file` | (all) |
| `lifecycle` | string | `available` or `deleting` (being deleted) | (all) |
| `limit` | integer | From 1 to 200 | `50` |
| `pageToken` | string | `nextPageToken` of the previous page | - |

## Response

```json
{
  "status": "success",
  "data": [
    {
      "fileId": "fH3kL9mQ2xR7",
      "title": "Return policies",
      "description": "Deadlines, conditions and exceptions for returning a product.",
      "kind": "url",
      "lifecycle": "available",
      "activeVersionId": "vr_2Lp9Qs",
      "pipelineStatus": "ready",
      "latestUploadId": "up_4Tn8Vb2Kc1",
      "attachmentCount": 2,
      "createdAt": "2026-10-30T16:02:11.000Z",
      "updatedAt": "2026-11-01T10:12:45.000Z",
      "sourceUrl": "https://acme.com/policies/returns",
      "refresh": {
        "intervalHours": 24,
        "nextRunAt": "2026-11-02T10:12:45.000Z",
        "lastRunAt": "2026-11-01T10:12:45.000Z",
        "lastResult": "unchanged",
        "lastError": null
      },
      "tags": [],
      "fileName": null,
      "contentType": null,
      "byteSize": 3420
    }
  ],
  "nextPageToken": null
}
```

## Response fields

Each element of `data` is a file, with the fields of [Get a file](/api-reference/files/get#response-fields) (without `content`, `download` or `affectedAgents`). `nextPageToken` is `null` on the last page.

## Errors

| Status | `details.code` | When |
|--------|----------------|------|
| `400` | `INVALID_INPUT` | A parameter is not valid. `details.fields` names it. |
| `403` | `RESOURCE_NOT_ACCESSIBLE` | The person does not have Integrations. |
| `409` | `KNOWLEDGE_NOT_ENABLED` | Files are not enabled in this workspace. |

The ones that apply to all operations are in [common errors](/api-reference/files#common-errors).

## Notes

- It requires Integrations. Someone who only edits agents sees their files with [List agent files](/api-reference/agents/files/list).
- `attachmentCount` counts the connected agents, with the connection active or paused.
