curl --request POST \
--url https://api.conduit.ai/v1/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "j57demo8f8x7c9v0n2q4r6t8y1u3i5o",
"name": "Reservations",
"description": "Handles booking and cancellation flows.",
"color": "#2563EB",
"icon_id": 12,
"instructions": "Answer booking questions, use policies before escalating, and keep replies concise.",
"guardrails": [
{
"title": "Do not promise refunds",
"knowledge": "Only cite refund terms from approved policy docs or escalate."
}
],
"skill_ids": [
"ks77c0dy0mgdpzmqz6tesry8w184002s"
],
"operation_mode": "autopilot",
"response_language": "English",
"responseflow": true,
"custom_response_delay_ms": 10000,
"auto_mark_as_done": false,
"output_schema": [
{
"name": "resolution",
"description": "Short summary of the final outcome.",
"type": "string",
"is_required": true
}
],
"triggers": [
{
"name": "All Messages",
"description": "Runs for every inbound message.",
"type": "message",
"config": {
"scopeType": "all"
},
"enabled": true
},
{
"name": "Contact Inbox",
"description": "Runs only for contact-type inbox messages.",
"type": "message",
"config": {
"scopeType": "inbox",
"inboxTypeId": "guest"
},
"enabled": true
}
]
}
'import requests
url = "https://api.conduit.ai/v1/agents"
payload = {
"workspace_id": "j57demo8f8x7c9v0n2q4r6t8y1u3i5o",
"name": "Reservations",
"description": "Handles booking and cancellation flows.",
"color": "#2563EB",
"icon_id": 12,
"instructions": "Answer booking questions, use policies before escalating, and keep replies concise.",
"guardrails": [
{
"title": "Do not promise refunds",
"knowledge": "Only cite refund terms from approved policy docs or escalate."
}
],
"skill_ids": ["ks77c0dy0mgdpzmqz6tesry8w184002s"],
"operation_mode": "autopilot",
"response_language": "English",
"responseflow": True,
"custom_response_delay_ms": 10000,
"auto_mark_as_done": False,
"output_schema": [
{
"name": "resolution",
"description": "Short summary of the final outcome.",
"type": "string",
"is_required": True
}
],
"triggers": [
{
"name": "All Messages",
"description": "Runs for every inbound message.",
"type": "message",
"config": { "scopeType": "all" },
"enabled": True
},
{
"name": "Contact Inbox",
"description": "Runs only for contact-type inbox messages.",
"type": "message",
"config": {
"scopeType": "inbox",
"inboxTypeId": "guest"
},
"enabled": True
}
]
}
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({
workspace_id: 'j57demo8f8x7c9v0n2q4r6t8y1u3i5o',
name: 'Reservations',
description: 'Handles booking and cancellation flows.',
color: '#2563EB',
icon_id: 12,
instructions: 'Answer booking questions, use policies before escalating, and keep replies concise.',
guardrails: [
{
title: 'Do not promise refunds',
knowledge: 'Only cite refund terms from approved policy docs or escalate.'
}
],
skill_ids: ['ks77c0dy0mgdpzmqz6tesry8w184002s'],
operation_mode: 'autopilot',
response_language: 'English',
responseflow: true,
custom_response_delay_ms: 10000,
auto_mark_as_done: false,
output_schema: [
{
name: 'resolution',
description: 'Short summary of the final outcome.',
type: 'string',
is_required: true
}
],
triggers: [
{
name: 'All Messages',
description: 'Runs for every inbound message.',
type: 'message',
config: {scopeType: 'all'},
enabled: true
},
{
name: 'Contact Inbox',
description: 'Runs only for contact-type inbox messages.',
type: 'message',
config: {scopeType: 'inbox', inboxTypeId: 'guest'},
enabled: true
}
]
})
};
fetch('https://api.conduit.ai/v1/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://api.conduit.ai/v1/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([
'workspace_id' => 'j57demo8f8x7c9v0n2q4r6t8y1u3i5o',
'name' => 'Reservations',
'description' => 'Handles booking and cancellation flows.',
'color' => '#2563EB',
'icon_id' => 12,
'instructions' => 'Answer booking questions, use policies before escalating, and keep replies concise.',
'guardrails' => [
[
'title' => 'Do not promise refunds',
'knowledge' => 'Only cite refund terms from approved policy docs or escalate.'
]
],
'skill_ids' => [
'ks77c0dy0mgdpzmqz6tesry8w184002s'
],
'operation_mode' => 'autopilot',
'response_language' => 'English',
'responseflow' => true,
'custom_response_delay_ms' => 10000,
'auto_mark_as_done' => false,
'output_schema' => [
[
'name' => 'resolution',
'description' => 'Short summary of the final outcome.',
'type' => 'string',
'is_required' => true
]
],
'triggers' => [
[
'name' => 'All Messages',
'description' => 'Runs for every inbound message.',
'type' => 'message',
'config' => [
'scopeType' => 'all'
],
'enabled' => true
],
[
'name' => 'Contact Inbox',
'description' => 'Runs only for contact-type inbox messages.',
'type' => 'message',
'config' => [
'scopeType' => 'inbox',
'inboxTypeId' => 'guest'
],
'enabled' => true
]
]
]),
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://api.conduit.ai/v1/agents"
payload := strings.NewReader("{\n \"workspace_id\": \"j57demo8f8x7c9v0n2q4r6t8y1u3i5o\",\n \"name\": \"Reservations\",\n \"description\": \"Handles booking and cancellation flows.\",\n \"color\": \"#2563EB\",\n \"icon_id\": 12,\n \"instructions\": \"Answer booking questions, use policies before escalating, and keep replies concise.\",\n \"guardrails\": [\n {\n \"title\": \"Do not promise refunds\",\n \"knowledge\": \"Only cite refund terms from approved policy docs or escalate.\"\n }\n ],\n \"skill_ids\": [\n \"ks77c0dy0mgdpzmqz6tesry8w184002s\"\n ],\n \"operation_mode\": \"autopilot\",\n \"response_language\": \"English\",\n \"responseflow\": true,\n \"custom_response_delay_ms\": 10000,\n \"auto_mark_as_done\": false,\n \"output_schema\": [\n {\n \"name\": \"resolution\",\n \"description\": \"Short summary of the final outcome.\",\n \"type\": \"string\",\n \"is_required\": true\n }\n ],\n \"triggers\": [\n {\n \"name\": \"All Messages\",\n \"description\": \"Runs for every inbound message.\",\n \"type\": \"message\",\n \"config\": {\n \"scopeType\": \"all\"\n },\n \"enabled\": true\n },\n {\n \"name\": \"Contact Inbox\",\n \"description\": \"Runs only for contact-type inbox messages.\",\n \"type\": \"message\",\n \"config\": {\n \"scopeType\": \"inbox\",\n \"inboxTypeId\": \"guest\"\n },\n \"enabled\": true\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://api.conduit.ai/v1/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspace_id\": \"j57demo8f8x7c9v0n2q4r6t8y1u3i5o\",\n \"name\": \"Reservations\",\n \"description\": \"Handles booking and cancellation flows.\",\n \"color\": \"#2563EB\",\n \"icon_id\": 12,\n \"instructions\": \"Answer booking questions, use policies before escalating, and keep replies concise.\",\n \"guardrails\": [\n {\n \"title\": \"Do not promise refunds\",\n \"knowledge\": \"Only cite refund terms from approved policy docs or escalate.\"\n }\n ],\n \"skill_ids\": [\n \"ks77c0dy0mgdpzmqz6tesry8w184002s\"\n ],\n \"operation_mode\": \"autopilot\",\n \"response_language\": \"English\",\n \"responseflow\": true,\n \"custom_response_delay_ms\": 10000,\n \"auto_mark_as_done\": false,\n \"output_schema\": [\n {\n \"name\": \"resolution\",\n \"description\": \"Short summary of the final outcome.\",\n \"type\": \"string\",\n \"is_required\": true\n }\n ],\n \"triggers\": [\n {\n \"name\": \"All Messages\",\n \"description\": \"Runs for every inbound message.\",\n \"type\": \"message\",\n \"config\": {\n \"scopeType\": \"all\"\n },\n \"enabled\": true\n },\n {\n \"name\": \"Contact Inbox\",\n \"description\": \"Runs only for contact-type inbox messages.\",\n \"type\": \"message\",\n \"config\": {\n \"scopeType\": \"inbox\",\n \"inboxTypeId\": \"guest\"\n },\n \"enabled\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conduit.ai/v1/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 \"workspace_id\": \"j57demo8f8x7c9v0n2q4r6t8y1u3i5o\",\n \"name\": \"Reservations\",\n \"description\": \"Handles booking and cancellation flows.\",\n \"color\": \"#2563EB\",\n \"icon_id\": 12,\n \"instructions\": \"Answer booking questions, use policies before escalating, and keep replies concise.\",\n \"guardrails\": [\n {\n \"title\": \"Do not promise refunds\",\n \"knowledge\": \"Only cite refund terms from approved policy docs or escalate.\"\n }\n ],\n \"skill_ids\": [\n \"ks77c0dy0mgdpzmqz6tesry8w184002s\"\n ],\n \"operation_mode\": \"autopilot\",\n \"response_language\": \"English\",\n \"responseflow\": true,\n \"custom_response_delay_ms\": 10000,\n \"auto_mark_as_done\": false,\n \"output_schema\": [\n {\n \"name\": \"resolution\",\n \"description\": \"Short summary of the final outcome.\",\n \"type\": \"string\",\n \"is_required\": true\n }\n ],\n \"triggers\": [\n {\n \"name\": \"All Messages\",\n \"description\": \"Runs for every inbound message.\",\n \"type\": \"message\",\n \"config\": {\n \"scopeType\": \"all\"\n },\n \"enabled\": true\n },\n {\n \"name\": \"Contact Inbox\",\n \"description\": \"Runs only for contact-type inbox messages.\",\n \"type\": \"message\",\n \"config\": {\n \"scopeType\": \"inbox\",\n \"inboxTypeId\": \"guest\"\n },\n \"enabled\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "ag77c0dy0mgdpzmqz6tesry8w184002s",
"workspace_id": "j57demo8f8x7c9v0n2q4r6t8y1u3i5o",
"name": "Reservations",
"description": "Handles booking and cancellation flows.",
"color": "#2563EB",
"icon_id": 12,
"version": "v2",
"instructions": "Answer booking questions, use policies before escalating, and keep replies concise.",
"model": "default",
"guardrails": [
{
"id": "guardrail_1",
"title": "Do not promise refunds",
"knowledge": "Only cite refund terms from approved policy docs or escalate."
}
],
"operation_mode": "autopilot",
"autopilot_schedule": null,
"custom_response_delay_ms": 10000,
"auto_mark_as_done": false,
"response_language": "English",
"responseflow": true,
"output_schema": [
{
"name": "resolution",
"description": "Short summary of the final outcome.",
"type": "string",
"is_required": true
}
],
"skill_ids": [
"ks77c0dy0mgdpzmqz6tesry8w184002s"
],
"connection_ids": [
"cn77c0dy0mgdpzmqz6tesry8w184002s"
],
"enabled": true,
"triggers": [
{
"id": "tr77c0dy0mgdpzmqz6tesry8w184002s",
"workspace_id": "j57demo8f8x7c9v0n2q4r6t8y1u3i5o",
"name": "All Messages",
"description": "Runs for every inbound message.",
"type": "message",
"config": {
"scopeType": "all"
},
"enabled": true,
"created_at": "2026-04-01T17:22:10.000Z",
"updated_at": "2026-04-03T03:14:15.000Z"
},
{
"id": "tr88c0dy0mgdpzmqz6tesry8w184003s",
"workspace_id": "j57demo8f8x7c9v0n2q4r6t8y1u3i5o",
"name": "Contact Inbox",
"description": "Runs only for contact-type inbox messages.",
"type": "message",
"config": {
"scopeType": "inbox",
"inboxTypeId": "guest"
},
"enabled": true,
"created_at": "2026-04-01T17:22:10.000Z",
"updated_at": "2026-04-03T03:14:15.000Z"
},
{
"id": "tr99c0dy0mgdpzmqz6tesry8w184004s",
"workspace_id": "j57demo8f8x7c9v0n2q4r6t8y1u3i5o",
"name": "SMS Channel",
"description": "Runs only for SMS channel messages.",
"type": "message",
"config": {
"scopeType": "channel",
"channelType": "sms"
},
"enabled": true,
"created_at": "2026-04-01T17:22:10.000Z",
"updated_at": "2026-04-03T03:14:15.000Z"
}
],
"created_at": "2026-04-01T17:22:10.000Z",
"updated_at": "2026-04-03T03:14:15.000Z"
}
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}Create Agent
Creates a V2 chat agent and its initial trigger set. Requires a token with write access.
curl --request POST \
--url https://api.conduit.ai/v1/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "j57demo8f8x7c9v0n2q4r6t8y1u3i5o",
"name": "Reservations",
"description": "Handles booking and cancellation flows.",
"color": "#2563EB",
"icon_id": 12,
"instructions": "Answer booking questions, use policies before escalating, and keep replies concise.",
"guardrails": [
{
"title": "Do not promise refunds",
"knowledge": "Only cite refund terms from approved policy docs or escalate."
}
],
"skill_ids": [
"ks77c0dy0mgdpzmqz6tesry8w184002s"
],
"operation_mode": "autopilot",
"response_language": "English",
"responseflow": true,
"custom_response_delay_ms": 10000,
"auto_mark_as_done": false,
"output_schema": [
{
"name": "resolution",
"description": "Short summary of the final outcome.",
"type": "string",
"is_required": true
}
],
"triggers": [
{
"name": "All Messages",
"description": "Runs for every inbound message.",
"type": "message",
"config": {
"scopeType": "all"
},
"enabled": true
},
{
"name": "Contact Inbox",
"description": "Runs only for contact-type inbox messages.",
"type": "message",
"config": {
"scopeType": "inbox",
"inboxTypeId": "guest"
},
"enabled": true
}
]
}
'import requests
url = "https://api.conduit.ai/v1/agents"
payload = {
"workspace_id": "j57demo8f8x7c9v0n2q4r6t8y1u3i5o",
"name": "Reservations",
"description": "Handles booking and cancellation flows.",
"color": "#2563EB",
"icon_id": 12,
"instructions": "Answer booking questions, use policies before escalating, and keep replies concise.",
"guardrails": [
{
"title": "Do not promise refunds",
"knowledge": "Only cite refund terms from approved policy docs or escalate."
}
],
"skill_ids": ["ks77c0dy0mgdpzmqz6tesry8w184002s"],
"operation_mode": "autopilot",
"response_language": "English",
"responseflow": True,
"custom_response_delay_ms": 10000,
"auto_mark_as_done": False,
"output_schema": [
{
"name": "resolution",
"description": "Short summary of the final outcome.",
"type": "string",
"is_required": True
}
],
"triggers": [
{
"name": "All Messages",
"description": "Runs for every inbound message.",
"type": "message",
"config": { "scopeType": "all" },
"enabled": True
},
{
"name": "Contact Inbox",
"description": "Runs only for contact-type inbox messages.",
"type": "message",
"config": {
"scopeType": "inbox",
"inboxTypeId": "guest"
},
"enabled": True
}
]
}
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({
workspace_id: 'j57demo8f8x7c9v0n2q4r6t8y1u3i5o',
name: 'Reservations',
description: 'Handles booking and cancellation flows.',
color: '#2563EB',
icon_id: 12,
instructions: 'Answer booking questions, use policies before escalating, and keep replies concise.',
guardrails: [
{
title: 'Do not promise refunds',
knowledge: 'Only cite refund terms from approved policy docs or escalate.'
}
],
skill_ids: ['ks77c0dy0mgdpzmqz6tesry8w184002s'],
operation_mode: 'autopilot',
response_language: 'English',
responseflow: true,
custom_response_delay_ms: 10000,
auto_mark_as_done: false,
output_schema: [
{
name: 'resolution',
description: 'Short summary of the final outcome.',
type: 'string',
is_required: true
}
],
triggers: [
{
name: 'All Messages',
description: 'Runs for every inbound message.',
type: 'message',
config: {scopeType: 'all'},
enabled: true
},
{
name: 'Contact Inbox',
description: 'Runs only for contact-type inbox messages.',
type: 'message',
config: {scopeType: 'inbox', inboxTypeId: 'guest'},
enabled: true
}
]
})
};
fetch('https://api.conduit.ai/v1/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://api.conduit.ai/v1/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([
'workspace_id' => 'j57demo8f8x7c9v0n2q4r6t8y1u3i5o',
'name' => 'Reservations',
'description' => 'Handles booking and cancellation flows.',
'color' => '#2563EB',
'icon_id' => 12,
'instructions' => 'Answer booking questions, use policies before escalating, and keep replies concise.',
'guardrails' => [
[
'title' => 'Do not promise refunds',
'knowledge' => 'Only cite refund terms from approved policy docs or escalate.'
]
],
'skill_ids' => [
'ks77c0dy0mgdpzmqz6tesry8w184002s'
],
'operation_mode' => 'autopilot',
'response_language' => 'English',
'responseflow' => true,
'custom_response_delay_ms' => 10000,
'auto_mark_as_done' => false,
'output_schema' => [
[
'name' => 'resolution',
'description' => 'Short summary of the final outcome.',
'type' => 'string',
'is_required' => true
]
],
'triggers' => [
[
'name' => 'All Messages',
'description' => 'Runs for every inbound message.',
'type' => 'message',
'config' => [
'scopeType' => 'all'
],
'enabled' => true
],
[
'name' => 'Contact Inbox',
'description' => 'Runs only for contact-type inbox messages.',
'type' => 'message',
'config' => [
'scopeType' => 'inbox',
'inboxTypeId' => 'guest'
],
'enabled' => true
]
]
]),
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://api.conduit.ai/v1/agents"
payload := strings.NewReader("{\n \"workspace_id\": \"j57demo8f8x7c9v0n2q4r6t8y1u3i5o\",\n \"name\": \"Reservations\",\n \"description\": \"Handles booking and cancellation flows.\",\n \"color\": \"#2563EB\",\n \"icon_id\": 12,\n \"instructions\": \"Answer booking questions, use policies before escalating, and keep replies concise.\",\n \"guardrails\": [\n {\n \"title\": \"Do not promise refunds\",\n \"knowledge\": \"Only cite refund terms from approved policy docs or escalate.\"\n }\n ],\n \"skill_ids\": [\n \"ks77c0dy0mgdpzmqz6tesry8w184002s\"\n ],\n \"operation_mode\": \"autopilot\",\n \"response_language\": \"English\",\n \"responseflow\": true,\n \"custom_response_delay_ms\": 10000,\n \"auto_mark_as_done\": false,\n \"output_schema\": [\n {\n \"name\": \"resolution\",\n \"description\": \"Short summary of the final outcome.\",\n \"type\": \"string\",\n \"is_required\": true\n }\n ],\n \"triggers\": [\n {\n \"name\": \"All Messages\",\n \"description\": \"Runs for every inbound message.\",\n \"type\": \"message\",\n \"config\": {\n \"scopeType\": \"all\"\n },\n \"enabled\": true\n },\n {\n \"name\": \"Contact Inbox\",\n \"description\": \"Runs only for contact-type inbox messages.\",\n \"type\": \"message\",\n \"config\": {\n \"scopeType\": \"inbox\",\n \"inboxTypeId\": \"guest\"\n },\n \"enabled\": true\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://api.conduit.ai/v1/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspace_id\": \"j57demo8f8x7c9v0n2q4r6t8y1u3i5o\",\n \"name\": \"Reservations\",\n \"description\": \"Handles booking and cancellation flows.\",\n \"color\": \"#2563EB\",\n \"icon_id\": 12,\n \"instructions\": \"Answer booking questions, use policies before escalating, and keep replies concise.\",\n \"guardrails\": [\n {\n \"title\": \"Do not promise refunds\",\n \"knowledge\": \"Only cite refund terms from approved policy docs or escalate.\"\n }\n ],\n \"skill_ids\": [\n \"ks77c0dy0mgdpzmqz6tesry8w184002s\"\n ],\n \"operation_mode\": \"autopilot\",\n \"response_language\": \"English\",\n \"responseflow\": true,\n \"custom_response_delay_ms\": 10000,\n \"auto_mark_as_done\": false,\n \"output_schema\": [\n {\n \"name\": \"resolution\",\n \"description\": \"Short summary of the final outcome.\",\n \"type\": \"string\",\n \"is_required\": true\n }\n ],\n \"triggers\": [\n {\n \"name\": \"All Messages\",\n \"description\": \"Runs for every inbound message.\",\n \"type\": \"message\",\n \"config\": {\n \"scopeType\": \"all\"\n },\n \"enabled\": true\n },\n {\n \"name\": \"Contact Inbox\",\n \"description\": \"Runs only for contact-type inbox messages.\",\n \"type\": \"message\",\n \"config\": {\n \"scopeType\": \"inbox\",\n \"inboxTypeId\": \"guest\"\n },\n \"enabled\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conduit.ai/v1/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 \"workspace_id\": \"j57demo8f8x7c9v0n2q4r6t8y1u3i5o\",\n \"name\": \"Reservations\",\n \"description\": \"Handles booking and cancellation flows.\",\n \"color\": \"#2563EB\",\n \"icon_id\": 12,\n \"instructions\": \"Answer booking questions, use policies before escalating, and keep replies concise.\",\n \"guardrails\": [\n {\n \"title\": \"Do not promise refunds\",\n \"knowledge\": \"Only cite refund terms from approved policy docs or escalate.\"\n }\n ],\n \"skill_ids\": [\n \"ks77c0dy0mgdpzmqz6tesry8w184002s\"\n ],\n \"operation_mode\": \"autopilot\",\n \"response_language\": \"English\",\n \"responseflow\": true,\n \"custom_response_delay_ms\": 10000,\n \"auto_mark_as_done\": false,\n \"output_schema\": [\n {\n \"name\": \"resolution\",\n \"description\": \"Short summary of the final outcome.\",\n \"type\": \"string\",\n \"is_required\": true\n }\n ],\n \"triggers\": [\n {\n \"name\": \"All Messages\",\n \"description\": \"Runs for every inbound message.\",\n \"type\": \"message\",\n \"config\": {\n \"scopeType\": \"all\"\n },\n \"enabled\": true\n },\n {\n \"name\": \"Contact Inbox\",\n \"description\": \"Runs only for contact-type inbox messages.\",\n \"type\": \"message\",\n \"config\": {\n \"scopeType\": \"inbox\",\n \"inboxTypeId\": \"guest\"\n },\n \"enabled\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "ag77c0dy0mgdpzmqz6tesry8w184002s",
"workspace_id": "j57demo8f8x7c9v0n2q4r6t8y1u3i5o",
"name": "Reservations",
"description": "Handles booking and cancellation flows.",
"color": "#2563EB",
"icon_id": 12,
"version": "v2",
"instructions": "Answer booking questions, use policies before escalating, and keep replies concise.",
"model": "default",
"guardrails": [
{
"id": "guardrail_1",
"title": "Do not promise refunds",
"knowledge": "Only cite refund terms from approved policy docs or escalate."
}
],
"operation_mode": "autopilot",
"autopilot_schedule": null,
"custom_response_delay_ms": 10000,
"auto_mark_as_done": false,
"response_language": "English",
"responseflow": true,
"output_schema": [
{
"name": "resolution",
"description": "Short summary of the final outcome.",
"type": "string",
"is_required": true
}
],
"skill_ids": [
"ks77c0dy0mgdpzmqz6tesry8w184002s"
],
"connection_ids": [
"cn77c0dy0mgdpzmqz6tesry8w184002s"
],
"enabled": true,
"triggers": [
{
"id": "tr77c0dy0mgdpzmqz6tesry8w184002s",
"workspace_id": "j57demo8f8x7c9v0n2q4r6t8y1u3i5o",
"name": "All Messages",
"description": "Runs for every inbound message.",
"type": "message",
"config": {
"scopeType": "all"
},
"enabled": true,
"created_at": "2026-04-01T17:22:10.000Z",
"updated_at": "2026-04-03T03:14:15.000Z"
},
{
"id": "tr88c0dy0mgdpzmqz6tesry8w184003s",
"workspace_id": "j57demo8f8x7c9v0n2q4r6t8y1u3i5o",
"name": "Contact Inbox",
"description": "Runs only for contact-type inbox messages.",
"type": "message",
"config": {
"scopeType": "inbox",
"inboxTypeId": "guest"
},
"enabled": true,
"created_at": "2026-04-01T17:22:10.000Z",
"updated_at": "2026-04-03T03:14:15.000Z"
},
{
"id": "tr99c0dy0mgdpzmqz6tesry8w184004s",
"workspace_id": "j57demo8f8x7c9v0n2q4r6t8y1u3i5o",
"name": "SMS Channel",
"description": "Runs only for SMS channel messages.",
"type": "message",
"config": {
"scopeType": "channel",
"channelType": "sms"
},
"enabled": true,
"created_at": "2026-04-01T17:22:10.000Z",
"updated_at": "2026-04-03T03:14:15.000Z"
}
],
"created_at": "2026-04-01T17:22:10.000Z",
"updated_at": "2026-04-03T03:14:15.000Z"
}
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}Authorizations
Conduit API token. Use Authorization: Bearer <token>. Read/write endpoints require a token with write access.
Body
Request body for creating a V2 chat agent with one or more triggers.
11- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Show child attributes
Show child attributes
11x >= 01Override the LLM this agent runs on. Must be a model_string from GET /v1/models (MCP: list_supported_models), e.g. openai:gpt-4o. Omit to leave unchanged; send null to reset to the workspace default. Reads return the configured value, or default when none is set.
1Show child attributes
Show child attributes
autopilot, copilot, inactive Autopilot schedule. Autopilot only sends inside the enabled day windows; outside them the agent falls back to copilot. Omit or set null for always-on autopilot.
Show child attributes
Show child attributes
x >= 0English, Original, Spanish, French, German, Italian, Portuguese Show child attributes
Show child attributes
Response
Agent created
Single V2 chat agent response.
Show child attributes
Show child attributes
Was this page helpful?