Create a flow
curl --request POST \
--url https://api.orbit.devotel.io/api/v1/flows/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Welcome SMS",
"description": "Send a welcome SMS when a new contact is created.",
"trigger_type": "event",
"definition": {
"nodes": [
{
"id": "trigger-1",
"type": "trigger",
"data": {
"label": "Trigger",
"triggerType": "Incoming SMS"
}
},
{
"id": "sendSms-1",
"type": "sendSms",
"data": {
"label": "Send Welcome SMS",
"to": "{{phone}}",
"body": "Welcome to {{company}}!"
}
}
],
"edges": [
{
"id": "e-trigger-sms",
"source": "trigger-1",
"target": "sendSms-1"
}
]
}
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/flows/"
payload = {
"name": "Welcome SMS",
"description": "Send a welcome SMS when a new contact is created.",
"trigger_type": "event",
"definition": {
"nodes": [
{
"id": "trigger-1",
"type": "trigger",
"data": {
"label": "Trigger",
"triggerType": "Incoming SMS"
}
},
{
"id": "sendSms-1",
"type": "sendSms",
"data": {
"label": "Send Welcome SMS",
"to": "{{phone}}",
"body": "Welcome to {{company}}!"
}
}
],
"edges": [
{
"id": "e-trigger-sms",
"source": "trigger-1",
"target": "sendSms-1"
}
]
}
}
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: 'Welcome SMS',
description: 'Send a welcome SMS when a new contact is created.',
trigger_type: 'event',
definition: {
nodes: [
{
id: 'trigger-1',
type: 'trigger',
data: {label: 'Trigger', triggerType: 'Incoming SMS'}
},
{
id: 'sendSms-1',
type: 'sendSms',
data: {
label: 'Send Welcome SMS',
to: '{{phone}}',
body: JSON.stringify('Welcome to {{company}}!')
}
}
],
edges: [{id: 'e-trigger-sms', source: 'trigger-1', target: 'sendSms-1'}]
}
})
};
fetch('https://api.orbit.devotel.io/api/v1/flows/', 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/flows/",
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' => 'Welcome SMS',
'description' => 'Send a welcome SMS when a new contact is created.',
'trigger_type' => 'event',
'definition' => [
'nodes' => [
[
'id' => 'trigger-1',
'type' => 'trigger',
'data' => [
'label' => 'Trigger',
'triggerType' => 'Incoming SMS'
]
],
[
'id' => 'sendSms-1',
'type' => 'sendSms',
'data' => [
'label' => 'Send Welcome SMS',
'to' => '{{phone}}',
'body' => 'Welcome to {{company}}!'
]
]
],
'edges' => [
[
'id' => 'e-trigger-sms',
'source' => 'trigger-1',
'target' => 'sendSms-1'
]
]
]
]),
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/flows/"
payload := strings.NewReader("{\n \"name\": \"Welcome SMS\",\n \"description\": \"Send a welcome SMS when a new contact is created.\",\n \"trigger_type\": \"event\",\n \"definition\": {\n \"nodes\": [\n {\n \"id\": \"trigger-1\",\n \"type\": \"trigger\",\n \"data\": {\n \"label\": \"Trigger\",\n \"triggerType\": \"Incoming SMS\"\n }\n },\n {\n \"id\": \"sendSms-1\",\n \"type\": \"sendSms\",\n \"data\": {\n \"label\": \"Send Welcome SMS\",\n \"to\": \"{{phone}}\",\n \"body\": \"Welcome to {{company}}!\"\n }\n }\n ],\n \"edges\": [\n {\n \"id\": \"e-trigger-sms\",\n \"source\": \"trigger-1\",\n \"target\": \"sendSms-1\"\n }\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.orbit.devotel.io/api/v1/flows/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Welcome SMS\",\n \"description\": \"Send a welcome SMS when a new contact is created.\",\n \"trigger_type\": \"event\",\n \"definition\": {\n \"nodes\": [\n {\n \"id\": \"trigger-1\",\n \"type\": \"trigger\",\n \"data\": {\n \"label\": \"Trigger\",\n \"triggerType\": \"Incoming SMS\"\n }\n },\n {\n \"id\": \"sendSms-1\",\n \"type\": \"sendSms\",\n \"data\": {\n \"label\": \"Send Welcome SMS\",\n \"to\": \"{{phone}}\",\n \"body\": \"Welcome to {{company}}!\"\n }\n }\n ],\n \"edges\": [\n {\n \"id\": \"e-trigger-sms\",\n \"source\": \"trigger-1\",\n \"target\": \"sendSms-1\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/flows/")
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\": \"Welcome SMS\",\n \"description\": \"Send a welcome SMS when a new contact is created.\",\n \"trigger_type\": \"event\",\n \"definition\": {\n \"nodes\": [\n {\n \"id\": \"trigger-1\",\n \"type\": \"trigger\",\n \"data\": {\n \"label\": \"Trigger\",\n \"triggerType\": \"Incoming SMS\"\n }\n },\n {\n \"id\": \"sendSms-1\",\n \"type\": \"sendSms\",\n \"data\": {\n \"label\": \"Send Welcome SMS\",\n \"to\": \"{{phone}}\",\n \"body\": \"Welcome to {{company}}!\"\n }\n }\n ],\n \"edges\": [\n {\n \"id\": \"e-trigger-sms\",\n \"source\": \"trigger-1\",\n \"target\": \"sendSms-1\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"status": "draft",
"definition": {
"nodes": [
{}
],
"edges": [
{}
]
},
"trigger_type": "manual",
"trigger_config": {},
"cron_expr": "<string>",
"cron_tz": "<string>",
"last_scheduled_run_at": "2023-11-07T05:31:56Z",
"version": 123,
"published_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}Flows
Create a flow
Create a new automation flow at version 1 in draft status. Supply a name, the builder definition graph (nodes + edges), and a trigger_type. When trigger_type is schedule a valid 5-field cron_expr is required (with an optional IANA cron_tz, default UTC). Requires an operator role (owner / admin / developer) and the flows:write scope.
POST
/
api
/
v1
/
flows
/
Create a flow
curl --request POST \
--url https://api.orbit.devotel.io/api/v1/flows/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Welcome SMS",
"description": "Send a welcome SMS when a new contact is created.",
"trigger_type": "event",
"definition": {
"nodes": [
{
"id": "trigger-1",
"type": "trigger",
"data": {
"label": "Trigger",
"triggerType": "Incoming SMS"
}
},
{
"id": "sendSms-1",
"type": "sendSms",
"data": {
"label": "Send Welcome SMS",
"to": "{{phone}}",
"body": "Welcome to {{company}}!"
}
}
],
"edges": [
{
"id": "e-trigger-sms",
"source": "trigger-1",
"target": "sendSms-1"
}
]
}
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/flows/"
payload = {
"name": "Welcome SMS",
"description": "Send a welcome SMS when a new contact is created.",
"trigger_type": "event",
"definition": {
"nodes": [
{
"id": "trigger-1",
"type": "trigger",
"data": {
"label": "Trigger",
"triggerType": "Incoming SMS"
}
},
{
"id": "sendSms-1",
"type": "sendSms",
"data": {
"label": "Send Welcome SMS",
"to": "{{phone}}",
"body": "Welcome to {{company}}!"
}
}
],
"edges": [
{
"id": "e-trigger-sms",
"source": "trigger-1",
"target": "sendSms-1"
}
]
}
}
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: 'Welcome SMS',
description: 'Send a welcome SMS when a new contact is created.',
trigger_type: 'event',
definition: {
nodes: [
{
id: 'trigger-1',
type: 'trigger',
data: {label: 'Trigger', triggerType: 'Incoming SMS'}
},
{
id: 'sendSms-1',
type: 'sendSms',
data: {
label: 'Send Welcome SMS',
to: '{{phone}}',
body: JSON.stringify('Welcome to {{company}}!')
}
}
],
edges: [{id: 'e-trigger-sms', source: 'trigger-1', target: 'sendSms-1'}]
}
})
};
fetch('https://api.orbit.devotel.io/api/v1/flows/', 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/flows/",
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' => 'Welcome SMS',
'description' => 'Send a welcome SMS when a new contact is created.',
'trigger_type' => 'event',
'definition' => [
'nodes' => [
[
'id' => 'trigger-1',
'type' => 'trigger',
'data' => [
'label' => 'Trigger',
'triggerType' => 'Incoming SMS'
]
],
[
'id' => 'sendSms-1',
'type' => 'sendSms',
'data' => [
'label' => 'Send Welcome SMS',
'to' => '{{phone}}',
'body' => 'Welcome to {{company}}!'
]
]
],
'edges' => [
[
'id' => 'e-trigger-sms',
'source' => 'trigger-1',
'target' => 'sendSms-1'
]
]
]
]),
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/flows/"
payload := strings.NewReader("{\n \"name\": \"Welcome SMS\",\n \"description\": \"Send a welcome SMS when a new contact is created.\",\n \"trigger_type\": \"event\",\n \"definition\": {\n \"nodes\": [\n {\n \"id\": \"trigger-1\",\n \"type\": \"trigger\",\n \"data\": {\n \"label\": \"Trigger\",\n \"triggerType\": \"Incoming SMS\"\n }\n },\n {\n \"id\": \"sendSms-1\",\n \"type\": \"sendSms\",\n \"data\": {\n \"label\": \"Send Welcome SMS\",\n \"to\": \"{{phone}}\",\n \"body\": \"Welcome to {{company}}!\"\n }\n }\n ],\n \"edges\": [\n {\n \"id\": \"e-trigger-sms\",\n \"source\": \"trigger-1\",\n \"target\": \"sendSms-1\"\n }\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.orbit.devotel.io/api/v1/flows/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Welcome SMS\",\n \"description\": \"Send a welcome SMS when a new contact is created.\",\n \"trigger_type\": \"event\",\n \"definition\": {\n \"nodes\": [\n {\n \"id\": \"trigger-1\",\n \"type\": \"trigger\",\n \"data\": {\n \"label\": \"Trigger\",\n \"triggerType\": \"Incoming SMS\"\n }\n },\n {\n \"id\": \"sendSms-1\",\n \"type\": \"sendSms\",\n \"data\": {\n \"label\": \"Send Welcome SMS\",\n \"to\": \"{{phone}}\",\n \"body\": \"Welcome to {{company}}!\"\n }\n }\n ],\n \"edges\": [\n {\n \"id\": \"e-trigger-sms\",\n \"source\": \"trigger-1\",\n \"target\": \"sendSms-1\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/flows/")
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\": \"Welcome SMS\",\n \"description\": \"Send a welcome SMS when a new contact is created.\",\n \"trigger_type\": \"event\",\n \"definition\": {\n \"nodes\": [\n {\n \"id\": \"trigger-1\",\n \"type\": \"trigger\",\n \"data\": {\n \"label\": \"Trigger\",\n \"triggerType\": \"Incoming SMS\"\n }\n },\n {\n \"id\": \"sendSms-1\",\n \"type\": \"sendSms\",\n \"data\": {\n \"label\": \"Send Welcome SMS\",\n \"to\": \"{{phone}}\",\n \"body\": \"Welcome to {{company}}!\"\n }\n }\n ],\n \"edges\": [\n {\n \"id\": \"e-trigger-sms\",\n \"source\": \"trigger-1\",\n \"target\": \"sendSms-1\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"status": "draft",
"definition": {
"nodes": [
{}
],
"edges": [
{}
]
},
"trigger_type": "manual",
"trigger_config": {},
"cron_expr": "<string>",
"cron_tz": "<string>",
"last_scheduled_run_at": "2023-11-07T05:31:56Z",
"version": 123,
"published_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}Authorizations
BearerApiKey
Dashboard JWT token from Clerk
Body
application/json
Required string length:
1 - 200Builder graph — nodes and edges.
Available options:
manual, webhook, schedule, event, workflow Maximum string length:
10005-field cron expression; required when trigger_type is schedule.
Maximum string length:
200IANA timezone for cron_expr (defaults to UTC).
Maximum string length:
64⌘I