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 a document. A token with only tasks:read gets a 403.

Path Parameters

Request Example

Response

Success Response

Status Code: 200 OK The response is JSON metadata containing a presigned URL - not the file bytes.

Response 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 step has no variables, or none of them produced a document.

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 is specifically for documents generated by workflow steps (like document generation or AI review steps). For a file you already have an ID for, use the Download File endpoint instead.
The presigned download URL expires after a certain time (indicated by expires_at). Download the file before the URL expires or request a new URL.
Use the List Task Files endpoint to discover which steps have generated documents and their associated step_id values.

Use Cases

This endpoint is useful for:
  • Document retrieval - Download AI-generated or modified documents from workflows
  • Contract export - Export reviewed, redlined, or approved contracts
  • Archival - Save generated documents to external storage systems
  • Distribution - Share workflow outputs with external stakeholders