Get Download URL
GET/apiv3/pub/documents/{docID}/download-urldocuments_read
Generates a time-limited presigned S3 URL for downloading a document file. The URL can be used without any authentication headers.
Request
Path parameters
| Parameter | Type | Description |
|---|---|---|
docID | integer | Document ID. |
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
linked_file_id | integer | — | Specific file version. Omit for latest. |
pdf | boolean | false | true to get the PDF conversion URL. |
expiry | integer | 3600 | URL lifetime in seconds. |
Response
200 OK| Field | Type | Description |
|---|---|---|
url | string | Presigned S3 URL. Valid for the requested expiry duration. No auth headers needed to use it. |
Errors
| Status | Reason |
|---|---|
| 400 | Invalid docID |
| 401 | Invalid or expired token |
| 404 | Document not found or no file attached |
| 500 | S3 presigning failed |
cURL
curl -i -X GET "https://portal.docwize.com/apiv3/pub/documents/1542/download-url" \
-H "Authorization: Bearer <ACCESS_TOKEN>"
{
"url": "https://s3.amazonaws.com/bucket/company/1542_a7f2c.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600&X-Amz-Signature=..."
}