Update a coaching agent
curl --request PATCH \
--url https://{subdomain}.mihu.ai/api/v1/coaching-agents/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"general_guidelines": "Always start with positive feedback. If the price was not mentioned during the conversation, point this out, explain that discussing price is essential for moving the customer toward a decision, and recommend the pricing video from the resource library.",
"resource_library": [
{
"title": "Pricing Conversation Tutorial",
"type": "video",
"url": "https://example.com/pricing-tutorial",
"description": "Recommended when the agent did not bring up price - how to handle the pricing conversation confidently.",
"topics": "pricing, price objections, sales, closing"
}
]
}
'import requests
url = "https://{subdomain}.mihu.ai/api/v1/coaching-agents/{uuid}"
payload = {
"general_guidelines": "Always start with positive feedback. If the price was not mentioned during the conversation, point this out, explain that discussing price is essential for moving the customer toward a decision, and recommend the pricing video from the resource library.",
"resource_library": [
{
"title": "Pricing Conversation Tutorial",
"type": "video",
"url": "https://example.com/pricing-tutorial",
"description": "Recommended when the agent did not bring up price - how to handle the pricing conversation confidently.",
"topics": "pricing, price objections, sales, closing"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
general_guidelines: 'Always start with positive feedback. If the price was not mentioned during the conversation, point this out, explain that discussing price is essential for moving the customer toward a decision, and recommend the pricing video from the resource library.',
resource_library: [
{
title: 'Pricing Conversation Tutorial',
type: 'video',
url: 'https://example.com/pricing-tutorial',
description: 'Recommended when the agent did not bring up price - how to handle the pricing conversation confidently.',
topics: 'pricing, price objections, sales, closing'
}
]
})
};
fetch('https://{subdomain}.mihu.ai/api/v1/coaching-agents/{uuid}', 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/{uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'general_guidelines' => 'Always start with positive feedback. If the price was not mentioned during the conversation, point this out, explain that discussing price is essential for moving the customer toward a decision, and recommend the pricing video from the resource library.',
'resource_library' => [
[
'title' => 'Pricing Conversation Tutorial',
'type' => 'video',
'url' => 'https://example.com/pricing-tutorial',
'description' => 'Recommended when the agent did not bring up price - how to handle the pricing conversation confidently.',
'topics' => 'pricing, price objections, sales, closing'
]
]
]),
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/{uuid}"
payload := strings.NewReader("{\n \"general_guidelines\": \"Always start with positive feedback. If the price was not mentioned during the conversation, point this out, explain that discussing price is essential for moving the customer toward a decision, and recommend the pricing video from the resource library.\",\n \"resource_library\": [\n {\n \"title\": \"Pricing Conversation Tutorial\",\n \"type\": \"video\",\n \"url\": \"https://example.com/pricing-tutorial\",\n \"description\": \"Recommended when the agent did not bring up price - how to handle the pricing conversation confidently.\",\n \"topics\": \"pricing, price objections, sales, closing\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://{subdomain}.mihu.ai/api/v1/coaching-agents/{uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"general_guidelines\": \"Always start with positive feedback. If the price was not mentioned during the conversation, point this out, explain that discussing price is essential for moving the customer toward a decision, and recommend the pricing video from the resource library.\",\n \"resource_library\": [\n {\n \"title\": \"Pricing Conversation Tutorial\",\n \"type\": \"video\",\n \"url\": \"https://example.com/pricing-tutorial\",\n \"description\": \"Recommended when the agent did not bring up price - how to handle the pricing conversation confidently.\",\n \"topics\": \"pricing, price objections, sales, closing\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/coaching-agents/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"general_guidelines\": \"Always start with positive feedback. If the price was not mentioned during the conversation, point this out, explain that discussing price is essential for moving the customer toward a decision, and recommend the pricing video from the resource library.\",\n \"resource_library\": [\n {\n \"title\": \"Pricing Conversation Tutorial\",\n \"type\": \"video\",\n \"url\": \"https://example.com/pricing-tutorial\",\n \"description\": \"Recommended when the agent did not bring up price - how to handle the pricing conversation confidently.\",\n \"topics\": \"pricing, price objections, sales, closing\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Coaching agent updated 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
Update a coaching agent
Updates a coaching agent — only the fields you send are changed. The coaching_templates, training_examples, and resource_library lists replace the existing ones when you include them. Note: the current default agent stays default until you set another one as default.
PATCH
/
api
/
v1
/
coaching-agents
/
{uuid}
Update a coaching agent
curl --request PATCH \
--url https://{subdomain}.mihu.ai/api/v1/coaching-agents/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"general_guidelines": "Always start with positive feedback. If the price was not mentioned during the conversation, point this out, explain that discussing price is essential for moving the customer toward a decision, and recommend the pricing video from the resource library.",
"resource_library": [
{
"title": "Pricing Conversation Tutorial",
"type": "video",
"url": "https://example.com/pricing-tutorial",
"description": "Recommended when the agent did not bring up price - how to handle the pricing conversation confidently.",
"topics": "pricing, price objections, sales, closing"
}
]
}
'import requests
url = "https://{subdomain}.mihu.ai/api/v1/coaching-agents/{uuid}"
payload = {
"general_guidelines": "Always start with positive feedback. If the price was not mentioned during the conversation, point this out, explain that discussing price is essential for moving the customer toward a decision, and recommend the pricing video from the resource library.",
"resource_library": [
{
"title": "Pricing Conversation Tutorial",
"type": "video",
"url": "https://example.com/pricing-tutorial",
"description": "Recommended when the agent did not bring up price - how to handle the pricing conversation confidently.",
"topics": "pricing, price objections, sales, closing"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
general_guidelines: 'Always start with positive feedback. If the price was not mentioned during the conversation, point this out, explain that discussing price is essential for moving the customer toward a decision, and recommend the pricing video from the resource library.',
resource_library: [
{
title: 'Pricing Conversation Tutorial',
type: 'video',
url: 'https://example.com/pricing-tutorial',
description: 'Recommended when the agent did not bring up price - how to handle the pricing conversation confidently.',
topics: 'pricing, price objections, sales, closing'
}
]
})
};
fetch('https://{subdomain}.mihu.ai/api/v1/coaching-agents/{uuid}', 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/{uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'general_guidelines' => 'Always start with positive feedback. If the price was not mentioned during the conversation, point this out, explain that discussing price is essential for moving the customer toward a decision, and recommend the pricing video from the resource library.',
'resource_library' => [
[
'title' => 'Pricing Conversation Tutorial',
'type' => 'video',
'url' => 'https://example.com/pricing-tutorial',
'description' => 'Recommended when the agent did not bring up price - how to handle the pricing conversation confidently.',
'topics' => 'pricing, price objections, sales, closing'
]
]
]),
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/{uuid}"
payload := strings.NewReader("{\n \"general_guidelines\": \"Always start with positive feedback. If the price was not mentioned during the conversation, point this out, explain that discussing price is essential for moving the customer toward a decision, and recommend the pricing video from the resource library.\",\n \"resource_library\": [\n {\n \"title\": \"Pricing Conversation Tutorial\",\n \"type\": \"video\",\n \"url\": \"https://example.com/pricing-tutorial\",\n \"description\": \"Recommended when the agent did not bring up price - how to handle the pricing conversation confidently.\",\n \"topics\": \"pricing, price objections, sales, closing\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://{subdomain}.mihu.ai/api/v1/coaching-agents/{uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"general_guidelines\": \"Always start with positive feedback. If the price was not mentioned during the conversation, point this out, explain that discussing price is essential for moving the customer toward a decision, and recommend the pricing video from the resource library.\",\n \"resource_library\": [\n {\n \"title\": \"Pricing Conversation Tutorial\",\n \"type\": \"video\",\n \"url\": \"https://example.com/pricing-tutorial\",\n \"description\": \"Recommended when the agent did not bring up price - how to handle the pricing conversation confidently.\",\n \"topics\": \"pricing, price objections, sales, closing\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/coaching-agents/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"general_guidelines\": \"Always start with positive feedback. If the price was not mentioned during the conversation, point this out, explain that discussing price is essential for moving the customer toward a decision, and recommend the pricing video from the resource library.\",\n \"resource_library\": [\n {\n \"title\": \"Pricing Conversation Tutorial\",\n \"type\": \"video\",\n \"url\": \"https://example.com/pricing-tutorial\",\n \"description\": \"Recommended when the agent did not bring up price - how to handle the pricing conversation confidently.\",\n \"topics\": \"pricing, price objections, sales, closing\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Coaching agent updated 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.