Generate a journey graph from a prompt
curl --request POST \
--url https://api.orbit.devotel.io/api/v1/campaigns/journey/from-prompt \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"intent": "Welcome new signups with WhatsApp, wait a day, send an email with tips, then an SMS check-in after 3 days.",
"available_channels": [
"whatsapp",
"email",
"sms"
],
"tone": "friendly"
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/campaigns/journey/from-prompt"
payload = {
"intent": "Welcome new signups with WhatsApp, wait a day, send an email with tips, then an SMS check-in after 3 days.",
"available_channels": ["whatsapp", "email", "sms"],
"tone": "friendly"
}
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({
intent: 'Welcome new signups with WhatsApp, wait a day, send an email with tips, then an SMS check-in after 3 days.',
available_channels: ['whatsapp', 'email', 'sms'],
tone: 'friendly'
})
};
fetch('https://api.orbit.devotel.io/api/v1/campaigns/journey/from-prompt', 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/campaigns/journey/from-prompt",
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([
'intent' => 'Welcome new signups with WhatsApp, wait a day, send an email with tips, then an SMS check-in after 3 days.',
'available_channels' => [
'whatsapp',
'email',
'sms'
],
'tone' => 'friendly'
]),
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/campaigns/journey/from-prompt"
payload := strings.NewReader("{\n \"intent\": \"Welcome new signups with WhatsApp, wait a day, send an email with tips, then an SMS check-in after 3 days.\",\n \"available_channels\": [\n \"whatsapp\",\n \"email\",\n \"sms\"\n ],\n \"tone\": \"friendly\"\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/campaigns/journey/from-prompt")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"intent\": \"Welcome new signups with WhatsApp, wait a day, send an email with tips, then an SMS check-in after 3 days.\",\n \"available_channels\": [\n \"whatsapp\",\n \"email\",\n \"sms\"\n ],\n \"tone\": \"friendly\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/campaigns/journey/from-prompt")
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 \"intent\": \"Welcome new signups with WhatsApp, wait a day, send an email with tips, then an SMS check-in after 3 days.\",\n \"available_channels\": [\n \"whatsapp\",\n \"email\",\n \"sms\"\n ],\n \"tone\": \"friendly\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"draft": {
"definition": {
"nodes": [],
"edges": []
}
},
"simulation": {
"totalProjectedSends": 1240
},
"model": "claude-sonnet"
},
"meta": {
"request_id": "req_7c1e9a2b3f",
"timestamp": "2026-08-02T14:23:11.000Z"
}
}Campaigns
Generate a journey graph from a prompt
Turn a plain-English description of a customer journey into a structured node/edge graph the journey canvas can render unchanged and POST /api/v1/campaigns can persist. The graph is validated server-side so the canvas never receives an unrenderable definition, and an optional dry-run simulation estimates projected sends. Nothing is persisted. Returns 503 when no AI provider is configured and 422 when the generated graph fails validation.
POST
/
api
/
v1
/
campaigns
/
journey
/
from-prompt
Generate a journey graph from a prompt
curl --request POST \
--url https://api.orbit.devotel.io/api/v1/campaigns/journey/from-prompt \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"intent": "Welcome new signups with WhatsApp, wait a day, send an email with tips, then an SMS check-in after 3 days.",
"available_channels": [
"whatsapp",
"email",
"sms"
],
"tone": "friendly"
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/campaigns/journey/from-prompt"
payload = {
"intent": "Welcome new signups with WhatsApp, wait a day, send an email with tips, then an SMS check-in after 3 days.",
"available_channels": ["whatsapp", "email", "sms"],
"tone": "friendly"
}
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({
intent: 'Welcome new signups with WhatsApp, wait a day, send an email with tips, then an SMS check-in after 3 days.',
available_channels: ['whatsapp', 'email', 'sms'],
tone: 'friendly'
})
};
fetch('https://api.orbit.devotel.io/api/v1/campaigns/journey/from-prompt', 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/campaigns/journey/from-prompt",
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([
'intent' => 'Welcome new signups with WhatsApp, wait a day, send an email with tips, then an SMS check-in after 3 days.',
'available_channels' => [
'whatsapp',
'email',
'sms'
],
'tone' => 'friendly'
]),
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/campaigns/journey/from-prompt"
payload := strings.NewReader("{\n \"intent\": \"Welcome new signups with WhatsApp, wait a day, send an email with tips, then an SMS check-in after 3 days.\",\n \"available_channels\": [\n \"whatsapp\",\n \"email\",\n \"sms\"\n ],\n \"tone\": \"friendly\"\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/campaigns/journey/from-prompt")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"intent\": \"Welcome new signups with WhatsApp, wait a day, send an email with tips, then an SMS check-in after 3 days.\",\n \"available_channels\": [\n \"whatsapp\",\n \"email\",\n \"sms\"\n ],\n \"tone\": \"friendly\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/campaigns/journey/from-prompt")
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 \"intent\": \"Welcome new signups with WhatsApp, wait a day, send an email with tips, then an SMS check-in after 3 days.\",\n \"available_channels\": [\n \"whatsapp\",\n \"email\",\n \"sms\"\n ],\n \"tone\": \"friendly\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"draft": {
"definition": {
"nodes": [],
"edges": []
}
},
"simulation": {
"totalProjectedSends": 1240
},
"model": "claude-sonnet"
},
"meta": {
"request_id": "req_7c1e9a2b3f",
"timestamp": "2026-08-02T14:23:11.000Z"
}
}Authorizations
BearerApiKey
Dashboard JWT token from Clerk
Body
application/json
Plain-English description of the journey to build.
Required string length:
8 - 4000Channels the tenant has connected. Only these get send nodes; omit for the default set.
Available options:
sms, rcs, whatsapp, email, push, voice Brand tone hint, e.g. friendly, formal, urgent.
Maximum string length:
120⌘I