curl --request PATCH \
--url https://api.orbit.devotel.io/api/v1/inbox/agent-scripts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"channels": [],
"enabled": true,
"start_step_id": "<string>",
"steps": [
{
"step_id": "<string>",
"body": "<string>",
"title": "<string>",
"options": [
{
"label": "<string>",
"next_step_id": "<string>"
}
]
}
]
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/inbox/agent-scripts/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"channels": [],
"enabled": True,
"start_step_id": "<string>",
"steps": [
{
"step_id": "<string>",
"body": "<string>",
"title": "<string>",
"options": [
{
"label": "<string>",
"next_step_id": "<string>"
}
]
}
]
}
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({
name: '<string>',
description: '<string>',
channels: [],
enabled: true,
start_step_id: '<string>',
steps: [
{
step_id: '<string>',
body: JSON.stringify('<string>'),
title: '<string>',
options: [{label: '<string>', next_step_id: '<string>'}]
}
]
})
};
fetch('https://api.orbit.devotel.io/api/v1/inbox/agent-scripts/{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.orbit.devotel.io/api/v1/inbox/agent-scripts/{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([
'name' => '<string>',
'description' => '<string>',
'channels' => [
],
'enabled' => true,
'start_step_id' => '<string>',
'steps' => [
[
'step_id' => '<string>',
'body' => '<string>',
'title' => '<string>',
'options' => [
[
'label' => '<string>',
'next_step_id' => '<string>'
]
]
]
]
]),
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.orbit.devotel.io/api/v1/inbox/agent-scripts/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"channels\": [],\n \"enabled\": true,\n \"start_step_id\": \"<string>\",\n \"steps\": [\n {\n \"step_id\": \"<string>\",\n \"body\": \"<string>\",\n \"title\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"next_step_id\": \"<string>\"\n }\n ]\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.orbit.devotel.io/api/v1/inbox/agent-scripts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"channels\": [],\n \"enabled\": true,\n \"start_step_id\": \"<string>\",\n \"steps\": [\n {\n \"step_id\": \"<string>\",\n \"body\": \"<string>\",\n \"title\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"next_step_id\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/inbox/agent-scripts/{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 \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"channels\": [],\n \"enabled\": true,\n \"start_step_id\": \"<string>\",\n \"steps\": [\n {\n \"step_id\": \"<string>\",\n \"body\": \"<string>\",\n \"title\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"next_step_id\": \"<string>\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyUpdate a guided agent script
Updates a guided agent script’s metadata and/or fully replaces its step graph. Every field is optional, but the body must contain at least one. Supplying steps replaces the whole graph and re-validates every branch reference and the start step. Bumps the script version. Owner / admin only.
curl --request PATCH \
--url https://api.orbit.devotel.io/api/v1/inbox/agent-scripts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"channels": [],
"enabled": true,
"start_step_id": "<string>",
"steps": [
{
"step_id": "<string>",
"body": "<string>",
"title": "<string>",
"options": [
{
"label": "<string>",
"next_step_id": "<string>"
}
]
}
]
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/inbox/agent-scripts/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"channels": [],
"enabled": True,
"start_step_id": "<string>",
"steps": [
{
"step_id": "<string>",
"body": "<string>",
"title": "<string>",
"options": [
{
"label": "<string>",
"next_step_id": "<string>"
}
]
}
]
}
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({
name: '<string>',
description: '<string>',
channels: [],
enabled: true,
start_step_id: '<string>',
steps: [
{
step_id: '<string>',
body: JSON.stringify('<string>'),
title: '<string>',
options: [{label: '<string>', next_step_id: '<string>'}]
}
]
})
};
fetch('https://api.orbit.devotel.io/api/v1/inbox/agent-scripts/{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.orbit.devotel.io/api/v1/inbox/agent-scripts/{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([
'name' => '<string>',
'description' => '<string>',
'channels' => [
],
'enabled' => true,
'start_step_id' => '<string>',
'steps' => [
[
'step_id' => '<string>',
'body' => '<string>',
'title' => '<string>',
'options' => [
[
'label' => '<string>',
'next_step_id' => '<string>'
]
]
]
]
]),
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.orbit.devotel.io/api/v1/inbox/agent-scripts/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"channels\": [],\n \"enabled\": true,\n \"start_step_id\": \"<string>\",\n \"steps\": [\n {\n \"step_id\": \"<string>\",\n \"body\": \"<string>\",\n \"title\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"next_step_id\": \"<string>\"\n }\n ]\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.orbit.devotel.io/api/v1/inbox/agent-scripts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"channels\": [],\n \"enabled\": true,\n \"start_step_id\": \"<string>\",\n \"steps\": [\n {\n \"step_id\": \"<string>\",\n \"body\": \"<string>\",\n \"title\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"next_step_id\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/inbox/agent-scripts/{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 \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"channels\": [],\n \"enabled\": true,\n \"start_step_id\": \"<string>\",\n \"steps\": [\n {\n \"step_id\": \"<string>\",\n \"body\": \"<string>\",\n \"title\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"next_step_id\": \"<string>\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Dashboard JWT token from Clerk
Path Parameters
Body
Human-readable script name (1–120 chars).
Author-facing description (≤ 4000 chars). Send null to clear.
Digital channels this script targets. Empty or omitted ⇒ every digital channel.
email, web_chat, whatsapp, sms, rcs, viber, instagram, messenger, line, telegram, apple_messages Whether the script is active in the agent console. Defaults to true.
step_id the console starts at. Defaults to the first step when omitted.
The script's step graph (≤ 500 steps). Each step has a step_id, kind (prompt | question | note | disposition), body, and optional branch options pointing to the next step_id.
Show child attributes
Show child attributes
Response
Default Response