Documents

Get a document image/preview URL

GET/documents/{documentId}/image-url
documents:readget_document_image_urlRead-onlyDeprecatedSunset 2027-06-30

Returns a short-lived presigned URL for the document, in a data envelope, and records a view access. The same rules as GET /documents/{documentId}/download apply, including the download settings and the watermarked or masked temporary copy (24 h, 20 MB limit), so a document that can't be downloaded can't be previewed here either. Deprecated: use GET /documents/{documentId}/download instead. Withdrawn on 2027-06-30. Responses carry Deprecation, Sunset and a successor Link.

Path parameters

  • documentIdstring (uuid)Required#

    The document's public uuid.

Query parameters

  • timezonestring#

    IANA timezone name for the date printed on a watermark, such as Europe/London. An unknown name falls back to UTC. At most 64 characters.

Responses

200

OK

{
  "data": {
    "url": "https://files.example-cdn.com/documents/5e6f7081-92a3-4b4c-9d6e-7f8091a2b3c4?signature=abc123&expires=1781000000",
    "expires_at": "2026-11-06T13:00:00Z"
  }
}
401

Authentication failed. error.code is one of invalid_token, expired, revoked.

Error
403

Authorization failed. error.code is one of org_disabled, ip_blocked, missing_scope, scope_disabled, user_disabled.

Error
404

Resource not found (error.code = not_found).

Error
409

The request conflicts with existing state (error.code = conflict), e.g. a compliance flow with the requested name already exists.

Error
422

Request validation failed (HTTP 422). The body is either the Laravel validation envelope (message + field-keyed errors) or the API error envelope for domain rejections (e.g. form_type_not_supported, folder_locked, parent_not_found, folder_not_empty).

429

Rate limit exceeded (error.code = rate_limited).

Error

Examples

curl https://your-org-domain/kong/core/api/v2/documents/{documentId}/image-url\
  -H "Authorization: Bearer $HELM_API_KEY"\
  -H "Content-Type: application/json"