curl --request PATCH \
--url https://api.cyberdesk.io/v1/workflows/{workflow_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"main_prompt": "<string>",
"input_schema": "<string>",
"output_schema": "<string>",
"includes_file_exports": true,
"is_webhooks_enabled": true,
"terminal_command_allowlist": [
"<string>"
],
"model_metadata": {
"main_agent_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cache_detection_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fallback_model_1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fallback_model_2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"post_run_check_failure_cleanup_prompt": "<string>",
"workflow_metadata": {
"has_unaddressed_error": true,
"last_errored_run_start": "2023-11-07T05:31:56Z",
"last_errored_run_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"post_run_checks": [
{
"name": "<string>",
"description": "<string>",
"file_names": [
"<string>"
],
"file_name_regex": "<string>",
"expected_match_count": 2,
"expected_match_count_ref": "<string>",
"loop_input": "<string>",
"loop_item_filename_template": "<string>",
"allow_missing_attachments": false,
"check_prompt": "<string>",
"model": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'import requests
url = "https://api.cyberdesk.io/v1/workflows/{workflow_id}"
payload = {
"name": "<string>",
"main_prompt": "<string>",
"input_schema": "<string>",
"output_schema": "<string>",
"includes_file_exports": True,
"is_webhooks_enabled": True,
"terminal_command_allowlist": ["<string>"],
"model_metadata": {
"main_agent_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cache_detection_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fallback_model_1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fallback_model_2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"post_run_check_failure_cleanup_prompt": "<string>",
"workflow_metadata": {
"has_unaddressed_error": True,
"last_errored_run_start": "2023-11-07T05:31:56Z",
"last_errored_run_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"post_run_checks": [
{
"name": "<string>",
"description": "<string>",
"file_names": ["<string>"],
"file_name_regex": "<string>",
"expected_match_count": 2,
"expected_match_count_ref": "<string>",
"loop_input": "<string>",
"loop_item_filename_template": "<string>",
"allow_missing_attachments": False,
"check_prompt": "<string>",
"model": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
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>',
main_prompt: '<string>',
input_schema: '<string>',
output_schema: '<string>',
includes_file_exports: true,
is_webhooks_enabled: true,
terminal_command_allowlist: ['<string>'],
model_metadata: {
main_agent_model_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cache_detection_model_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
fallback_model_1_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
fallback_model_2_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
post_run_check_failure_cleanup_prompt: '<string>',
workflow_metadata: {
has_unaddressed_error: true,
last_errored_run_start: '2023-11-07T05:31:56Z',
last_errored_run_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
post_run_checks: [
{
name: '<string>',
description: '<string>',
file_names: ['<string>'],
file_name_regex: '<string>',
expected_match_count: 2,
expected_match_count_ref: '<string>',
loop_input: '<string>',
loop_item_filename_template: '<string>',
allow_missing_attachments: false,
check_prompt: '<string>',
model: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('https://api.cyberdesk.io/v1/workflows/{workflow_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.cyberdesk.io/v1/workflows/{workflow_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>',
'main_prompt' => '<string>',
'input_schema' => '<string>',
'output_schema' => '<string>',
'includes_file_exports' => true,
'is_webhooks_enabled' => true,
'terminal_command_allowlist' => [
'<string>'
],
'model_metadata' => [
'main_agent_model_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cache_detection_model_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'fallback_model_1_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'fallback_model_2_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'post_run_check_failure_cleanup_prompt' => '<string>',
'workflow_metadata' => [
'has_unaddressed_error' => true,
'last_errored_run_start' => '2023-11-07T05:31:56Z',
'last_errored_run_uuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'post_run_checks' => [
[
'name' => '<string>',
'description' => '<string>',
'file_names' => [
'<string>'
],
'file_name_regex' => '<string>',
'expected_match_count' => 2,
'expected_match_count_ref' => '<string>',
'loop_input' => '<string>',
'loop_item_filename_template' => '<string>',
'allow_missing_attachments' => false,
'check_prompt' => '<string>',
'model' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
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.cyberdesk.io/v1/workflows/{workflow_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"main_prompt\": \"<string>\",\n \"input_schema\": \"<string>\",\n \"output_schema\": \"<string>\",\n \"includes_file_exports\": true,\n \"is_webhooks_enabled\": true,\n \"terminal_command_allowlist\": [\n \"<string>\"\n ],\n \"model_metadata\": {\n \"main_agent_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cache_detection_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fallback_model_1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fallback_model_2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"post_run_check_failure_cleanup_prompt\": \"<string>\",\n \"workflow_metadata\": {\n \"has_unaddressed_error\": true,\n \"last_errored_run_start\": \"2023-11-07T05:31:56Z\",\n \"last_errored_run_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"post_run_checks\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"file_names\": [\n \"<string>\"\n ],\n \"file_name_regex\": \"<string>\",\n \"expected_match_count\": 2,\n \"expected_match_count_ref\": \"<string>\",\n \"loop_input\": \"<string>\",\n \"loop_item_filename_template\": \"<string>\",\n \"allow_missing_attachments\": false,\n \"check_prompt\": \"<string>\",\n \"model\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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.cyberdesk.io/v1/workflows/{workflow_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"main_prompt\": \"<string>\",\n \"input_schema\": \"<string>\",\n \"output_schema\": \"<string>\",\n \"includes_file_exports\": true,\n \"is_webhooks_enabled\": true,\n \"terminal_command_allowlist\": [\n \"<string>\"\n ],\n \"model_metadata\": {\n \"main_agent_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cache_detection_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fallback_model_1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fallback_model_2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"post_run_check_failure_cleanup_prompt\": \"<string>\",\n \"workflow_metadata\": {\n \"has_unaddressed_error\": true,\n \"last_errored_run_start\": \"2023-11-07T05:31:56Z\",\n \"last_errored_run_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"post_run_checks\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"file_names\": [\n \"<string>\"\n ],\n \"file_name_regex\": \"<string>\",\n \"expected_match_count\": 2,\n \"expected_match_count_ref\": \"<string>\",\n \"loop_input\": \"<string>\",\n \"loop_item_filename_template\": \"<string>\",\n \"allow_missing_attachments\": false,\n \"check_prompt\": \"<string>\",\n \"model\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cyberdesk.io/v1/workflows/{workflow_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 \"main_prompt\": \"<string>\",\n \"input_schema\": \"<string>\",\n \"output_schema\": \"<string>\",\n \"includes_file_exports\": true,\n \"is_webhooks_enabled\": true,\n \"terminal_command_allowlist\": [\n \"<string>\"\n ],\n \"model_metadata\": {\n \"main_agent_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cache_detection_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fallback_model_1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fallback_model_2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"post_run_check_failure_cleanup_prompt\": \"<string>\",\n \"workflow_metadata\": {\n \"has_unaddressed_error\": true,\n \"last_errored_run_start\": \"2023-11-07T05:31:56Z\",\n \"last_errored_run_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"post_run_checks\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"file_names\": [\n \"<string>\"\n ],\n \"file_name_regex\": \"<string>\",\n \"expected_match_count\": 2,\n \"expected_match_count_ref\": \"<string>\",\n \"loop_input\": \"<string>\",\n \"loop_item_filename_template\": \"<string>\",\n \"allow_missing_attachments\": false,\n \"check_prompt\": \"<string>\",\n \"model\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"main_prompt": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"input_schema": "<string>",
"output_schema": "<string>",
"includes_file_exports": false,
"is_webhooks_enabled": false,
"terminal_command_allowlist": [
"<string>"
],
"model_metadata": {
"main_agent_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cache_detection_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fallback_model_1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fallback_model_2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"post_run_check_failure_cleanup_prompt": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "<string>",
"includes_input_variables": false,
"workflow_metadata": {
"has_unaddressed_error": true,
"last_errored_run_start": "2023-11-07T05:31:56Z",
"last_errored_run_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"old_versions": [
{}
],
"tags": [
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "<string>",
"order": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"emoji": "<string>",
"color": "<string>",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_archived": false,
"workflow_count": 123,
"group": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "<string>",
"order": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"emoji": "<string>",
"color": "<string>"
}
}
],
"post_run_checks": [
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "<string>",
"order": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_names": [
"<string>"
],
"file_name_regex": "<string>",
"expected_match_count": 2,
"expected_match_count_ref": "<string>",
"loop_input": "<string>",
"loop_item_filename_template": "<string>",
"allow_missing_attachments": false,
"check_prompt": "<string>",
"model": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Update Workflow
Update a workflow’s prompts.
The current version will be saved to the version history. Only the fields provided in the request body will be updated. The workflow must belong to the authenticated organization.
curl --request PATCH \
--url https://api.cyberdesk.io/v1/workflows/{workflow_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"main_prompt": "<string>",
"input_schema": "<string>",
"output_schema": "<string>",
"includes_file_exports": true,
"is_webhooks_enabled": true,
"terminal_command_allowlist": [
"<string>"
],
"model_metadata": {
"main_agent_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cache_detection_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fallback_model_1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fallback_model_2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"post_run_check_failure_cleanup_prompt": "<string>",
"workflow_metadata": {
"has_unaddressed_error": true,
"last_errored_run_start": "2023-11-07T05:31:56Z",
"last_errored_run_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"post_run_checks": [
{
"name": "<string>",
"description": "<string>",
"file_names": [
"<string>"
],
"file_name_regex": "<string>",
"expected_match_count": 2,
"expected_match_count_ref": "<string>",
"loop_input": "<string>",
"loop_item_filename_template": "<string>",
"allow_missing_attachments": false,
"check_prompt": "<string>",
"model": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'import requests
url = "https://api.cyberdesk.io/v1/workflows/{workflow_id}"
payload = {
"name": "<string>",
"main_prompt": "<string>",
"input_schema": "<string>",
"output_schema": "<string>",
"includes_file_exports": True,
"is_webhooks_enabled": True,
"terminal_command_allowlist": ["<string>"],
"model_metadata": {
"main_agent_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cache_detection_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fallback_model_1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fallback_model_2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"post_run_check_failure_cleanup_prompt": "<string>",
"workflow_metadata": {
"has_unaddressed_error": True,
"last_errored_run_start": "2023-11-07T05:31:56Z",
"last_errored_run_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"post_run_checks": [
{
"name": "<string>",
"description": "<string>",
"file_names": ["<string>"],
"file_name_regex": "<string>",
"expected_match_count": 2,
"expected_match_count_ref": "<string>",
"loop_input": "<string>",
"loop_item_filename_template": "<string>",
"allow_missing_attachments": False,
"check_prompt": "<string>",
"model": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
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>',
main_prompt: '<string>',
input_schema: '<string>',
output_schema: '<string>',
includes_file_exports: true,
is_webhooks_enabled: true,
terminal_command_allowlist: ['<string>'],
model_metadata: {
main_agent_model_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cache_detection_model_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
fallback_model_1_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
fallback_model_2_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
post_run_check_failure_cleanup_prompt: '<string>',
workflow_metadata: {
has_unaddressed_error: true,
last_errored_run_start: '2023-11-07T05:31:56Z',
last_errored_run_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
post_run_checks: [
{
name: '<string>',
description: '<string>',
file_names: ['<string>'],
file_name_regex: '<string>',
expected_match_count: 2,
expected_match_count_ref: '<string>',
loop_input: '<string>',
loop_item_filename_template: '<string>',
allow_missing_attachments: false,
check_prompt: '<string>',
model: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('https://api.cyberdesk.io/v1/workflows/{workflow_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.cyberdesk.io/v1/workflows/{workflow_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>',
'main_prompt' => '<string>',
'input_schema' => '<string>',
'output_schema' => '<string>',
'includes_file_exports' => true,
'is_webhooks_enabled' => true,
'terminal_command_allowlist' => [
'<string>'
],
'model_metadata' => [
'main_agent_model_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cache_detection_model_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'fallback_model_1_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'fallback_model_2_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'post_run_check_failure_cleanup_prompt' => '<string>',
'workflow_metadata' => [
'has_unaddressed_error' => true,
'last_errored_run_start' => '2023-11-07T05:31:56Z',
'last_errored_run_uuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'post_run_checks' => [
[
'name' => '<string>',
'description' => '<string>',
'file_names' => [
'<string>'
],
'file_name_regex' => '<string>',
'expected_match_count' => 2,
'expected_match_count_ref' => '<string>',
'loop_input' => '<string>',
'loop_item_filename_template' => '<string>',
'allow_missing_attachments' => false,
'check_prompt' => '<string>',
'model' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
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.cyberdesk.io/v1/workflows/{workflow_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"main_prompt\": \"<string>\",\n \"input_schema\": \"<string>\",\n \"output_schema\": \"<string>\",\n \"includes_file_exports\": true,\n \"is_webhooks_enabled\": true,\n \"terminal_command_allowlist\": [\n \"<string>\"\n ],\n \"model_metadata\": {\n \"main_agent_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cache_detection_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fallback_model_1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fallback_model_2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"post_run_check_failure_cleanup_prompt\": \"<string>\",\n \"workflow_metadata\": {\n \"has_unaddressed_error\": true,\n \"last_errored_run_start\": \"2023-11-07T05:31:56Z\",\n \"last_errored_run_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"post_run_checks\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"file_names\": [\n \"<string>\"\n ],\n \"file_name_regex\": \"<string>\",\n \"expected_match_count\": 2,\n \"expected_match_count_ref\": \"<string>\",\n \"loop_input\": \"<string>\",\n \"loop_item_filename_template\": \"<string>\",\n \"allow_missing_attachments\": false,\n \"check_prompt\": \"<string>\",\n \"model\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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.cyberdesk.io/v1/workflows/{workflow_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"main_prompt\": \"<string>\",\n \"input_schema\": \"<string>\",\n \"output_schema\": \"<string>\",\n \"includes_file_exports\": true,\n \"is_webhooks_enabled\": true,\n \"terminal_command_allowlist\": [\n \"<string>\"\n ],\n \"model_metadata\": {\n \"main_agent_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cache_detection_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fallback_model_1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fallback_model_2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"post_run_check_failure_cleanup_prompt\": \"<string>\",\n \"workflow_metadata\": {\n \"has_unaddressed_error\": true,\n \"last_errored_run_start\": \"2023-11-07T05:31:56Z\",\n \"last_errored_run_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"post_run_checks\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"file_names\": [\n \"<string>\"\n ],\n \"file_name_regex\": \"<string>\",\n \"expected_match_count\": 2,\n \"expected_match_count_ref\": \"<string>\",\n \"loop_input\": \"<string>\",\n \"loop_item_filename_template\": \"<string>\",\n \"allow_missing_attachments\": false,\n \"check_prompt\": \"<string>\",\n \"model\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cyberdesk.io/v1/workflows/{workflow_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 \"main_prompt\": \"<string>\",\n \"input_schema\": \"<string>\",\n \"output_schema\": \"<string>\",\n \"includes_file_exports\": true,\n \"is_webhooks_enabled\": true,\n \"terminal_command_allowlist\": [\n \"<string>\"\n ],\n \"model_metadata\": {\n \"main_agent_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cache_detection_model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fallback_model_1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fallback_model_2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"post_run_check_failure_cleanup_prompt\": \"<string>\",\n \"workflow_metadata\": {\n \"has_unaddressed_error\": true,\n \"last_errored_run_start\": \"2023-11-07T05:31:56Z\",\n \"last_errored_run_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"post_run_checks\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"file_names\": [\n \"<string>\"\n ],\n \"file_name_regex\": \"<string>\",\n \"expected_match_count\": 2,\n \"expected_match_count_ref\": \"<string>\",\n \"loop_input\": \"<string>\",\n \"loop_item_filename_template\": \"<string>\",\n \"allow_missing_attachments\": false,\n \"check_prompt\": \"<string>\",\n \"model\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"main_prompt": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"input_schema": "<string>",
"output_schema": "<string>",
"includes_file_exports": false,
"is_webhooks_enabled": false,
"terminal_command_allowlist": [
"<string>"
],
"model_metadata": {
"main_agent_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cache_detection_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fallback_model_1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fallback_model_2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"post_run_check_failure_cleanup_prompt": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "<string>",
"includes_input_variables": false,
"workflow_metadata": {
"has_unaddressed_error": true,
"last_errored_run_start": "2023-11-07T05:31:56Z",
"last_errored_run_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"old_versions": [
{}
],
"tags": [
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "<string>",
"order": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"emoji": "<string>",
"color": "<string>",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_archived": false,
"workflow_count": 123,
"group": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "<string>",
"order": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"emoji": "<string>",
"color": "<string>"
}
}
],
"post_run_checks": [
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "<string>",
"order": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_names": [
"<string>"
],
"file_name_regex": "<string>",
"expected_match_count": 2,
"expected_match_count_ref": "<string>",
"loop_input": "<string>",
"loop_item_filename_template": "<string>",
"allow_missing_attachments": false,
"check_prompt": "<string>",
"model": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Unique key for idempotent requests. If provided, the server ensures the request is processed at most once. Retries with the same key return the original response. SDKs auto-generate this for write requests.
"550e8400-e29b-41d4-a716-446655440000"
Path Parameters
Body
Schema for updating a workflow
2551JSON schema for validating merged run inputs. Sensitive root keys are exposed with a '$' prefix in schema validation (for example sensitive_input_values.api_key -> '$api_key').
JSON schema for output data transformation
Enable AI-based file export detection
Send webhook on run completion
Optional workflow-level allowlist for execute_terminal_command. Set to an empty list or null to clear the allowlist.
Optional workflow-level model configuration metadata (main agent, cache detection, and fallbacks).
Show child attributes
Show child attributes
Optional workflow-level cleanup prompt that runs when any post-run check fails during a session or chain. Set null to clear it.
Optional internal workflow metadata patch. Top-level null clears all workflow metadata. Omit this field to leave existing metadata unchanged. Set individual keys to null to remove only those keys.
Show child attributes
Show child attributes
Workflow-managed post-run checks, reconciled on save when present.
Show child attributes
Show child attributes
Response
Successful Response
Workflow response schema
1255JSON schema for validating merged run inputs. Sensitive root keys are exposed with a '$' prefix in schema validation (for example sensitive_input_values.api_key -> '$api_key').
JSON schema for output data transformation
Enable AI-based file export detection
Send webhook on run completion
Optional workflow-level allowlist for execute_terminal_command. When set, the agent may only run commands that exactly match one of the approved command templates.
Optional workflow-level model configuration metadata (main agent, cache detection, and fallbacks).
Show child attributes
Show child attributes
Optional workflow-level cleanup prompt that runs when any post-run check fails during a session or chain.
Internal workflow metadata used for run/error tracking.
Show child attributes
Show child attributes
Tags assigned to this workflow
Show child attributes
Show child attributes
Post-run checks assigned to this workflow.
Show child attributes
Show child attributes
Was this page helpful?