Skip to main content

Make a public download link for a document.

POST/api/v1/documents/{document_id}/permalinksdocuments:download

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.

Scopedocuments:download
AsynchronousNo
MCP toolcreate_document_permalink
Portal permissionscreate_document_permalinks, share_documents_externally, download_document_files, download_original_documents

Parameters​

NameInTypeRequiredDescription
document_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
Idempotency-KeyheaderstringOptionalmax 255

Request body​

Content typeType
application/jsonPermalinkCreateInput

Responses​

StatusDescriptionBody
201Success.application/json Permalink or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409conflict, idempotency_in_progressapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

FieldTypeRequiredDescription
access_countintegerRequiredHow often the link was opened. ≥ -2147483648; ≤ 2147483647
created_atstring (date-time) or nullRequired
document_idstringRequired
expires_atstring (date-time) or nullRequired
file_namestring or nullRequiredThe name the file downloads under.
is_activebooleanRequiredFalse once the link was closed. An expired link is still active but opens as 404.
last_accessed_atstring (date-time) or nullRequiredWhen it was last opened; null if never.
permalink_idstringRequired
urlstringRequiredThe link to share: opening it needs no sign-in, until it expires or is closed.

PermalinkCreateInput​

FieldTypeRequiredDescription
expires_in_secondsinteger or nullOptionalHow long the link works from now, in seconds. The Portal offers 7, 30 or 730 days (604800, 2592000, 63072000). Default 3600.