Skip to main content
GET
/
api
/
documents
/
{id}
/
download
Download a document
curl --request GET \
  --url https://clarus-api.com/api/documents/{id}/download \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Clarus-Subdomain: <api-key>'
{
  "url": "<string>"
}

Response Format

This endpoint returns plain JSON (not JSON:API format):
{
  "url": "https://s3.amazonaws.com/bucket/path/to/file?signature=..."
}

Access Control

You can download a document if:
  • You are the owner of the document, OR
  • You have the DocumentsDownload permission

Typical Workflow

  1. Generate a report via POST /reports/{id}/generate (returns a Document)
  2. Poll the document status via GraphQL until status is available
  3. Call this endpoint to get the presigned download URL
  4. Use the presigned URL to download the file

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.

X-Clarus-Subdomain
string
header
required

The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.

Path Parameters

id
integer
required

The unique identifier of the document to download

Response

Presigned download URL returned successfully

url
string<uri>

Presigned S3 URL for downloading the file