Skip to main content
POST
Create a monitor rule

Authorizations

Authorization
string
header
required

Your v3 API key, e.g. ask_live_…

Headers

X-Subaccount-Id
string

Target subaccount for the request. Required unless the API key is authorized for exactly one subaccount (then it defaults to that one). Alternatively pass subaccount_id (or legacy location_id) in the request body. Omitting it on a multi-subaccount key returns 400 subaccount_required.

Body

application/json
name
string
required

Human-readable rule name.

Required string length: 1 - 200
evaluator_prompt
string
required

What to watch for — the instruction the LLM evaluator runs against each transcript.

Minimum string length: 1
description
string

What this rule is for.

Maximum string length: 2000
category
enum<string>

Defaults to CUSTOM.

Available options:
COMPLIANCE,
QUALITY,
SAFETY,
ESCALATION,
CUSTOM
trigger_on
enum<string>

Which interactions to evaluate. Defaults to BOTH.

Available options:
CALL,
CHAT,
BOTH
severity
enum<string>

Defaults to MEDIUM.

Available options:
LOW,
MEDIUM,
HIGH,
CRITICAL
assistant_id
string

Scope the rule to a single assistant. Omit for a subaccount-wide rule.

threshold
integer

Triggers required within the window before alerting. Default 1.

Required range: 1 <= x <= 9007199254740991
threshold_window_mins
integer

Rolling window (minutes) for the threshold count. Default 0 (alert on every trigger).

Required range: 0 <= x <= 9007199254740991
cooldown_mins
integer

Minimum minutes between alerts for this rule. Default 0.

Required range: 0 <= x <= 9007199254740991
enabled
boolean

Defaults to true.

routing
object[]

Alert routing channels (webhook/email/slack) with recipients.

subaccount_id
string

Target subaccount id. Prefer the X-Subaccount-Id header; this body field is a fallback.

location_id
string

Alias for subaccount_id (GHL location id).

Response

Success

data
object
required
request_id
string
required
error
null