curl --request POST \
--url https://api.cyberdesk.io/v1/workflows \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"main_prompt": "<string>",
"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>",
"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"
payload = {
"main_prompt": "<string>",
"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>",
"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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
main_prompt: '<string>',
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>',
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', 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",
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([
'main_prompt' => '<string>',
'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>',
'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"
payload := strings.NewReader("{\n \"main_prompt\": \"<string>\",\n \"name\": \"<string>\",\n \"input_schema\": \"<string>\",\n \"output_schema\": \"<string>\",\n \"includes_file_exports\": false,\n \"is_webhooks_enabled\": false,\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 \"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("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.cyberdesk.io/v1/workflows")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"main_prompt\": \"<string>\",\n \"name\": \"<string>\",\n \"input_schema\": \"<string>\",\n \"output_schema\": \"<string>\",\n \"includes_file_exports\": false,\n \"is_webhooks_enabled\": false,\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 \"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")
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 \"main_prompt\": \"<string>\",\n \"name\": \"<string>\",\n \"input_schema\": \"<string>\",\n \"output_schema\": \"<string>\",\n \"includes_file_exports\": false,\n \"is_webhooks_enabled\": false,\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 \"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": {}
}
]
}Create Workflow
Create a new workflow.
The workflow will be associated with the authenticated organization.
curl --request POST \
--url https://api.cyberdesk.io/v1/workflows \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"main_prompt": "<string>",
"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>",
"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"
payload = {
"main_prompt": "<string>",
"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>",
"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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
main_prompt: '<string>',
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>',
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', 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",
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([
'main_prompt' => '<string>',
'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>',
'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"
payload := strings.NewReader("{\n \"main_prompt\": \"<string>\",\n \"name\": \"<string>\",\n \"input_schema\": \"<string>\",\n \"output_schema\": \"<string>\",\n \"includes_file_exports\": false,\n \"is_webhooks_enabled\": false,\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 \"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("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.cyberdesk.io/v1/workflows")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"main_prompt\": \"<string>\",\n \"name\": \"<string>\",\n \"input_schema\": \"<string>\",\n \"output_schema\": \"<string>\",\n \"includes_file_exports\": false,\n \"is_webhooks_enabled\": false,\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 \"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")
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 \"main_prompt\": \"<string>\",\n \"name\": \"<string>\",\n \"input_schema\": \"<string>\",\n \"output_schema\": \"<string>\",\n \"includes_file_exports\": false,\n \"is_webhooks_enabled\": false,\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 \"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"
Body
Schema for creating a workflow
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.
Workflow-managed post-run checks, reconciled on save.
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?