GET /api/v1/documents/{id}/file · Operation ID: downloadFiledocuments:read. Resource access and effective policy still apply.curl --fail-with-body -X GET 'https://handwrites.io/api/v1/documents/REPLACE_DOCUMENT_ID/file?redirect=false' \
-H "Authorization: Bearer $HANDWRITE_API_KEY"| Name | Location | Required | Meaning |
|---|---|---|---|
id | path | Yes | A document ID (doc_…). |
redirect | query | No | false returns the link as JSON instead of a 302. |
| Status | Meaning | Body format |
|---|---|---|
| 200 | With ?redirect=false. | application/json |
| 302 | Redirect to a 5-minute download link. | No body specified |
| 401 | unauthorized: no token, or it's invalid, revoked or expired. | application/json |
| 403 | insufficient_scope, forbidden (you can see it but not do this), app_test_restricted, account_deleted (the account is scheduled for deletion; any request). | application/json |
| 404 | not_found: it doesn't exist or you can't see it (never 403 for documents you can't see). | application/json |
| 429 | rate_limited (burst or daily cap) or quota_exceeded (no characters left). | application/json |
| 500 | internal_error. | application/json |