Appends a new routing rule. Existing rules are untouched. If priority is omitted, it defaults to (max existing priority + 1) so the new rule is evaluated last. Returns the agent with the full updated routing_rules list. Use POST for incremental builds; use PUT to replace the whole set.
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}"
Routing rules tell the runtime agent when and how to transfer a call to another extension, phone number, or agent (the IVR equivalent). The runtime AI relies on ai_prompt and phrases to decide whether a customer utterance should trigger this rule — assignments without those fields will never fire.
How the AI matches customer utterances to this rule. exact = literal keyword (fast but narrow), intent = AI semantic understanding (broader, recommended), both = combine for max accuracy.
exact, intent, both "intent"
Literal keyword that triggers exact/both matching. Required when detection_mode is exact or both.
"sales"
Human-readable label for this rule. Helps you and the AI identify what the rule is for.
"Sales Department"
Example customer utterances that should trigger this rule. The runtime AI uses these as training signal when detection_mode includes intent matching. Provide 3-5 varied phrasings.
Required for intent-based matching. Natural-language instructions the runtime AI uses to decide whether a customer utterance matches this rule. Without this field set, intent and both detection modes have no guidance to act on, so the rule will never trigger. Always provide concrete instructions describing what customer intent should fire this rule.
"Detect when the customer wants to speak with the sales team — they may ask about pricing, new products, quotes, or directly mention sales."
Message the runtime agent speaks to the customer immediately before initiating the transfer. Required.
"Sure, I'll transfer you to our sales team now. One moment please."
Spoken when the transfer fails (busy, no answer, error). Recommended.
"I'm sorry, I couldn't reach sales right now. Please call back later or leave a message."
Spoken when the transfer completes successfully (typically only used for warm/ping-and-transfer modes).
"You've been successfully connected. Have a great day."
Where the call is sent. extension = SIP extension or URI (e.g. '101' or 'sip:101@domain.com'), phone = external phone number in E.164, agent = another mihu agent (set destination_agent_uuid).
extension, phone, agent "extension"
The actual destination value. Format depends on destination_type: extension number, SIP URI, or E.164 phone. Ignored when destination_type=agent.
"101"
UUID of the target agent. Required when destination_type=agent.
Telephony transfer mechanism. transfer_call = default transfer (recommended for most cases). forward_call = simple forwarding. warm_transfer_call = the agent stays on the line and announces the caller before connecting. blind_transfer_call = hang up the moment the destination rings. ping_and_transfer_call = the agent briefly announces the caller, then transfers.
transfer_call, forward_call, warm_transfer_call, blind_transfer_call, ping_and_transfer_call "transfer_call"
Optional telephony-provider-specific configuration. Free-form key/value map; consult provider docs for accepted keys.
Match priority. Lower numbers run first when multiple rules could match the same utterance.
1
true
Routing rule added