Skip to main content
PATCH
Update an alert rule

Authorizations

API-Key
string
header
required

Your API key, from More → API & Integrations in the dashboard, or from ht signup / ht auth login.

Path Parameters

id
string
required

Alert config id (numeric).

Body

application/json

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.

title
string

Required (not empty after the change).

description
string

Message sent with the alert.

message
string

Alias of description; wins when both are set.

action
enum<string>

Trigger name (case-insensitive). Required on create unless actionCode is given.

Available options:
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
actionCode
integer

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.

Required range: 1 <= x <= 12
action1
integer

Alias of actionCode.

andAction
enum<string>

Second condition, only for checks_in, checks_out and checks_any. "none" or empty removes it.

Available options:
none,
checks_in,
checks_out,
no_check_in,
no_check_out
andActionCode
integer
action2
integer

Alias of andActionCode.

duration

For idle, no_connection_to_device and rules with an andAction; defaults to 1h there and is set to 0 otherwise.

interval
any

Alias of duration.

intervalMs
any

Alias of duration.

memberIds

Members of the company.

teamIds

Team numbers (1 to the company's team count).

placeIds

Places for the place actions; cleared for other actions.

place1Ids
any

Alias of placeIds.

andPlaceIds

Places for the andAction.

place2Ids
any

Alias of andPlaceIds.

zoneIds

Zones (numeric ids) for the zone actions; required for enters_zone, leaves_zone, enters_danger_zone.

zones
any

Alias of zoneIds.

emails

E-mail recipients (must contain @).

email
any

Alias of emails.

phone
string
slackChannelId
string
weekdays

Bitmask: bit 0 = Monday ... bit 6 = Sunday (1 = Monday only, 31 = Monday to Friday, 127 = every day).

Required range: 0 <= x <= 127
timeStart
string

HH:mm, 00:00 to 23:59.

Pattern: ^\d{2}:\d{2}$
timeEnd
string

HH:mm, after 00:00, up to 24:00.

Pattern: ^\d{2}:\d{2}$
status

Defaults to active on create.

Available options:
active,
paused,
archived,
deleted

Response

OK

data
object

The payload.

error
null
meta
object