Make a public download link for a document.
Makes a link anyone can open without signing in, for the document's current file, until it expires (expires_in_seconds, 3600 by default as the Portal's). Needs Create Document Permalinks, Share Documents Externally, Download Document Files and Download Original Documents, and read access to the document. The link is shown with View Document Permalinks, otherwise the answer is the write receipt. Every open is counted: list_document_permalinks shows how often. Close a link early with delete_document_permalink. Share the url only with people who may have the file.
| |
|---|
| Scope | documents:download |
| Asynchronous | No |
| MCP tool | create_document_permalink |
| Portal permissions | create_document_permalinks, share_documents_externally, download_document_files, download_original_documents |
Parameters
| Name | In | Type | Required | Description |
|---|
document_id | path | string | Required | |
Docwize-Version | header | string (date) | Optional | |
Idempotency-Key | header | string | Optional | max 255 |
Request body
Responses
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
Permalink
| Field | Type | Required | Description |
|---|
access_count | integer | Required | How often the link was opened. ≥ -2147483648; ≤ 2147483647 |
created_at | string (date-time) or null | Required | |
document_id | string | Required | |
expires_at | string (date-time) or null | Required | |
file_name | string or null | Required | The name the file downloads under. |
is_active | boolean | Required | False once the link was closed. An expired link is still active but opens as 404. |
last_accessed_at | string (date-time) or null | Required | When it was last opened; null if never. |
permalink_id | string | Required | |
url | string | Required | The link to share: opening it needs no sign-in, until it expires or is closed. |
| Field | Type | Required | Description |
|---|
expires_in_seconds | integer or null | Optional | How long the link works from now, in seconds. The Portal offers 7, 30 or 730 days (604800, 2592000, 63072000). Default 3600. |