POST

Create a share link

https://www.helprange.com/api/v2/files/{file_id}/links

A new tracked share link for a document with its own settings. A setting your plan does not include is refused with the plan that has it. Counts towards the daily cap of 2,000 links created through the API.

Plans: Max, Unlimited, Deal Room Pass, trial. Auth: Authorization: Bearer hr_live_… (team key), X-API-Key, Authorization: Api-Key <key> or an OAuth Bearer token. Scope: links:write. Operation id: createLink

Parameters

NameInTypeDescription
file_id requiredpathintegerDocument id (from List documents). (min 1)

Request body

Content types: application/json, application/x-www-form-urlencoded.

FieldTypeDescription
labelstringWho the link is for, e.g. "ACME - Anna" (shown in statistics). Unique per document: a label the document already has is refused with 400. Default: a label with the date and time.
allow_downloadboolean or integer or stringAllow download & print. Default: blocked on Pro and up, allowed on Free. true / false (also 1 / 0 or "true" / "false").
passcodestringPassword the viewer must enter (Pro and higher). Surrounding spaces are dropped; only spaces = no passcode. At most 30 characters.
expires_onstring (date)Last day the link works, YYYY-MM-DD (Pro and higher). Today or later – a day in the past or an unreadable date is refused with 400.
views_limitinteger or nullMaximum number of views. 0, null or empty = no limit; a negative or non-whole number is refused with 400. (min 0)
watermarkboolean or integer or stringWatermark pages with the viewer's e-mail and date (Pro and higher). true / false (also 1 / 0 or "true" / "false").
require_emailboolean or integer or stringAsk for the viewer's e-mail before opening (Pro and higher). true / false (also 1 / 0 or "true" / "false").
disallow_forwardingboolean or integer or stringOnly the first person who opens it can use it. true / false (also 1 / 0 or "true" / "false").
one_viewer_at_a_timeboolean or integer or stringOnly one person can view at the same time. true / false (also 1 / 0 or "true" / "false").

Example request

curl -X POST https://www.helprange.com/api/v2/files/250/links \
  -H "X-API-Key: $HELPRANGE_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary '{"label": "ACME - Anna", "passcode": "oak-41", "expires_on": "2026-12-31", "watermark": true, "require_email": true}'

The samples read the key from the HELPRANGE_API_KEY environment variable.

Responses

StatusDescription
201Created
400Invalid input – the message says which parameter.
401Missing or invalid API key / OAuth token. Team keys: code invalid_key, key_revoked, key_expired or key_owner_removed.
402Your plan does not include the REST API (or this feature).
403The team API key lacks the scope this endpoint needs.
404Not found – or not yours (the API never says which).
405Wrong HTTP method for this endpoint.
429A usage limit was reached – wait Retry-After seconds.
Example response · 201
{
  "id": 264,
  "url": "https://www.helprange.com/view/8956d1e7b91b47e196a8040b1d4894f8/proposal.pdf",
  "label": "ACME - Anna",
  "allow_download": false,
  "passcode": true,
  "expires_on": "2026-12-31",
  "views_limit": null,
  "watermark": true,
  "require_email": true,
  "disallow_forwarding": false,
  "one_viewer_at_a_time": false,
  "document_id": 250,
  "document": "proposal.pdf"
}

Try it

Uses your real account. The request goes from your browser straight to www.helprange.com with your API key and acts as you – this POST changes data. The key stays in this page (in this tab's session storage only if you tick the box), is never put in a URL and is not sent to analytics. Do not paste a key on a shared computer.