Create a coaching agent
curl --request POST \
--url https://{subdomain}.mihu.ai/api/v1/coaching-agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Support Team Coach",
"description": "Coaches the support team after every evaluation",
"coaching_tone": "supportive",
"auto_trigger_threshold": 70,
"language": "English",
"general_guidelines": "Always start with positive feedback. Be specific with examples.",
"training_examples": [
{
"issue": "Agent scored 55% due to poor greeting and rushed resolution",
"coaching": "I noticed you interrupted the customer a few times. Try counting to 2 after they pause before responding."
}
],
"resource_library": [
{
"title": "Active Listening Basics",
"type": "video",
"url": "https://example.com/active-listening",
"topics": "empathy, listening"
}
]
}
'import requests
url = "https://{subdomain}.mihu.ai/api/v1/coaching-agents"
payload = {
"name": "Support Team Coach",
"description": "Coaches the support team after every evaluation",
"coaching_tone": "supportive",
"auto_trigger_threshold": 70,
"language": "English",
"general_guidelines": "Always start with positive feedback. Be specific with examples.",
"training_examples": [
{
"issue": "Agent scored 55% due to poor greeting and rushed resolution",
"coaching": "I noticed you interrupted the customer a few times. Try counting to 2 after they pause before responding."
}
],
"resource_library": [
{
"title": "Active Listening Basics",
"type": "video",
"url": "https://example.com/active-listening",
"topics": "empathy, listening"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Support Team Coach',
description: 'Coaches the support team after every evaluation',
coaching_tone: 'supportive',
auto_trigger_threshold: 70,
language: 'English',
general_guidelines: 'Always start with positive feedback. Be specific with examples.',
training_examples: [
{
issue: 'Agent scored 55% due to poor greeting and rushed resolution',
coaching: 'I noticed you interrupted the customer a few times. Try counting to 2 after they pause before responding.'
}
],
resource_library: [
{
title: 'Active Listening Basics',
type: 'video',
url: 'https://example.com/active-listening',
topics: 'empathy, listening'
}
]
})
};
fetch('https://{subdomain}.mihu.ai/api/v1/coaching-agents', 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://{subdomain}.mihu.ai/api/v1/coaching-agents",
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([
'name' => 'Support Team Coach',
'description' => 'Coaches the support team after every evaluation',
'coaching_tone' => 'supportive',
'auto_trigger_threshold' => 70,
'language' => 'English',
'general_guidelines' => 'Always start with positive feedback. Be specific with examples.',
'training_examples' => [
[
'issue' => 'Agent scored 55% due to poor greeting and rushed resolution',
'coaching' => 'I noticed you interrupted the customer a few times. Try counting to 2 after they pause before responding.'
]
],
'resource_library' => [
[
'title' => 'Active Listening Basics',
'type' => 'video',
'url' => 'https://example.com/active-listening',
'topics' => 'empathy, listening'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://{subdomain}.mihu.ai/api/v1/coaching-agents"
payload := strings.NewReader("{\n \"name\": \"Support Team Coach\",\n \"description\": \"Coaches the support team after every evaluation\",\n \"coaching_tone\": \"supportive\",\n \"auto_trigger_threshold\": 70,\n \"language\": \"English\",\n \"general_guidelines\": \"Always start with positive feedback. Be specific with examples.\",\n \"training_examples\": [\n {\n \"issue\": \"Agent scored 55% due to poor greeting and rushed resolution\",\n \"coaching\": \"I noticed you interrupted the customer a few times. Try counting to 2 after they pause before responding.\"\n }\n ],\n \"resource_library\": [\n {\n \"title\": \"Active Listening Basics\",\n \"type\": \"video\",\n \"url\": \"https://example.com/active-listening\",\n \"topics\": \"empathy, listening\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{subdomain}.mihu.ai/api/v1/coaching-agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Support Team Coach\",\n \"description\": \"Coaches the support team after every evaluation\",\n \"coaching_tone\": \"supportive\",\n \"auto_trigger_threshold\": 70,\n \"language\": \"English\",\n \"general_guidelines\": \"Always start with positive feedback. Be specific with examples.\",\n \"training_examples\": [\n {\n \"issue\": \"Agent scored 55% due to poor greeting and rushed resolution\",\n \"coaching\": \"I noticed you interrupted the customer a few times. Try counting to 2 after they pause before responding.\"\n }\n ],\n \"resource_library\": [\n {\n \"title\": \"Active Listening Basics\",\n \"type\": \"video\",\n \"url\": \"https://example.com/active-listening\",\n \"topics\": \"empathy, listening\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/coaching-agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Support Team Coach\",\n \"description\": \"Coaches the support team after every evaluation\",\n \"coaching_tone\": \"supportive\",\n \"auto_trigger_threshold\": 70,\n \"language\": \"English\",\n \"general_guidelines\": \"Always start with positive feedback. Be specific with examples.\",\n \"training_examples\": [\n {\n \"issue\": \"Agent scored 55% due to poor greeting and rushed resolution\",\n \"coaching\": \"I noticed you interrupted the customer a few times. Try counting to 2 after they pause before responding.\"\n }\n ],\n \"resource_library\": [\n {\n \"title\": \"Active Listening Basics\",\n \"type\": \"video\",\n \"url\": \"https://example.com/active-listening\",\n \"topics\": \"empathy, listening\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Coaching agent created successfully",
"data": {
"uuid": "3f6a8c2e-9d1b-4e7a-b5c3-2a1f0e9d8c7b",
"name": "Support Team Coach",
"description": "Coaches the support team after every evaluation",
"is_active": true,
"is_default": true,
"coaching_tone": "supportive",
"coaching_frequency": "immediate",
"auto_trigger_threshold": 70,
"language": "English",
"include_positive_feedback": true,
"include_actionable_steps": true,
"include_resources": true,
"general_guidelines": "Always start with positive feedback.",
"coaching_templates": [
{
"name": "Low Score Performance",
"scenario": "When agent scores below 60%",
"tone": "supportive",
"template": "Let's review this call together...",
"is_custom": false
}
],
"training_examples": [
{
"issue": "Agent scored 55% due to poor greeting",
"coaching": "I noticed you interrupted the customer a few times..."
}
],
"resource_library": [
{
"title": "Active Listening Basics",
"type": "video",
"url": "https://example.com/active-listening",
"description": "<string>",
"topics": "empathy, listening"
}
],
"created_at": "2026-06-04T10:15:30+00:00",
"updated_at": "2026-06-04T10:15:30+00:00"
}
}{
"success": false,
"message": "Agent not found",
"data": []
}{
"success": false,
"message": "Agent not found",
"data": []
}{
"success": false,
"message": "Agent not found",
"data": []
}{
"success": false,
"message": "Agent not found",
"data": []
}Coaching Agents
Create a coaching agent
Creates a coaching agent. Leave out coaching_templates and training_examples to start with ready-made samples you can edit later. Your first coaching agent automatically becomes the default.
POST
/
api
/
v1
/
coaching-agents
Create a coaching agent
curl --request POST \
--url https://{subdomain}.mihu.ai/api/v1/coaching-agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Support Team Coach",
"description": "Coaches the support team after every evaluation",
"coaching_tone": "supportive",
"auto_trigger_threshold": 70,
"language": "English",
"general_guidelines": "Always start with positive feedback. Be specific with examples.",
"training_examples": [
{
"issue": "Agent scored 55% due to poor greeting and rushed resolution",
"coaching": "I noticed you interrupted the customer a few times. Try counting to 2 after they pause before responding."
}
],
"resource_library": [
{
"title": "Active Listening Basics",
"type": "video",
"url": "https://example.com/active-listening",
"topics": "empathy, listening"
}
]
}
'import requests
url = "https://{subdomain}.mihu.ai/api/v1/coaching-agents"
payload = {
"name": "Support Team Coach",
"description": "Coaches the support team after every evaluation",
"coaching_tone": "supportive",
"auto_trigger_threshold": 70,
"language": "English",
"general_guidelines": "Always start with positive feedback. Be specific with examples.",
"training_examples": [
{
"issue": "Agent scored 55% due to poor greeting and rushed resolution",
"coaching": "I noticed you interrupted the customer a few times. Try counting to 2 after they pause before responding."
}
],
"resource_library": [
{
"title": "Active Listening Basics",
"type": "video",
"url": "https://example.com/active-listening",
"topics": "empathy, listening"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Support Team Coach',
description: 'Coaches the support team after every evaluation',
coaching_tone: 'supportive',
auto_trigger_threshold: 70,
language: 'English',
general_guidelines: 'Always start with positive feedback. Be specific with examples.',
training_examples: [
{
issue: 'Agent scored 55% due to poor greeting and rushed resolution',
coaching: 'I noticed you interrupted the customer a few times. Try counting to 2 after they pause before responding.'
}
],
resource_library: [
{
title: 'Active Listening Basics',
type: 'video',
url: 'https://example.com/active-listening',
topics: 'empathy, listening'
}
]
})
};
fetch('https://{subdomain}.mihu.ai/api/v1/coaching-agents', 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://{subdomain}.mihu.ai/api/v1/coaching-agents",
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([
'name' => 'Support Team Coach',
'description' => 'Coaches the support team after every evaluation',
'coaching_tone' => 'supportive',
'auto_trigger_threshold' => 70,
'language' => 'English',
'general_guidelines' => 'Always start with positive feedback. Be specific with examples.',
'training_examples' => [
[
'issue' => 'Agent scored 55% due to poor greeting and rushed resolution',
'coaching' => 'I noticed you interrupted the customer a few times. Try counting to 2 after they pause before responding.'
]
],
'resource_library' => [
[
'title' => 'Active Listening Basics',
'type' => 'video',
'url' => 'https://example.com/active-listening',
'topics' => 'empathy, listening'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://{subdomain}.mihu.ai/api/v1/coaching-agents"
payload := strings.NewReader("{\n \"name\": \"Support Team Coach\",\n \"description\": \"Coaches the support team after every evaluation\",\n \"coaching_tone\": \"supportive\",\n \"auto_trigger_threshold\": 70,\n \"language\": \"English\",\n \"general_guidelines\": \"Always start with positive feedback. Be specific with examples.\",\n \"training_examples\": [\n {\n \"issue\": \"Agent scored 55% due to poor greeting and rushed resolution\",\n \"coaching\": \"I noticed you interrupted the customer a few times. Try counting to 2 after they pause before responding.\"\n }\n ],\n \"resource_library\": [\n {\n \"title\": \"Active Listening Basics\",\n \"type\": \"video\",\n \"url\": \"https://example.com/active-listening\",\n \"topics\": \"empathy, listening\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{subdomain}.mihu.ai/api/v1/coaching-agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Support Team Coach\",\n \"description\": \"Coaches the support team after every evaluation\",\n \"coaching_tone\": \"supportive\",\n \"auto_trigger_threshold\": 70,\n \"language\": \"English\",\n \"general_guidelines\": \"Always start with positive feedback. Be specific with examples.\",\n \"training_examples\": [\n {\n \"issue\": \"Agent scored 55% due to poor greeting and rushed resolution\",\n \"coaching\": \"I noticed you interrupted the customer a few times. Try counting to 2 after they pause before responding.\"\n }\n ],\n \"resource_library\": [\n {\n \"title\": \"Active Listening Basics\",\n \"type\": \"video\",\n \"url\": \"https://example.com/active-listening\",\n \"topics\": \"empathy, listening\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/coaching-agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Support Team Coach\",\n \"description\": \"Coaches the support team after every evaluation\",\n \"coaching_tone\": \"supportive\",\n \"auto_trigger_threshold\": 70,\n \"language\": \"English\",\n \"general_guidelines\": \"Always start with positive feedback. Be specific with examples.\",\n \"training_examples\": [\n {\n \"issue\": \"Agent scored 55% due to poor greeting and rushed resolution\",\n \"coaching\": \"I noticed you interrupted the customer a few times. Try counting to 2 after they pause before responding.\"\n }\n ],\n \"resource_library\": [\n {\n \"title\": \"Active Listening Basics\",\n \"type\": \"video\",\n \"url\": \"https://example.com/active-listening\",\n \"topics\": \"empathy, listening\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Coaching agent created successfully",
"data": {
"uuid": "3f6a8c2e-9d1b-4e7a-b5c3-2a1f0e9d8c7b",
"name": "Support Team Coach",
"description": "Coaches the support team after every evaluation",
"is_active": true,
"is_default": true,
"coaching_tone": "supportive",
"coaching_frequency": "immediate",
"auto_trigger_threshold": 70,
"language": "English",
"include_positive_feedback": true,
"include_actionable_steps": true,
"include_resources": true,
"general_guidelines": "Always start with positive feedback.",
"coaching_templates": [
{
"name": "Low Score Performance",
"scenario": "When agent scores below 60%",
"tone": "supportive",
"template": "Let's review this call together...",
"is_custom": false
}
],
"training_examples": [
{
"issue": "Agent scored 55% due to poor greeting",
"coaching": "I noticed you interrupted the customer a few times..."
}
],
"resource_library": [
{
"title": "Active Listening Basics",
"type": "video",
"url": "https://example.com/active-listening",
"description": "<string>",
"topics": "empathy, listening"
}
],
"created_at": "2026-06-04T10:15:30+00:00",
"updated_at": "2026-06-04T10:15:30+00:00"
}
}{
"success": false,
"message": "Agent not found",
"data": []
}{
"success": false,
"message": "Agent not found",
"data": []
}{
"success": false,
"message": "Agent not found",
"data": []
}{
"success": false,
"message": "Agent not found",
"data": []
}Authorizations
Body
application/json
Create/update payload. On update only the fields you send are changed; the template, example, and resource lists replace the existing ones when provided.