Appends a guard rule. Existing guards are untouched. when_condition and then_action are required. If then_action=forward, also provide destination_type + destination (or destination_agent_uuid when destination_type=agent). If then_action=end_conversation, provide say_before_end for a polite closer.
Documentation Index
Fetch the complete documentation index at: https://developers.mindhunters.ai/llms.txt
Use this file to discover all available pages before exploring further.
Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"
Guard rules let the agent forward or end a conversation when a defined situation arises (compliance, safety, escalation). The runtime AI relies on when_condition and example_phrases to decide whether a customer utterance triggers the guard — rules without those fields filled cannot fire reliably.
Optional short name for the guard rule.
"Legal complaint escalation"
Required. Natural-language description of the situation that should trigger this guard. The runtime AI uses this as instructions when classifying customer utterances. Be specific — 'customer is angry' is too vague; 'customer uses profanity or threatens to escalate' is actionable.
"Customer mentions a legal complaint, lawyer, lawsuit, or threatens to take legal action."
Customer utterances that should trigger this guard. Provide 3-5 varied phrasings — the runtime AI uses these as positive examples when classifying.
What the runtime agent does when the guard fires. forward transfers to a human or another agent; end_conversation politely ends the call/chat.
forward, end_conversation "forward"
Channels where this guard is active. Defaults to phone-only.
phone, instagram, whatsapp, facebook_messenger Message spoken before the transfer when then_action=forward.
"I understand this is important — let me connect you with someone who can help."
Message spoken before ending when then_action=end_conversation.
"I'm sorry I couldn't help further. Please contact our team directly. Goodbye."
Where the call is sent when then_action=forward (same semantics as routing rules).
extension, phone, agent Destination value (extension, SIP URI, or E.164 phone) when then_action=forward.
Target agent UUID when destination_type=agent.
true
Marks this guard as a default that auto-applies to new agents in the workspace.
false
Guard rule added