Skip to main content
GET /api/v1/cloud/files/{file_id} Retrieves a single File object. Files in deleted status are not returned by this endpoint.

Path parameters

ParameterTypeRequiredDescription
file_idstringYesFile ID with the file_ prefix

Headers

HeaderRequiredDescription
AuthorizationYesBearer $QODER_PAT

Example request

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

Example response

HTTP 200 OK
{
  "id": "file_019e3bb8c1387743bf4ef115aae5acb1",
  "type": "file",
  "filename": "qoder-test-upload.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:44Z"
}

Response fields

FieldTypeDescription
idstringFile ID with the file_ prefix
typestringAlways "file"
filenamestringStored file name
size_bytesintegerFile size in bytes
mime_typestringMIME type supplied by the upload or detected from the file name
downloadablebooleanWhether this file can be downloaded through the /content endpoint
scopeobject | nullScope object when the file is associated with another resource, for example { "id": "sess_...", "type": "session" }
metadataobjectCustom metadata object supplied on upload; defaults to {}
created_atstringUTC creation time in RFC 3339 format

Errors

HTTPTypeTrigger
401authentication_errorMissing or invalid authentication token
404not_found_errorFile with the given ID does not exist or is in deleted status
See Errors for the full error envelope.

Attach and download files

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