Skip to main content

Endpoint

Authentication

This endpoint requires an OAuth access token. Send it as a bearer token:
Required scope: files:read
This endpoint hangs off /tasks but is gated on files:read, not tasks:read, because it returns file references. A token with only tasks:read gets a 403.

Path Parameters

Query Parameters

Request Example

Response

Success Response

Status Code: 200 OK

Response Fields

File Object Fields

Error Responses

400 Bad Request

Returned when the access token has no user behind it. client_credentials tokens act as the admin who created the application, so this applies only to tokens issued before application creators were recorded.

401 Unauthorized

Returned when the access token is missing, unknown, revoked, or expired, or when an X-API-Key was sent instead of a bearer token. See OAuth error responses.

403 Forbidden

Returned when the token lacks the required scope:
Or when the user may not access this task:

404 Not Found

Returned when the task does not exist.

429 Too Many Requests

Returned when your organization exceeds its per-minute request limit.

500 Internal Server Error

Returned when the request fails due to a server error.

Notes

This endpoint returns at most 10 files. If the task has more than 10 files, only the first 10 are returned. Use the total_files count to determine if there are more files.
Use the file_id from this response with the Download File endpoint to retrieve the actual file content.
File IDs are prefixed with document_ for documents and attachment_ for attachments. Ensure you pass the complete file ID including the prefix when downloading files.
Set include_attachments=true to also retrieve task-level and activity-log attachments (such as emailed documents) in the attachments array. These are not tied to a workflow variable or step, so their variable_id and step_id are null.

Use Cases

This endpoint is useful for:
  • File inventory - List all files involved in a workflow task
  • Document tracking - Track which documents were uploaded or generated at each step
  • Bulk download - Retrieve file IDs for downloading all task-related files
  • Audit trails - Document what files were part of a workflow execution