Skip to main content

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.

Headers

HeaderRequiredDescription
AuthorizationYesBearer $QODER_PAT

Query parameters

ParameterTypeRequiredDescription
purposestringNoFilter by file purpose. One of: user_upload, tool_output, skill_output, session_resource, agent_output
limitintegerNoMaximum number of files per page
afterstringNoCursor pagination: return files after this file_id (forward paging)
beforestringNoCursor 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

FieldTypeDescription
dataarrayArray of file objects
first_idstring | nullID of the first file on the current page (null when empty)
last_idstring | nullID of the last file on the current page (null when empty)
has_morebooleanWhether 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
}

Pagination

Results are sorted by creation time in descending order (newest first). To page through all files:
  1. Make the first request with limit to fetch the first page.
  2. If has_more is true, use after=<last_id> to fetch the next page.
  3. Use before=<first_id> to page backward.

Errors

HTTPTypeTrigger
401Missing or invalid authentication token
See Errors for the full error envelope.