Create automation
curl --request POST \
--url http://api.gu1.ai/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": "<string>",
"triggerType": "<string>",
"triggerConfig": {},
"conditions": [
{}
],
"actions": [
{}
],
"steps": [
{}
],
"graph": {},
"layout": {},
"enabled": true
}
'import requests
url = "http://api.gu1.ai/automations"
payload = {
"name": "<string>",
"type": "<string>",
"triggerType": "<string>",
"triggerConfig": {},
"conditions": [{}],
"actions": [{}],
"steps": [{}],
"graph": {},
"layout": {},
"enabled": True
}
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>',
type: '<string>',
triggerType: '<string>',
triggerConfig: {},
conditions: [{}],
actions: [{}],
steps: [{}],
graph: {},
layout: {},
enabled: true
})
};
fetch('http://api.gu1.ai/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 => "http://api.gu1.ai/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>',
'type' => '<string>',
'triggerType' => '<string>',
'triggerConfig' => [
],
'conditions' => [
[
]
],
'actions' => [
[
]
],
'steps' => [
[
]
],
'graph' => [
],
'layout' => [
],
'enabled' => true
]),
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 := "http://api.gu1.ai/automations"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"triggerType\": \"<string>\",\n \"triggerConfig\": {},\n \"conditions\": [\n {}\n ],\n \"actions\": [\n {}\n ],\n \"steps\": [\n {}\n ],\n \"graph\": {},\n \"layout\": {},\n \"enabled\": true\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("http://api.gu1.ai/automations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"triggerType\": \"<string>\",\n \"triggerConfig\": {},\n \"conditions\": [\n {}\n ],\n \"actions\": [\n {}\n ],\n \"steps\": [\n {}\n ],\n \"graph\": {},\n \"layout\": {},\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/automations")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"triggerType\": \"<string>\",\n \"triggerConfig\": {},\n \"conditions\": [\n {}\n ],\n \"actions\": [\n {}\n ],\n \"steps\": [\n {}\n ],\n \"graph\": {},\n \"layout\": {},\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_bodyAPI Reference
Create automation
Create a new automation workflow in gu1, specifying trigger, conditions, actions, and graph nodes that the engine validates for synergy.
POST
/
automations
Create automation
curl --request POST \
--url http://api.gu1.ai/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": "<string>",
"triggerType": "<string>",
"triggerConfig": {},
"conditions": [
{}
],
"actions": [
{}
],
"steps": [
{}
],
"graph": {},
"layout": {},
"enabled": true
}
'import requests
url = "http://api.gu1.ai/automations"
payload = {
"name": "<string>",
"type": "<string>",
"triggerType": "<string>",
"triggerConfig": {},
"conditions": [{}],
"actions": [{}],
"steps": [{}],
"graph": {},
"layout": {},
"enabled": True
}
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>',
type: '<string>',
triggerType: '<string>',
triggerConfig: {},
conditions: [{}],
actions: [{}],
steps: [{}],
graph: {},
layout: {},
enabled: true
})
};
fetch('http://api.gu1.ai/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 => "http://api.gu1.ai/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>',
'type' => '<string>',
'triggerType' => '<string>',
'triggerConfig' => [
],
'conditions' => [
[
]
],
'actions' => [
[
]
],
'steps' => [
[
]
],
'graph' => [
],
'layout' => [
],
'enabled' => true
]),
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 := "http://api.gu1.ai/automations"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"triggerType\": \"<string>\",\n \"triggerConfig\": {},\n \"conditions\": [\n {}\n ],\n \"actions\": [\n {}\n ],\n \"steps\": [\n {}\n ],\n \"graph\": {},\n \"layout\": {},\n \"enabled\": true\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("http://api.gu1.ai/automations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"triggerType\": \"<string>\",\n \"triggerConfig\": {},\n \"conditions\": [\n {}\n ],\n \"actions\": [\n {}\n ],\n \"steps\": [\n {}\n ],\n \"graph\": {},\n \"layout\": {},\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/automations")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"triggerType\": \"<string>\",\n \"triggerConfig\": {},\n \"conditions\": [\n {}\n ],\n \"actions\": [\n {}\n ],\n \"steps\": [\n {}\n ],\n \"graph\": {},\n \"layout\": {},\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_bodyEndpoint
POST https://api.gu1.ai/automations
Content-Type: application/json
Body (main fields)
string
required
Display name
string
realtime (default) | scheduledstring
required
Valid engine trigger (e.g.
manual_execution, investigation_created, scheduled, β¦)object
Trigger-specific config (schedule, filters, etc.)
array
Condition objects:
field, operator, valuearray
Legacy flat list:
{ type, config }array
{ conditions, actions, waitAfterStep? }[]object
{ nodes[], edges[] } β nodes: trigger | condition | action; edges may include sourceHandle: true | false. Must include at least one trigger node.object
Optional node positions for the builder UI
boolean
Default
trueResponse
201 β{ "automation": { ... } }
400 β validation or synergy error (synergyErrors may be present)Was this page helpful?
βI