Update network
curl --request PATCH \
--url https://api.sidenet.ai/v1/copilots/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agents": [
{
"agentId": "6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10"
}
],
"workflows": [
{
"workflowId": "4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641"
}
],
"sdk_ui": {
"theme": "light",
"title": "Acme support"
},
"handoff_prompt": "Route billing questions to the support agent.",
"followup_instructions": [
{
"type": "text",
"content": "Offer the order-status workflow."
}
]
}
'import requests
url = "https://api.sidenet.ai/v1/copilots/{id}"
payload = {
"agents": [{ "agentId": "6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10" }],
"workflows": [{ "workflowId": "4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641" }],
"sdk_ui": {
"theme": "light",
"title": "Acme support"
},
"handoff_prompt": "Route billing questions to the support agent.",
"followup_instructions": [
{
"type": "text",
"content": "Offer the order-status workflow."
}
]
}
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({
agents: [{agentId: '6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10'}],
workflows: [{workflowId: '4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641'}],
sdk_ui: {theme: 'light', title: 'Acme support'},
handoff_prompt: 'Route billing questions to the support agent.',
followup_instructions: [{type: 'text', content: 'Offer the order-status workflow.'}]
})
};
fetch('https://api.sidenet.ai/v1/copilots/{id}', 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.sidenet.ai/v1/copilots/{id}",
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([
'agents' => [
[
'agentId' => '6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10'
]
],
'workflows' => [
[
'workflowId' => '4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641'
]
],
'sdk_ui' => [
'theme' => 'light',
'title' => 'Acme support'
],
'handoff_prompt' => 'Route billing questions to the support agent.',
'followup_instructions' => [
[
'type' => 'text',
'content' => 'Offer the order-status workflow.'
]
]
]),
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.sidenet.ai/v1/copilots/{id}"
payload := strings.NewReader("{\n \"agents\": [\n {\n \"agentId\": \"6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10\"\n }\n ],\n \"workflows\": [\n {\n \"workflowId\": \"4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641\"\n }\n ],\n \"sdk_ui\": {\n \"theme\": \"light\",\n \"title\": \"Acme support\"\n },\n \"handoff_prompt\": \"Route billing questions to the support agent.\",\n \"followup_instructions\": [\n {\n \"type\": \"text\",\n \"content\": \"Offer the order-status workflow.\"\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://api.sidenet.ai/v1/copilots/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agents\": [\n {\n \"agentId\": \"6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10\"\n }\n ],\n \"workflows\": [\n {\n \"workflowId\": \"4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641\"\n }\n ],\n \"sdk_ui\": {\n \"theme\": \"light\",\n \"title\": \"Acme support\"\n },\n \"handoff_prompt\": \"Route billing questions to the support agent.\",\n \"followup_instructions\": [\n {\n \"type\": \"text\",\n \"content\": \"Offer the order-status workflow.\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sidenet.ai/v1/copilots/{id}")
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 \"agents\": [\n {\n \"agentId\": \"6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10\"\n }\n ],\n \"workflows\": [\n {\n \"workflowId\": \"4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641\"\n }\n ],\n \"sdk_ui\": {\n \"theme\": \"light\",\n \"title\": \"Acme support\"\n },\n \"handoff_prompt\": \"Route billing questions to the support agent.\",\n \"followup_instructions\": [\n {\n \"type\": \"text\",\n \"content\": \"Offer the order-status workflow.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"copilot": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agents": [
{}
],
"workflows": [
{}
],
"sdk_ui": {},
"handoff_prompt": "<string>",
"followup_instructions": [
{}
]
}
}Networks
Update network
Replaces whichever of agents ([]), workflows ([]), or sdk_ui is provided. Validates that every referenced agent/workflow belongs to the caller’s org. Dev networks only: a staging or prod network returns 409 — edit its dev network and promote it with POST /v1/copilots//deploy.
PATCH
/
v1
/
copilots
/
{id}
Update network
curl --request PATCH \
--url https://api.sidenet.ai/v1/copilots/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agents": [
{
"agentId": "6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10"
}
],
"workflows": [
{
"workflowId": "4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641"
}
],
"sdk_ui": {
"theme": "light",
"title": "Acme support"
},
"handoff_prompt": "Route billing questions to the support agent.",
"followup_instructions": [
{
"type": "text",
"content": "Offer the order-status workflow."
}
]
}
'import requests
url = "https://api.sidenet.ai/v1/copilots/{id}"
payload = {
"agents": [{ "agentId": "6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10" }],
"workflows": [{ "workflowId": "4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641" }],
"sdk_ui": {
"theme": "light",
"title": "Acme support"
},
"handoff_prompt": "Route billing questions to the support agent.",
"followup_instructions": [
{
"type": "text",
"content": "Offer the order-status workflow."
}
]
}
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({
agents: [{agentId: '6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10'}],
workflows: [{workflowId: '4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641'}],
sdk_ui: {theme: 'light', title: 'Acme support'},
handoff_prompt: 'Route billing questions to the support agent.',
followup_instructions: [{type: 'text', content: 'Offer the order-status workflow.'}]
})
};
fetch('https://api.sidenet.ai/v1/copilots/{id}', 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.sidenet.ai/v1/copilots/{id}",
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([
'agents' => [
[
'agentId' => '6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10'
]
],
'workflows' => [
[
'workflowId' => '4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641'
]
],
'sdk_ui' => [
'theme' => 'light',
'title' => 'Acme support'
],
'handoff_prompt' => 'Route billing questions to the support agent.',
'followup_instructions' => [
[
'type' => 'text',
'content' => 'Offer the order-status workflow.'
]
]
]),
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.sidenet.ai/v1/copilots/{id}"
payload := strings.NewReader("{\n \"agents\": [\n {\n \"agentId\": \"6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10\"\n }\n ],\n \"workflows\": [\n {\n \"workflowId\": \"4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641\"\n }\n ],\n \"sdk_ui\": {\n \"theme\": \"light\",\n \"title\": \"Acme support\"\n },\n \"handoff_prompt\": \"Route billing questions to the support agent.\",\n \"followup_instructions\": [\n {\n \"type\": \"text\",\n \"content\": \"Offer the order-status workflow.\"\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://api.sidenet.ai/v1/copilots/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agents\": [\n {\n \"agentId\": \"6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10\"\n }\n ],\n \"workflows\": [\n {\n \"workflowId\": \"4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641\"\n }\n ],\n \"sdk_ui\": {\n \"theme\": \"light\",\n \"title\": \"Acme support\"\n },\n \"handoff_prompt\": \"Route billing questions to the support agent.\",\n \"followup_instructions\": [\n {\n \"type\": \"text\",\n \"content\": \"Offer the order-status workflow.\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sidenet.ai/v1/copilots/{id}")
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 \"agents\": [\n {\n \"agentId\": \"6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10\"\n }\n ],\n \"workflows\": [\n {\n \"workflowId\": \"4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641\"\n }\n ],\n \"sdk_ui\": {\n \"theme\": \"light\",\n \"title\": \"Acme support\"\n },\n \"handoff_prompt\": \"Route billing questions to the support agent.\",\n \"followup_instructions\": [\n {\n \"type\": \"text\",\n \"content\": \"Offer the order-status workflow.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"copilot": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agents": [
{}
],
"workflows": [
{}
],
"sdk_ui": {},
"handoff_prompt": "<string>",
"followup_instructions": [
{}
]
}
}Authorizations
Organization API key, generated in studio.sidenet.ai. Backend only — never in a browser.
Path Parameters
Example:
"a5e91c07-3f24-4b68-9d15-8c72e0b4a396"
Body
application/json
REPLACES the attached agents. Order is routing order.
Show child attributes
Show child attributes
Example:
[
{
"agentId": "6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10"
}
]
REPLACES the attached workflows.
Show child attributes
Show child attributes
Example:
[
{
"workflowId": "4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641"
}
]
Chat-widget configuration. REPLACES the stored value.
Example:
{ "theme": "light", "title": "Acme support" }
Example:
"Route billing questions to the support agent."
Example:
[
{
"type": "text",
"content": "Offer the order-status workflow."
}
]
Response
The network after the update
Show child attributes
Show child attributes