---
title: "List all files"
method: GET
path: "/v2/files"
tags: ["Files"]
---

# List all files

`GET /v2/files`

Returns a list of the files that your account has access to. orq.ai sorts and returns the files by their creation dates, placing the most recently created files at the top.

## Query parameters

- `limit` integer
- `starting_after` string
- `ending_before` string
- `project_id` string
- `purpose` string

## Response `200`

OK

- ListFilesResponse
  - `object` string, required — Object discriminator for list responses; always `list`.
  - `data` File[], required — Page of files.
    - `file_id` string, required — Unique file identifier assigned by ORQ.
    - `purpose` 'FILE_PURPOSE_UNSPECIFIED' | 'FILE_PURPOSE_RETRIEVAL' | 'FILE_PURPOSE_KNOWLEDGE_DATASOURCE' | 'FILE_PURPOSE_BATCH' | 'FILE_PURPOSE_CODE_INTERPRETER', required
    - `file_name` string, required — Display file name, including extension when available.
    - `bytes` string, required — Size of the uploaded file in bytes.
    - `created_at` string, date-time, required — Time when the file was created.
    - `project_id` string, required — Identifier of the project the file belongs to. Files are project-scoped; an API key may only access files in projects it is authorized for.
  - `has_more` boolean, required — Whether more files are available in the selected pagination direction.

---

[API](https://skmtc.net/orq-ai/apis/orq-ai-api.md) · [All operations](https://skmtc.net/orq-ai/apis/orq-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/orq-ai/orq-ai-api/versions/6a22c53a2580/schema)
