POST

Upload a file

https://www.helprange.com/api/v2/files

Uploads a file into a folder (folder_id, or your default folder). Send the file as multipart "file" (recommended), as a public "file_url" HelpRange downloads (within 30 seconds), or as "content_base64" with "filename" in a JSON body. Limit: the team's upload limit, 100 MB per file (larger files only in the panel). Over it: 413 with code FILE_TOO_LARGE or REQUEST_TOO_LARGE; the team's daily upload limit: 429 with code UPLOAD_LIMIT.

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: documents:write. Operation id: uploadFile

Request body

One of: multipart "file", "file_url" or "content_base64". Content types: multipart/form-data, application/json, application/x-www-form-urlencoded.

FieldTypeDescription
filebinary (multipart)The file, as multipart/form-data (recommended).
folder_idintegerTarget folder (default: your default folder).
file_urlstring (uri)A public URL of the file.
content_base64stringThe file, base64-encoded.
filenamestringFile name (default: the uploaded / downloaded name, or document.pdf).

Example request

curl -X POST https://www.helprange.com/api/v2/files \
  -H "X-API-Key: $HELPRANGE_API_KEY" \
  -F 'file=@proposal.pdf' \
  -F folder_id=31

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.
413The file or the request body is over the upload limit (code FILE_TOO_LARGE / REQUEST_TOO_LARGE).
423The target data room is frozen (code ROOM_FROZEN).
429A usage limit was reached – wait Retry-After seconds.
Example response · 201
{
  "id": 250,
  "name": "proposal.pdf",
  "folder_id": 31,
  "type": "document",
  "pages": 12,
  "default_link": "https://www.helprange.com/view/471dcc98874d4d0cb7c3eb1874c4e3db/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.