Developers

Public HelpRange API Documentation

Upload files, create secure links and data room access, and pull analytics into your own systems with a simple REST API.

Introduction

HelpRange provides API for uploading files and obtaining analytics data. The HelpRange API is organized around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors.

Base URL
https://www.helprange.com/public-api

Authentication

Authenticate your account by including your API Key in every API request. Your API key carries many privileges, so be sure to keep it secure! Do not share your API key in publicly accessible areas such GitHub, client-side code, and so forth.

Where is my API Key?

Go to your account's profile. There you will find your API Key.

How to include it in request?

You need to put value of your API Key in HTTP header Authorization.

Example
$ curl -X GET https://www.helprange.com/public-api/directory \
  -H 'Authorization: t7ktuxyzb7emijofz9o8852i'

Error codes

HelpRange API uses HTTP response codes to indicate API errors.

CodeMeaning
403 ForbiddenYou do not have permission to use this endpoint. Probably you are using invalid API Key or trying to use directory or file of someone else.
404 Not FoundResource related to your request was not found.
400 Bad RequestYour request is invalid probably because you are not passing valid parameters.

Endpoints

GET

List of directories assigned to you

/public-api/directory
Request
$ curl -X GET https://www.helprange.com/public-api/directory \
  -H 'Authorization: t7ktuxyzb7emijofz9o8852i'
Response
{
  "directories": [
    {"id": 17, "name": "sales_documents"},
    {"id": 28, "name": "marketing_documents"}
  ]
}
GET

List of files in directory

/public-api/directory/<directory_id>/file
Request
$ curl -X GET https://www.helprange.com/public-api/directory/243/file \
  -H 'Authorization: t7ktuxyzb7emijofz9o8852i'
Response
{
  "files": [
    {
      "id": 250,
      "name": "marketing_copy.pdf",
      "file_links": [
        {
          "id": 264,
          "uuid": "471dcc98874d4d0cb7c3eb1874c4e3db",
          "link": "/view/471dcc98874d4d0cb7c3eb1874c4e3db",
          "name": "default"
        }
      ]
    }
  ]
}
GET

Statistics of file

/public-api/file/<file_id>/statistics
Request
$ curl -X GET https://www.helprange.com/public-api/file/124/statistics \
  -H 'Authorization: t7ktuxyzb7emijofz9o8852i'
Response
{
  "engagement_score": 11.57,
  "total_views": 39,
  "avg_time_seconds": 24,
  "avg_time_per_page_seconds": [10, 6, 4, 9, 15, 2, 78, 73, 0, 4, 0, 0, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  "recordings": [
    {
      "time": "2022-10-24 10:34:56",
      "ip": "134.34.12.56",
      "country": "US",
      "referrer_url": "https://www.facebook.com",
      "read_time_sec": 100
    }
  ]
}
POST

Upload file to directory

/public-api/directory/<directory_id>/upload/<file_name>
Hint: using the same <file_name> and uploading different file results in overwriting old file in HelpRange.
Request
$ curl -X POST https://www.helprange.com/public-api/directory/38/upload/filenewname.pdf \
  -H 'Authorization: t7ktuxyzb7emijofz9o8852i' \
  -H 'content-type: multipart/form-data' \
  -F "file=@/upload/my_sales_document.pdf;type=application/pdf"
Response · id of uploaded file and default link to document
{
  "id": 260,
  "default_link": "/view/8956d1e7b91b47e196a8040b1d4894f8"
}
POST

Create directory

/public-api/directory
Request · with name and set of allowed IP addresses
$ curl -X POST https://www.helprange.com/public-api/directory \
  -H 'Authorization: t7ktuxyzb7emijofz9o8852i' \
  -H 'Content-Type: application/json' \
  --data-binary '{"name": "my directory", "onlyIpAddresses": "34.124.145.56,101.127.144.90"}'
Response
{
  "id": 260,
  "link": "/view-directory/8956d1e7b91b47e196a8040b1d4894f8"
}
Request · with name and no set of allowed IP addresses
$ curl -X POST https://www.helprange.com/public-api/directory \
  -H 'Authorization: t7ktuxyzb7emijofz9o8852i' \
  -H 'Content-Type: application/json' \
  --data-binary '{"name": "another directory", "onlyIpAddresses": null}'
Response
{
  "id": 260,
  "link": "/view-directory/8956d1e7b91b47e196a8040b1d4894f8"
}
POST

Add guest

/public-api/guest
Request · with email
$ curl -X POST https://www.helprange.com/public-api/guest \
  -H 'Authorization: t7ktuxyzb7emijofz9o8852i' \
  -H 'Content-Type: application/json' \
  --data-binary '{"email": "john@company.com"}'
Response
{
  "id": 5
}
POST

Assign guest to data room

/public-api/guest/<guest_id>/assign/<data_room_id>
Request · assigning guest with id 7 to data room of id 10
$ curl -X POST https://www.helprange.com/public-api/guest/7/assign/10 \
  -H 'Authorization: t7ktuxyzb7emijofz9o8852i'
Response
{
  "result": "success"
}