https://www.helprange.com/api/v2/filesUploads 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
One of: multipart "file", "file_url" or "content_base64". Content types: multipart/form-data, application/json, application/x-www-form-urlencoded.
| Field | Type | Description |
|---|---|---|
file | binary (multipart) | The file, as multipart/form-data (recommended). |
folder_id | integer | Target folder (default: your default folder). |
file_url | string (uri) | A public URL of the file. |
content_base64 | string | The file, base64-encoded. |
filename | string | File name (default: the uploaded / downloaded name, or document.pdf). |
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
import { openAsBlob } from 'node:fs'; // Node 20+; in a browser use a file input
const form = new FormData();
form.append('file', await openAsBlob('proposal.pdf'), 'proposal.pdf');
form.append('folder_id', '31');
const res = await fetch('https://www.helprange.com/api/v2/files', {
method: 'POST',
headers: {'X-API-Key': process.env.HELPRANGE_API_KEY},
body: form,
});
const data = await res.json();
if (!res.ok) throw new Error(`${res.status}: ${data.error || data.message || data.reason}`);
console.log(data);
import os
import requests
with open('proposal.pdf', 'rb') as f:
r = requests.post(
'https://www.helprange.com/api/v2/files',
headers={'X-API-Key': os.environ['HELPRANGE_API_KEY']},
files={'file': f},
data={
"folder_id": 31,
},
timeout=60,
)
r.raise_for_status()
print(r.json())
The samples read the key from the HELPRANGE_API_KEY environment variable.
| Status | Description |
|---|---|
201 | Created |
400 | Invalid input – the message says which parameter. |
401 | Missing or invalid API key / OAuth token. Team keys: code invalid_key, key_revoked, key_expired or key_owner_removed. |
402 | Your plan does not include the REST API (or this feature). |
403 | The team API key lacks the scope this endpoint needs. |
404 | Not found – or not yours (the API never says which). |
405 | Wrong HTTP method for this endpoint. |
413 | The file or the request body is over the upload limit (code FILE_TOO_LARGE / REQUEST_TOO_LARGE). |
423 | The target data room is frozen (code ROOM_FROZEN). |
429 | A usage limit was reached – wait Retry-After seconds. |
{
"id": 250,
"name": "proposal.pdf",
"folder_id": 31,
"type": "document",
"pages": 12,
"default_link": "https://www.helprange.com/view/471dcc98874d4d0cb7c3eb1874c4e3db/proposal.pdf"
}
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.