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
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.