curl --request PATCH \
--url https://{subdomain}.mihu.ai/api/v1/workspace/queue/{uuid}/channels/{assignment} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mode": "copilot",
"ai_agent": "6f293cb9-26c6-423e-80e8-f90d39b0cd3b",
"sla_seconds": 45,
"knowledge_gap": {
"enabled": true,
"threshold": 80,
"hand_off_to": "e04c2032-9f4d-4833-bbea-2b7c660aaeca"
},
"callback": {
"enabled": true,
"user_email": "deniz2@agnosy.com",
"prompt": "Ask the human teammate to review and call back."
},
"overflow": {
"enabled": true,
"reason": "maxwait",
"target_type": "queue",
"target": "e04c2032-9f4d-4833-bbea-2b7c660aaeca"
},
"escalation": {
"enabled": true,
"reason": "request",
"target_type": "agent",
"target": "eda19d37-23aa-4778-b43a-e7ca274e5fdb"
},
"working_hours": {
"enabled": true,
"days": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri"
],
"start": "09:00",
"end": "18:00"
}
}
'import requests
url = "https://{subdomain}.mihu.ai/api/v1/workspace/queue/{uuid}/channels/{assignment}"
payload = {
"mode": "copilot",
"ai_agent": "6f293cb9-26c6-423e-80e8-f90d39b0cd3b",
"sla_seconds": 45,
"knowledge_gap": {
"enabled": True,
"threshold": 80,
"hand_off_to": "e04c2032-9f4d-4833-bbea-2b7c660aaeca"
},
"callback": {
"enabled": True,
"user_email": "deniz2@agnosy.com",
"prompt": "Ask the human teammate to review and call back."
},
"overflow": {
"enabled": True,
"reason": "maxwait",
"target_type": "queue",
"target": "e04c2032-9f4d-4833-bbea-2b7c660aaeca"
},
"escalation": {
"enabled": True,
"reason": "request",
"target_type": "agent",
"target": "eda19d37-23aa-4778-b43a-e7ca274e5fdb"
},
"working_hours": {
"enabled": True,
"days": ["Mon", "Tue", "Wed", "Thu", "Fri"],
"start": "09:00",
"end": "18:00"
}
}
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({
mode: 'copilot',
ai_agent: '6f293cb9-26c6-423e-80e8-f90d39b0cd3b',
sla_seconds: 45,
knowledge_gap: {
enabled: true,
threshold: 80,
hand_off_to: 'e04c2032-9f4d-4833-bbea-2b7c660aaeca'
},
callback: {
enabled: true,
user_email: 'deniz2@agnosy.com',
prompt: 'Ask the human teammate to review and call back.'
},
overflow: {
enabled: true,
reason: 'maxwait',
target_type: 'queue',
target: 'e04c2032-9f4d-4833-bbea-2b7c660aaeca'
},
escalation: {
enabled: true,
reason: 'request',
target_type: 'agent',
target: 'eda19d37-23aa-4778-b43a-e7ca274e5fdb'
},
working_hours: {
enabled: true,
days: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
start: '09:00',
end: '18:00'
}
})
};
fetch('https://{subdomain}.mihu.ai/api/v1/workspace/queue/{uuid}/channels/{assignment}', 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/workspace/queue/{uuid}/channels/{assignment}",
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([
'mode' => 'copilot',
'ai_agent' => '6f293cb9-26c6-423e-80e8-f90d39b0cd3b',
'sla_seconds' => 45,
'knowledge_gap' => [
'enabled' => true,
'threshold' => 80,
'hand_off_to' => 'e04c2032-9f4d-4833-bbea-2b7c660aaeca'
],
'callback' => [
'enabled' => true,
'user_email' => 'deniz2@agnosy.com',
'prompt' => 'Ask the human teammate to review and call back.'
],
'overflow' => [
'enabled' => true,
'reason' => 'maxwait',
'target_type' => 'queue',
'target' => 'e04c2032-9f4d-4833-bbea-2b7c660aaeca'
],
'escalation' => [
'enabled' => true,
'reason' => 'request',
'target_type' => 'agent',
'target' => 'eda19d37-23aa-4778-b43a-e7ca274e5fdb'
],
'working_hours' => [
'enabled' => true,
'days' => [
'Mon',
'Tue',
'Wed',
'Thu',
'Fri'
],
'start' => '09:00',
'end' => '18:00'
]
]),
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/workspace/queue/{uuid}/channels/{assignment}"
payload := strings.NewReader("{\n \"mode\": \"copilot\",\n \"ai_agent\": \"6f293cb9-26c6-423e-80e8-f90d39b0cd3b\",\n \"sla_seconds\": 45,\n \"knowledge_gap\": {\n \"enabled\": true,\n \"threshold\": 80,\n \"hand_off_to\": \"e04c2032-9f4d-4833-bbea-2b7c660aaeca\"\n },\n \"callback\": {\n \"enabled\": true,\n \"user_email\": \"deniz2@agnosy.com\",\n \"prompt\": \"Ask the human teammate to review and call back.\"\n },\n \"overflow\": {\n \"enabled\": true,\n \"reason\": \"maxwait\",\n \"target_type\": \"queue\",\n \"target\": \"e04c2032-9f4d-4833-bbea-2b7c660aaeca\"\n },\n \"escalation\": {\n \"enabled\": true,\n \"reason\": \"request\",\n \"target_type\": \"agent\",\n \"target\": \"eda19d37-23aa-4778-b43a-e7ca274e5fdb\"\n },\n \"working_hours\": {\n \"enabled\": true,\n \"days\": [\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\"\n ],\n \"start\": \"09:00\",\n \"end\": \"18:00\"\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/workspace/queue/{uuid}/channels/{assignment}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"copilot\",\n \"ai_agent\": \"6f293cb9-26c6-423e-80e8-f90d39b0cd3b\",\n \"sla_seconds\": 45,\n \"knowledge_gap\": {\n \"enabled\": true,\n \"threshold\": 80,\n \"hand_off_to\": \"e04c2032-9f4d-4833-bbea-2b7c660aaeca\"\n },\n \"callback\": {\n \"enabled\": true,\n \"user_email\": \"deniz2@agnosy.com\",\n \"prompt\": \"Ask the human teammate to review and call back.\"\n },\n \"overflow\": {\n \"enabled\": true,\n \"reason\": \"maxwait\",\n \"target_type\": \"queue\",\n \"target\": \"e04c2032-9f4d-4833-bbea-2b7c660aaeca\"\n },\n \"escalation\": {\n \"enabled\": true,\n \"reason\": \"request\",\n \"target_type\": \"agent\",\n \"target\": \"eda19d37-23aa-4778-b43a-e7ca274e5fdb\"\n },\n \"working_hours\": {\n \"enabled\": true,\n \"days\": [\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\"\n ],\n \"start\": \"09:00\",\n \"end\": \"18:00\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/workspace/queue/{uuid}/channels/{assignment}")
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 \"mode\": \"copilot\",\n \"ai_agent\": \"6f293cb9-26c6-423e-80e8-f90d39b0cd3b\",\n \"sla_seconds\": 45,\n \"knowledge_gap\": {\n \"enabled\": true,\n \"threshold\": 80,\n \"hand_off_to\": \"e04c2032-9f4d-4833-bbea-2b7c660aaeca\"\n },\n \"callback\": {\n \"enabled\": true,\n \"user_email\": \"deniz2@agnosy.com\",\n \"prompt\": \"Ask the human teammate to review and call back.\"\n },\n \"overflow\": {\n \"enabled\": true,\n \"reason\": \"maxwait\",\n \"target_type\": \"queue\",\n \"target\": \"e04c2032-9f4d-4833-bbea-2b7c660aaeca\"\n },\n \"escalation\": {\n \"enabled\": true,\n \"reason\": \"request\",\n \"target_type\": \"agent\",\n \"target\": \"eda19d37-23aa-4778-b43a-e7ca274e5fdb\"\n },\n \"working_hours\": {\n \"enabled\": true,\n \"days\": [\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\"\n ],\n \"start\": \"09:00\",\n \"end\": \"18:00\"\n }\n}"
response = http.request(request)
puts response.read_bodyUpdate per-channel conditional behavior
This is the main Team Management > Queue conditional update endpoint. Send only the changed fields. Mode controls visibility: autopilot omits working_hours; copilot may send working_hours but no after_hours selector is shown; human_first hides knowledge_gap and uses working_hours.after_hours as voicemail, closed, or agent uuid. Overflow/escalation target can be an agent uuid or a queue uuid. Knowledge-gap handoff must use a queue from options.knowledge_gap_queues.
curl --request PATCH \
--url https://{subdomain}.mihu.ai/api/v1/workspace/queue/{uuid}/channels/{assignment} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mode": "copilot",
"ai_agent": "6f293cb9-26c6-423e-80e8-f90d39b0cd3b",
"sla_seconds": 45,
"knowledge_gap": {
"enabled": true,
"threshold": 80,
"hand_off_to": "e04c2032-9f4d-4833-bbea-2b7c660aaeca"
},
"callback": {
"enabled": true,
"user_email": "deniz2@agnosy.com",
"prompt": "Ask the human teammate to review and call back."
},
"overflow": {
"enabled": true,
"reason": "maxwait",
"target_type": "queue",
"target": "e04c2032-9f4d-4833-bbea-2b7c660aaeca"
},
"escalation": {
"enabled": true,
"reason": "request",
"target_type": "agent",
"target": "eda19d37-23aa-4778-b43a-e7ca274e5fdb"
},
"working_hours": {
"enabled": true,
"days": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri"
],
"start": "09:00",
"end": "18:00"
}
}
'import requests
url = "https://{subdomain}.mihu.ai/api/v1/workspace/queue/{uuid}/channels/{assignment}"
payload = {
"mode": "copilot",
"ai_agent": "6f293cb9-26c6-423e-80e8-f90d39b0cd3b",
"sla_seconds": 45,
"knowledge_gap": {
"enabled": True,
"threshold": 80,
"hand_off_to": "e04c2032-9f4d-4833-bbea-2b7c660aaeca"
},
"callback": {
"enabled": True,
"user_email": "deniz2@agnosy.com",
"prompt": "Ask the human teammate to review and call back."
},
"overflow": {
"enabled": True,
"reason": "maxwait",
"target_type": "queue",
"target": "e04c2032-9f4d-4833-bbea-2b7c660aaeca"
},
"escalation": {
"enabled": True,
"reason": "request",
"target_type": "agent",
"target": "eda19d37-23aa-4778-b43a-e7ca274e5fdb"
},
"working_hours": {
"enabled": True,
"days": ["Mon", "Tue", "Wed", "Thu", "Fri"],
"start": "09:00",
"end": "18:00"
}
}
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({
mode: 'copilot',
ai_agent: '6f293cb9-26c6-423e-80e8-f90d39b0cd3b',
sla_seconds: 45,
knowledge_gap: {
enabled: true,
threshold: 80,
hand_off_to: 'e04c2032-9f4d-4833-bbea-2b7c660aaeca'
},
callback: {
enabled: true,
user_email: 'deniz2@agnosy.com',
prompt: 'Ask the human teammate to review and call back.'
},
overflow: {
enabled: true,
reason: 'maxwait',
target_type: 'queue',
target: 'e04c2032-9f4d-4833-bbea-2b7c660aaeca'
},
escalation: {
enabled: true,
reason: 'request',
target_type: 'agent',
target: 'eda19d37-23aa-4778-b43a-e7ca274e5fdb'
},
working_hours: {
enabled: true,
days: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
start: '09:00',
end: '18:00'
}
})
};
fetch('https://{subdomain}.mihu.ai/api/v1/workspace/queue/{uuid}/channels/{assignment}', 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/workspace/queue/{uuid}/channels/{assignment}",
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([
'mode' => 'copilot',
'ai_agent' => '6f293cb9-26c6-423e-80e8-f90d39b0cd3b',
'sla_seconds' => 45,
'knowledge_gap' => [
'enabled' => true,
'threshold' => 80,
'hand_off_to' => 'e04c2032-9f4d-4833-bbea-2b7c660aaeca'
],
'callback' => [
'enabled' => true,
'user_email' => 'deniz2@agnosy.com',
'prompt' => 'Ask the human teammate to review and call back.'
],
'overflow' => [
'enabled' => true,
'reason' => 'maxwait',
'target_type' => 'queue',
'target' => 'e04c2032-9f4d-4833-bbea-2b7c660aaeca'
],
'escalation' => [
'enabled' => true,
'reason' => 'request',
'target_type' => 'agent',
'target' => 'eda19d37-23aa-4778-b43a-e7ca274e5fdb'
],
'working_hours' => [
'enabled' => true,
'days' => [
'Mon',
'Tue',
'Wed',
'Thu',
'Fri'
],
'start' => '09:00',
'end' => '18:00'
]
]),
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/workspace/queue/{uuid}/channels/{assignment}"
payload := strings.NewReader("{\n \"mode\": \"copilot\",\n \"ai_agent\": \"6f293cb9-26c6-423e-80e8-f90d39b0cd3b\",\n \"sla_seconds\": 45,\n \"knowledge_gap\": {\n \"enabled\": true,\n \"threshold\": 80,\n \"hand_off_to\": \"e04c2032-9f4d-4833-bbea-2b7c660aaeca\"\n },\n \"callback\": {\n \"enabled\": true,\n \"user_email\": \"deniz2@agnosy.com\",\n \"prompt\": \"Ask the human teammate to review and call back.\"\n },\n \"overflow\": {\n \"enabled\": true,\n \"reason\": \"maxwait\",\n \"target_type\": \"queue\",\n \"target\": \"e04c2032-9f4d-4833-bbea-2b7c660aaeca\"\n },\n \"escalation\": {\n \"enabled\": true,\n \"reason\": \"request\",\n \"target_type\": \"agent\",\n \"target\": \"eda19d37-23aa-4778-b43a-e7ca274e5fdb\"\n },\n \"working_hours\": {\n \"enabled\": true,\n \"days\": [\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\"\n ],\n \"start\": \"09:00\",\n \"end\": \"18:00\"\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/workspace/queue/{uuid}/channels/{assignment}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"copilot\",\n \"ai_agent\": \"6f293cb9-26c6-423e-80e8-f90d39b0cd3b\",\n \"sla_seconds\": 45,\n \"knowledge_gap\": {\n \"enabled\": true,\n \"threshold\": 80,\n \"hand_off_to\": \"e04c2032-9f4d-4833-bbea-2b7c660aaeca\"\n },\n \"callback\": {\n \"enabled\": true,\n \"user_email\": \"deniz2@agnosy.com\",\n \"prompt\": \"Ask the human teammate to review and call back.\"\n },\n \"overflow\": {\n \"enabled\": true,\n \"reason\": \"maxwait\",\n \"target_type\": \"queue\",\n \"target\": \"e04c2032-9f4d-4833-bbea-2b7c660aaeca\"\n },\n \"escalation\": {\n \"enabled\": true,\n \"reason\": \"request\",\n \"target_type\": \"agent\",\n \"target\": \"eda19d37-23aa-4778-b43a-e7ca274e5fdb\"\n },\n \"working_hours\": {\n \"enabled\": true,\n \"days\": [\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\"\n ],\n \"start\": \"09:00\",\n \"end\": \"18:00\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/workspace/queue/{uuid}/channels/{assignment}")
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 \"mode\": \"copilot\",\n \"ai_agent\": \"6f293cb9-26c6-423e-80e8-f90d39b0cd3b\",\n \"sla_seconds\": 45,\n \"knowledge_gap\": {\n \"enabled\": true,\n \"threshold\": 80,\n \"hand_off_to\": \"e04c2032-9f4d-4833-bbea-2b7c660aaeca\"\n },\n \"callback\": {\n \"enabled\": true,\n \"user_email\": \"deniz2@agnosy.com\",\n \"prompt\": \"Ask the human teammate to review and call back.\"\n },\n \"overflow\": {\n \"enabled\": true,\n \"reason\": \"maxwait\",\n \"target_type\": \"queue\",\n \"target\": \"e04c2032-9f4d-4833-bbea-2b7c660aaeca\"\n },\n \"escalation\": {\n \"enabled\": true,\n \"reason\": \"request\",\n \"target_type\": \"agent\",\n \"target\": \"eda19d37-23aa-4778-b43a-e7ca274e5fdb\"\n },\n \"working_hours\": {\n \"enabled\": true,\n \"days\": [\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\"\n ],\n \"start\": \"09:00\",\n \"end\": \"18:00\"\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"
Body
Send only changed fields. See the schema description for the mode matrix and option sources.
Per-channel settings payload. Mode decides which conditional sections are available. autopilot: AI owns the conversation; send ai_agent, knowledge_gap, callback, overflow, escalation, and omit working_hours because AI is 24/7. copilot: AI assists the human team; send working_hours without after_hours, because outside hours AI takes over alone. human_first: humans answer first; omit knowledge_gap, and when working_hours.enabled is true set after_hours to voicemail, closed, or an agent uuid. callback, overflow, and escalation are valid for all three modes. Source ids must come from GET /api/v1/workspace/queue/options: agents[].uuid, users[].email, target_queues[].uuid, and knowledge_gap_queues[].uuid.
"Enterprise Support"
q-support, q-sales, q-returns, q-technical Per-channel first-response target. The UI normally uses 10..180, while the server accepts 5..600.
5 <= x <= 600Show child attributes
Show child attributes
Human agents of the queue
Show child attributes
Show child attributes
Show child attributes
Show child attributes
autopilot = AI answers alone; copilot = AI assists humans during working hours; human_first = humans answer first and AI is fallback.
autopilot, copilot, human_first AI agent uuid from options.agents[].uuid. Send null to clear.
Visible and writable only for autopilot and copilot. Omit for human_first.
Show child attributes
Show child attributes
Offer or create a callback instead of keeping the customer waiting. Valid for all modes.
Show child attributes
Show child attributes
Move the conversation when capacity conditions are hit. Valid for all modes.
Show child attributes
Show child attributes
Escalate the conversation for service or sentiment reasons. Valid for all modes.
Show child attributes
Show child attributes
Use for copilot and human_first. Omit for autopilot. For copilot, do not send after_hours. For human_first, after_hours must be voicemail, closed, or an agent uuid.
Show child attributes
Show child attributes
Response
Assignment updated