Get all files
Get all files of the current organization and workspace.
This endpoint is paginated. Use the page and limit query parameters to control pagination.
Alternatively, pass the cursor query parameter (empty for the first page) to use cursor pagination: the response envelope becomes { data, pagination: { limit, nextCursor, hasMore } } and pages are stable under concurrent writes. Follow nextCursor until hasMore is false; keep the same sort and filter parameters for every page of a walk.
Use the optional updatedAfter query parameter to filter files that have been updated on or after the specified timestamp (ISO 8601 format).
Use the optional createdAfter query parameter to filter files that have been created on or after the specified timestamp (ISO 8601 format).
These filters are useful for batch processes that need to fetch only files modified or created since the last sync.
Use the optional directoryId query parameter to return only files that belong to the specified directory (or sub-directory). Files in nested descendants are not included; pass the sub-directory id directly to fetch its files.
Query Parameters
cursor parameter
(empty value for the first page) to use cursor pagination; omit it entirely to
keep the legacy page/limit response shape. See
Pagination for the full comparison.Filtering by directory
directoryId returns only files directly linked to that directory. Files in
nested descendants are not included — pass the sub-directory id directly to fetch
its files.
https://api.orion.file.ai/prod/v1. If
your workspace is on an instance-specific host, swap the hostname and change
nothing else — see Switching between
instances.Incremental sync
updatedAfter and createdAfter let batch processes fetch only what changed
since the last run. See
Incremental Data Loading for the full
Change Data Capture pattern.
Pagination
- Cursor (recommended)
- Legacy page/limit
cursor to get a stable walk that is unaffected by concurrent writes.
The response becomes { data, pagination }.nextCursor until hasMore is false, keeping the same sort and
filter parameters for every page of the walk.Errors
A422 is returned when updatedAfter or createdAfter is not a valid ISO 8601
timestamp. See Error responses.Authorizations
API key for authentication
Query Parameters
File Ids
"649e2d2d2d2d2d2d2d2d2d2d"
Filter files updated on or after this timestamp (ISO 8601 format)
"2025-01-01T00:00:00.000Z"
Filter files created on or after this timestamp (ISO 8601 format)
"2025-01-01T00:00:00.000Z"
Filter files that belong to the given directory (or sub-directory) id. Only files directly linked to this directory are returned; descendants are not included.
"649e2d2d2d2d2d2d2d2d2d2d"
Page number
1
Number of items per page
100
Field to sort by
"createdAt"
Sort direction
ASC, DESC "ASC"
Opaque pagination cursor. Provide the parameter (empty value for the first page) to switch to cursor pagination: the response becomes { data, pagination: { limit, nextCursor, hasMore } } with default limit 50 (max 100). Omit it entirely for legacy page/limit pagination. In cursor mode sortBy must be one of createdAt, updatedAt, _id, and cursors are bound to the sortBy/sortOrder they were minted with.