curl --request POST \
--url https://api.duvo.ai/v2/teams/{teamId}/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"first_agent": {
"name": "<string>",
"integration_slugs": []
}
}
'import requests
url = "https://api.duvo.ai/v2/teams/{teamId}/automations"
payload = {
"name": "<string>",
"first_agent": {
"name": "<string>",
"integration_slugs": []
}
}
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({name: '<string>', first_agent: {name: '<string>', integration_slugs: []}})
};
fetch('https://api.duvo.ai/v2/teams/{teamId}/automations', 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.duvo.ai/v2/teams/{teamId}/automations",
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([
'name' => '<string>',
'first_agent' => [
'name' => '<string>',
'integration_slugs' => [
]
]
]),
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.duvo.ai/v2/teams/{teamId}/automations"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"first_agent\": {\n \"name\": \"<string>\",\n \"integration_slugs\": []\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.duvo.ai/v2/teams/{teamId}/automations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"first_agent\": {\n \"name\": \"<string>\",\n \"integration_slugs\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/teams/{teamId}/automations")
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 \"name\": \"<string>\",\n \"first_agent\": {\n \"name\": \"<string>\",\n \"integration_slugs\": []\n }\n}"
response = http.request(request)
puts response.read_body{
"automation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"agent_count": 0,
"code_step_count": 0,
"queue_count": 0,
"created_at": "<string>",
"updated_at": "<string>",
"folder_id": null,
"pinned_at": null,
"is_setting_up": false,
"setup_step": null,
"setup_build_chat_id": null,
"setup_progress": null,
"process_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_scope": "personal",
"viewer_can_edit": true,
"process_attributes": [
{
"attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "select",
"value_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
},
"draft_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}Create Automation
Create a new automation. Its first agent is created alongside it so the caller lands on something editable; first_agent seeds that agent’s name, configuration, and connections instead of the defaults. On a team on revision semantics the automation holds a single draft revision and no live revision, with the agent’s first build bound into that draft, and the first activation makes the draft revision 1; on any other team the automation is a bare container and the build stands on its own.
curl --request POST \
--url https://api.duvo.ai/v2/teams/{teamId}/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"first_agent": {
"name": "<string>",
"integration_slugs": []
}
}
'import requests
url = "https://api.duvo.ai/v2/teams/{teamId}/automations"
payload = {
"name": "<string>",
"first_agent": {
"name": "<string>",
"integration_slugs": []
}
}
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({name: '<string>', first_agent: {name: '<string>', integration_slugs: []}})
};
fetch('https://api.duvo.ai/v2/teams/{teamId}/automations', 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.duvo.ai/v2/teams/{teamId}/automations",
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([
'name' => '<string>',
'first_agent' => [
'name' => '<string>',
'integration_slugs' => [
]
]
]),
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.duvo.ai/v2/teams/{teamId}/automations"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"first_agent\": {\n \"name\": \"<string>\",\n \"integration_slugs\": []\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.duvo.ai/v2/teams/{teamId}/automations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"first_agent\": {\n \"name\": \"<string>\",\n \"integration_slugs\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/teams/{teamId}/automations")
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 \"name\": \"<string>\",\n \"first_agent\": {\n \"name\": \"<string>\",\n \"integration_slugs\": []\n }\n}"
response = http.request(request)
puts response.read_body{
"automation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"agent_count": 0,
"code_step_count": 0,
"queue_count": 0,
"created_at": "<string>",
"updated_at": "<string>",
"folder_id": null,
"pinned_at": null,
"is_setting_up": false,
"setup_step": null,
"setup_build_chat_id": null,
"setup_progress": null,
"process_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_scope": "personal",
"viewer_can_edit": true,
"process_attributes": [
{
"attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "select",
"value_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
},
"draft_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}Authorizations
Body
Response
Default Response
The draft revision the new automation was created with, or null when the team isn't on revision semantics and the automation is a bare container. A manually created automation has no live revision until it is first activated, so this is where its first agent build belongs.
Was this page helpful?