Skip to content

๐Ÿ“ File

Download and access files associated with records and documents.

List files with filters and cursor pagination

Request

Retrieve a paginated list of files scoped to the tenant

Returns files across whitelisted sources: CLIENT_REQUEST, DELIVERABLE, REFERENCE_FILE, DMS_DIRECT_UPLOAD.

Optional Filters:

  • createdAfter (ISO-8601) โ€” only files created strictly after this timestamp
  • createdBefore (ISO-8601) โ€” only files created strictly before this timestamp
  • clientId โ€” filter by numeric client ID
  • projectId โ€” filter by project/job ID
  • ids โ€” filter by one or more specific file IDs (multi-value: ?ids=1&ids=2)

Pagination:

  • Results ordered by created_at ASC, id ASC
  • Pass next_cursor from a previous response as cursor to fetch the next page
  • pageSize defaults to 20, max 100

Response per item:

  • File metadata (id, name, created_at, size_bytes, path as slash-joined folder names)
  • download_url โ€” time-limited direct-link URL; only populated when includeDownloadUrl=true and the file has a DMS path or external ID. Omit this flag for metadata-only queries (pagination, search) to avoid unnecessary URL minting on every page.
  • context โ€” client, project, and uploader fields

Note: Invalid date formats return 400.

Business Applications:

  • Retrieve all files associated with a client or project
  • Paginate through large file sets using cursor pagination
  • Filter files by upload date range
  • Fetch specific files by ID
Security
BearerAuth
curl -i -X GET \
  https://api.doc.aiwyn.ai/_mock/bundle/api/v1/files \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Files retrieved successfully