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.
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.
Go to your account's profile. There you will find your API Key.
You need to put value of your API Key in HTTP header Authorization
$ curl -X GET https://www.helprange.com/public-api/directory -H 'Authorization: t7ktuxyzb7emijofz9o8852i'
HelpRange API uses HTTP response codes to indicate API errors
403 Forbidden - You 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 Found - Resource related to your request was not found.
400 Bad Request - Your request is invalid probably because you are not passing valid parameters.
/public-api/directory
$ curl -X GET https://www.helprange.com/public-api/directory -H 'Authorization: t7ktuxyzb7emijofz9o8852i'
{
"directories": [
{
"id": 17,
"name": "sales_documents"
},
{
"id": 28,
"name": "marketing_documents"
}
]
}
/public-api/directory/<directory_id>/file
$ curl -X GET https://www.helprange.com/public-api/directory/243/file -H 'Authorization: t7ktuxyzb7emijofz9o8852i'
{
"files": [
{
"id": 250,
"name": "marketing_copy.pdf",
"file_links": [
{
"id": 264,
"uuid": "471dcc98874d4d0cb7c3eb1874c4e3db",
"link": "/view/471dcc98874d4d0cb7c3eb1874c4e3db",
"name": "default"
}
]
]}
/public-api/file/<file_id>/statistics
$ curl -X GET https://www.helprange.com/public-api/file/124/statistics -H 'Authorization: t7ktuxyzb7emijofz9o8852i'
{
"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}
]
}
Hint: using the same <file_name> and uploading different file results in overwriting old file in HelpRange
/public-api/directory/<directory_id>/upload/<file_name>
$ 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"
{
"id": 260,
"default_link": "/view/8956d1e7b91b47e196a8040b1d4894f8"
}
/public-api/directory
$ 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"}'
{
"id": 260,
"link": "/view-directory/8956d1e7b91b47e196a8040b1d4894f8"
}
$ 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}'
{
"id": 260,
"link": "/view-directory/8956d1e7b91b47e196a8040b1d4894f8"
}
/public-api/file/<file_id>/link
$ curl -X POST https://www.helprange.com/public-api/file/124/link
-H 'Authorization: t7ktuxyzb7emijofz9o8852i' -H 'Content-Type: application/json' --data-binary '{"label":"someLabel",
"isAllowDownloadingAndPrint":true,
"isOnlyOneUserViewing":false,
"isForwardable":true,
"isScreenshotMask":false,
"isWatermark":false,
"passcode":null,
"expirationDate":null,
"viewsLimit": null}'
{
"id": 260,
"link": "/view/8956d1e7b91b47e196a8040b1d4894f8"
}
$ curl -X POST https://www.helprange.com/public-api/file/124/link
-H 'Authorization: t7ktuxyzb7emijofz9o8852i' -H 'Content-Type: application/json' --data-binary '{"label":"someLabel",
"isAllowDownloadingAndPrint":true,
"isOnlyOneUserViewing":false,
"isForwardable":true,
"isScreenshotMask":false,
"isWatermark":false,
"passcode":"abcd",
"expirationDate":"2024-12-24",
"viewsLimit": 10}'
{
"id": 261,
"link": "/view/8956d1e7b91b47e1asd67a8040b1d4894f8"
}
/public-api/guest
$ curl -X POST https://www.helprange.com/public-api/guest -H 'Authorization: t7ktuxyzb7emijofz9o8852i' -H 'Content-Type: application/json' --data-binary '{"email":"john@company.com"}'
{
"id": 5,
}
/public-api/guest/<guest_id>/assign/<group_id>
$ curl -X POST https://www.helprange.com/public-api/guest/7/assign/10 -H 'Authorization: t7ktuxyzb7emijofz9o8852i'
{
"result": "success",
}