curl --request POST \
--url https://api.hellotracks.com/v1/alerts/configs \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Late at warehouse",
"description": "Did not check in at the warehouse",
"action": "no_check_in",
"memberIds": [
"a1b2c3"
],
"placeIds": [
"d4e5f6"
],
"emails": [
"dispatch@example.com"
],
"weekdays": [
"mon",
"tue",
"wed",
"thu",
"fri"
],
"timeStart": "08:00",
"timeEnd": "09:00"
}
'import requests
url = "https://api.hellotracks.com/v1/alerts/configs"
payload = {
"title": "Late at warehouse",
"description": "Did not check in at the warehouse",
"action": "no_check_in",
"memberIds": ["a1b2c3"],
"placeIds": ["d4e5f6"],
"emails": ["dispatch@example.com"],
"weekdays": ["mon", "tue", "wed", "thu", "fri"],
"timeStart": "08:00",
"timeEnd": "09:00"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Late at warehouse',
description: 'Did not check in at the warehouse',
action: 'no_check_in',
memberIds: ['a1b2c3'],
placeIds: ['d4e5f6'],
emails: ['dispatch@example.com'],
weekdays: ['mon', 'tue', 'wed', 'thu', 'fri'],
timeStart: '08:00',
timeEnd: '09:00'
})
};
fetch('https://api.hellotracks.com/v1/alerts/configs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hellotracks.com/v1/alerts/configs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Late at warehouse',
'description' => 'Did not check in at the warehouse',
'action' => 'no_check_in',
'memberIds' => [
'a1b2c3'
],
'placeIds' => [
'd4e5f6'
],
'emails' => [
'dispatch@example.com'
],
'weekdays' => [
'mon',
'tue',
'wed',
'thu',
'fri'
],
'timeStart' => '08:00',
'timeEnd' => '09:00'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hellotracks.com/v1/alerts/configs"
payload := strings.NewReader("{\n \"title\": \"Late at warehouse\",\n \"description\": \"Did not check in at the warehouse\",\n \"action\": \"no_check_in\",\n \"memberIds\": [\n \"a1b2c3\"\n ],\n \"placeIds\": [\n \"d4e5f6\"\n ],\n \"emails\": [\n \"dispatch@example.com\"\n ],\n \"weekdays\": [\n \"mon\",\n \"tue\",\n \"wed\",\n \"thu\",\n \"fri\"\n ],\n \"timeStart\": \"08:00\",\n \"timeEnd\": \"09:00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hellotracks.com/v1/alerts/configs")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Late at warehouse\",\n \"description\": \"Did not check in at the warehouse\",\n \"action\": \"no_check_in\",\n \"memberIds\": [\n \"a1b2c3\"\n ],\n \"placeIds\": [\n \"d4e5f6\"\n ],\n \"emails\": [\n \"dispatch@example.com\"\n ],\n \"weekdays\": [\n \"mon\",\n \"tue\",\n \"wed\",\n \"thu\",\n \"fri\"\n ],\n \"timeStart\": \"08:00\",\n \"timeEnd\": \"09:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hellotracks.com/v1/alerts/configs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Late at warehouse\",\n \"description\": \"Did not check in at the warehouse\",\n \"action\": \"no_check_in\",\n \"memberIds\": [\n \"a1b2c3\"\n ],\n \"placeIds\": [\n \"d4e5f6\"\n ],\n \"emails\": [\n \"dispatch@example.com\"\n ],\n \"weekdays\": [\n \"mon\",\n \"tue\",\n \"wed\",\n \"thu\",\n \"fri\"\n ],\n \"timeStart\": \"08:00\",\n \"timeEnd\": \"09:00\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"config": {
"id": "1700000000001",
"createdAt": 1761900000000,
"title": "Late at warehouse",
"description": "Did not check in at the warehouse",
"action": "no_check_in",
"actionCode": 4,
"actionLabel": "Does not check in",
"duration": "",
"intervalMs": 0,
"memberIds": [
"a1b2c3"
],
"teamIds": [],
"placeIds": [
"d4e5f6"
],
"andPlaceIds": [],
"zoneIds": [],
"zones": [],
"emails": [
"dispatch@example.com"
],
"email": "dispatch@example.com",
"phone": "",
"slackChannelId": "",
"weekdays": 31,
"weekdayNames": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"timeStart": "08:00",
"timeEnd": "09:00",
"timeStartCode": 800,
"timeEndCode": 900,
"status": 0,
"statusText": "active",
"type": 1,
"typeText": "regular",
"companyUid": "c0c0c0"
}
},
"error": null,
"meta": {
"path": "/v1/alerts/configs",
"method": "POST"
}
}{
"data": null,
"error": {
"code": "invalid_request",
"message": "date must be YYYY-MM-DD"
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}{
"data": null,
"error": {
"code": "invalid_api_key",
"message": "Invalid Hellotracks API key."
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}{
"data": null,
"error": {
"code": "forbidden",
"message": "No permission."
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}{
"data": null,
"error": {
"code": "throttled",
"message": "Too many requests."
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}{
"data": null,
"error": {
"code": "internal_error",
"message": "Hellotracks API is temporarily unavailable."
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}Create an alert rule
Creates an alert rule. title and action are required; zone actions need zoneIds; an active rule must select at least one company member through memberIds or teamIds. A rule with an andAction becomes type dynamic. When the rule is active and watches zones, the members’ phones are told to refresh their geofences. Answers 200 (not 201). Admins, operators and the company key may call it; workers get 403.
curl --request POST \
--url https://api.hellotracks.com/v1/alerts/configs \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Late at warehouse",
"description": "Did not check in at the warehouse",
"action": "no_check_in",
"memberIds": [
"a1b2c3"
],
"placeIds": [
"d4e5f6"
],
"emails": [
"dispatch@example.com"
],
"weekdays": [
"mon",
"tue",
"wed",
"thu",
"fri"
],
"timeStart": "08:00",
"timeEnd": "09:00"
}
'import requests
url = "https://api.hellotracks.com/v1/alerts/configs"
payload = {
"title": "Late at warehouse",
"description": "Did not check in at the warehouse",
"action": "no_check_in",
"memberIds": ["a1b2c3"],
"placeIds": ["d4e5f6"],
"emails": ["dispatch@example.com"],
"weekdays": ["mon", "tue", "wed", "thu", "fri"],
"timeStart": "08:00",
"timeEnd": "09:00"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Late at warehouse',
description: 'Did not check in at the warehouse',
action: 'no_check_in',
memberIds: ['a1b2c3'],
placeIds: ['d4e5f6'],
emails: ['dispatch@example.com'],
weekdays: ['mon', 'tue', 'wed', 'thu', 'fri'],
timeStart: '08:00',
timeEnd: '09:00'
})
};
fetch('https://api.hellotracks.com/v1/alerts/configs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hellotracks.com/v1/alerts/configs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Late at warehouse',
'description' => 'Did not check in at the warehouse',
'action' => 'no_check_in',
'memberIds' => [
'a1b2c3'
],
'placeIds' => [
'd4e5f6'
],
'emails' => [
'dispatch@example.com'
],
'weekdays' => [
'mon',
'tue',
'wed',
'thu',
'fri'
],
'timeStart' => '08:00',
'timeEnd' => '09:00'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hellotracks.com/v1/alerts/configs"
payload := strings.NewReader("{\n \"title\": \"Late at warehouse\",\n \"description\": \"Did not check in at the warehouse\",\n \"action\": \"no_check_in\",\n \"memberIds\": [\n \"a1b2c3\"\n ],\n \"placeIds\": [\n \"d4e5f6\"\n ],\n \"emails\": [\n \"dispatch@example.com\"\n ],\n \"weekdays\": [\n \"mon\",\n \"tue\",\n \"wed\",\n \"thu\",\n \"fri\"\n ],\n \"timeStart\": \"08:00\",\n \"timeEnd\": \"09:00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hellotracks.com/v1/alerts/configs")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Late at warehouse\",\n \"description\": \"Did not check in at the warehouse\",\n \"action\": \"no_check_in\",\n \"memberIds\": [\n \"a1b2c3\"\n ],\n \"placeIds\": [\n \"d4e5f6\"\n ],\n \"emails\": [\n \"dispatch@example.com\"\n ],\n \"weekdays\": [\n \"mon\",\n \"tue\",\n \"wed\",\n \"thu\",\n \"fri\"\n ],\n \"timeStart\": \"08:00\",\n \"timeEnd\": \"09:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hellotracks.com/v1/alerts/configs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Late at warehouse\",\n \"description\": \"Did not check in at the warehouse\",\n \"action\": \"no_check_in\",\n \"memberIds\": [\n \"a1b2c3\"\n ],\n \"placeIds\": [\n \"d4e5f6\"\n ],\n \"emails\": [\n \"dispatch@example.com\"\n ],\n \"weekdays\": [\n \"mon\",\n \"tue\",\n \"wed\",\n \"thu\",\n \"fri\"\n ],\n \"timeStart\": \"08:00\",\n \"timeEnd\": \"09:00\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"config": {
"id": "1700000000001",
"createdAt": 1761900000000,
"title": "Late at warehouse",
"description": "Did not check in at the warehouse",
"action": "no_check_in",
"actionCode": 4,
"actionLabel": "Does not check in",
"duration": "",
"intervalMs": 0,
"memberIds": [
"a1b2c3"
],
"teamIds": [],
"placeIds": [
"d4e5f6"
],
"andPlaceIds": [],
"zoneIds": [],
"zones": [],
"emails": [
"dispatch@example.com"
],
"email": "dispatch@example.com",
"phone": "",
"slackChannelId": "",
"weekdays": 31,
"weekdayNames": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"timeStart": "08:00",
"timeEnd": "09:00",
"timeStartCode": 800,
"timeEndCode": 900,
"status": 0,
"statusText": "active",
"type": 1,
"typeText": "regular",
"companyUid": "c0c0c0"
}
},
"error": null,
"meta": {
"path": "/v1/alerts/configs",
"method": "POST"
}
}{
"data": null,
"error": {
"code": "invalid_request",
"message": "date must be YYYY-MM-DD"
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}{
"data": null,
"error": {
"code": "invalid_api_key",
"message": "Invalid Hellotracks API key."
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}{
"data": null,
"error": {
"code": "forbidden",
"message": "No permission."
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}{
"data": null,
"error": {
"code": "throttled",
"message": "Too many requests."
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}{
"data": null,
"error": {
"code": "internal_error",
"message": "Hellotracks API is temporarily unavailable."
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}Authorizations
Your API key, from More → API & Integrations in the dashboard, or from ht signup / ht auth login.
Body
Fields of an alert rule. Unknown fields are refused. On create, title and an action are required; on update, only the fields sent change. Also accepted: actionCode/action1 for action, andActionCode/action2 for andAction, message for description, place1Ids for placeIds, place2Ids for andPlaceIds, zones for zoneIds, email for emails, interval/intervalMs for duration.
Required (not empty after the change).
Message sent with the alert.
Alias of description; wins when both are set.
Trigger name (case-insensitive). Required on create unless actionCode is given.
checks_in, checks_out, checks_any, no_check_in, no_check_out, no_check_any, idle, enters_zone, leaves_zone, no_connection_to_device, enters_danger_zone, battery_low checks_in=1, checks_out=2, checks_any=3, no_check_in=4, no_check_out=5, no_check_any=6, idle=7, enters_zone=8, leaves_zone=9, no_connection_to_device=10, enters_danger_zone=11, battery_low=12.
1 <= x <= 12Alias of actionCode.
Second condition, only for checks_in, checks_out and checks_any. "none" or empty removes it.
none, checks_in, checks_out, no_check_in, no_check_out Alias of andActionCode.
For idle, no_connection_to_device and rules with an andAction; defaults to 1h there and is set to 0 otherwise.
Alias of duration.
Alias of duration.
Members of the company.
Team numbers (1 to the company's team count).
Places for the place actions; cleared for other actions.
Alias of placeIds.
Places for the andAction.
Alias of andPlaceIds.
Zones (numeric ids) for the zone actions; required for enters_zone, leaves_zone, enters_danger_zone.
Alias of zoneIds.
E-mail recipients (must contain @).
Alias of emails.
Bitmask: bit 0 = Monday ... bit 6 = Sunday (1 = Monday only, 31 = Monday to Friday, 127 = every day).
0 <= x <= 127HH:mm, 00:00 to 23:59.
^\d{2}:\d{2}$HH:mm, after 00:00, up to 24:00.
^\d{2}:\d{2}$Defaults to active on create.
active, paused, archived, deleted