Documentation Index
Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
Use this file to discover all available pages before exploring further.
GET /v1/files
Retrieves the list of files under the current account, with support for pagination and filtering by purpose.
| 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
# Basic list
curl -X GET "https://openapi.qoder.sh/api/v1/cloud/files" \
-H "Authorization: Bearer $QODER_PAT"
# Filter by purpose with a page size
curl -X GET "https://openapi.qoder.sh/api/v1/cloud/files?purpose=session_resource&limit=10" \
-H "Authorization: Bearer $QODER_PAT"
# Cursor pagination
curl -X GET "https://openapi.qoder.sh/api/v1/cloud/files?limit=10&after=file_019e3bb8e6c47d18" \
-H "Authorization: Bearer $QODER_PAT"
Example response
HTTP 200 OK
{
"data": [
{
"created_at": "2026-05-18T15:33:53Z",
"file_id": "file_019e3bb8e6c47d189212a79642136696",
"filename": "report.txt",
"metadata": {
"project": "test"
},
"mime_type": "text/plain",
"purpose": "session_resource",
"size_bytes": 110,
"status": "ready",
"updated_at": "2026-05-18T15:33:54Z"
}
],
"first_id": "file_019e3bb8e6c47d189212a79642136696",
"has_more": false,
"last_id": "file_019e3bb8e6c47d189212a79642136696"
}
Response 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 |
Each file object in data has the same fields as the Upload a file response.
Empty list response
{
"data": [],
"first_id": null,
"has_more": false,
"last_id": null
}
Results are sorted by creation time in descending order (newest first). To page through all files:
- Make the first request with
limit to fetch the first page.
- If
has_more is true, use after=<last_id> to fetch the next page.
- Use
before=<first_id> to page backward.
Errors
| HTTP | Type | Trigger |
|---|
| 401 | – | Missing or invalid authentication token |
See Errors for the full error envelope.