Skip to main content
GET /api/v1/cloud/files Retrieves files under the current account.

Headers

HeaderRequiredDescription
AuthorizationYesBearer $QODER_PAT

Query parameters

ParameterTypeRequiredDescription
limitintegerNoMaximum number of files per page. Default 20, range 1-100. Values above 100 return 400 invalid_request_error.
pagestringNoClaude-style forward cursor. Equivalent to after_id; mutually exclusive with before_id and after_id
after_idstringNoCursor pagination: return files after this ID. Mutually exclusive with page and before_id
before_idstringNoCursor pagination: return files before this ID. Mutually exclusive with page and after_id
namestringNoCase-insensitive prefix search on file name
scope_idstringNoFilter files associated with a resource scope, currently a Session ID

Example request

# Basic list
curl -X GET "https://api.qoder.com/api/v1/cloud/files" \
  -H "Authorization: Bearer $QODER_PAT"

# Filter by Session scope with a page size
curl -X GET "https://api.qoder.com/api/v1/cloud/files?scope_id=sess_019e3bb8e6c47d18&limit=10" \
  -H "Authorization: Bearer $QODER_PAT"

# Cursor pagination
curl -X GET "https://api.qoder.com/api/v1/cloud/files?limit=10&page=file_019e3bb8e6c47d18" \
  -H "Authorization: Bearer $QODER_PAT"

Example response

HTTP 200 OK
{
  "data": [
    {
      "id": "file_019e3bb8e6c47d189212a79642136696",
      "type": "file",
      "filename": "report.txt",
      "mime_type": "text/plain",
      "size_bytes": 110,
      "downloadable": true,
      "scope": {
        "id": "sess_019e3bb8e6c47d18",
        "type": "session"
      },
      "metadata": {
        "project": "demo"
      },
      "created_at": "2026-05-18T15:33:53Z"
    }
  ],
  "next_page": null,
  "first_id": "file_019e3bb8e6c47d189212a79642136696",
  "has_more": false,
  "last_id": "file_019e3bb8e6c47d189212a79642136696"
}

Response fields

FieldTypeDescription
dataarrayArray of File objects
next_pagestring | nullForward cursor for the next page; use as page when has_more is true
first_idstring | nullID of the first file on the current page; null when data is empty
last_idstring | nullID of the last file on the current page; null when data is empty
has_morebooleanWhether more files are available

Pagination

Results are sorted by created_at and id. To page through files:
  1. Make the first request with limit to fetch the first page.
  2. If has_more is true, use page=<next_page> to fetch the next page.
  3. Use before_id=<first_id> to page backward.

Errors

HTTPTypeTrigger
400invalid_request_errorInvalid limit, or more than one of page, before_id, and after_id is provided
401authentication_errorMissing or invalid authentication token
See Errors for the full error envelope.

Attach and download files

Upload files to give your agent context, and download files it produces.