GET /v1/files
Retrieves the list of files under the current account, with support for pagination and filtering by purpose.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer $QODER_PAT |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
purpose | string | No | Filter by file purpose. One of: user_upload, tool_output, skill_output, session_resource, agent_output |
limit | integer | No | Maximum number of files per page |
after | string | No | Cursor pagination: return files after this file_id (forward paging) |
before | string | No | Cursor pagination: return files before this file_id (backward paging) |
Example request
Example response
HTTP 200 OKResponse fields
| Field | Type | Description |
|---|---|---|
data | array | Array of file objects |
first_id | string | null | ID of the first file on the current page (null when empty) |
last_id | string | null | ID of the last file on the current page (null when empty) |
has_more | boolean | Whether more pages are available |
data has the same fields as the Upload a file response.
Empty list response
Pagination
Results are sorted by creation time in descending order (newest first). To page through all files:- Make the first request with
limitto fetch the first page. - If
has_moreistrue, useafter=<last_id>to fetch the next page. - Use
before=<first_id>to page backward.
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 401 | – | Missing or invalid authentication token |