Scenario Builder
POST /v1/scenario
Create a scenario.
POST /v1/scenario
curl --request POST \
--url https://api.getbluejay.ai/v1/scenarioimport requests
url = "https://api.getbluejay.ai/v1/scenario"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.getbluejay.ai/v1/scenario', 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.getbluejay.ai/v1/scenario",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getbluejay.ai/v1/scenario"
req, _ := http.NewRequest("POST", url, nil)
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.getbluejay.ai/v1/scenario")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getbluejay.ai/v1/scenario")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyCreates a scenario.
definition is a React Flow graph with nodes, edges, and an optional viewport. Each node and its data must match the typed schemas in the playground.
To generate Digital Humans from a scenario, see Scenario Adherence.
Headers
Request body
Response
Status codes
| Status | Meaning |
|---|---|
200 | Successful Response |
422 | Validation Error |
Example request
curl --request POST \
--url https://api.getbluejay.ai/v1/scenario \
--header 'X-API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"agent_ids": [],
"definition": {
"edges": [
{
"id": "e-wf-start-n-greet",
"source": "wf-start",
"target": "n-greet"
}
],
"nodes": [
{
"data": {
"id": "wf-start"
},
"deletable": false,
"draggable": true,
"id": "wf-start",
"position": {
"x": 100,
"y": 50
},
"type": "start"
},
{
"data": {
"criteria": "Greet the caller and offer help",
"id": "n-greet",
"speaker": "agent",
"turn": 0,
"type": "message"
},
"id": "n-greet",
"position": {
"x": 200,
"y": 180
},
"type": "single"
}
]
},
"description": "Password reset IVR",
"name": "Support reset flow"
}'
Example response
200
{
"id": "<string>",
"organization_id": "<string>",
"agent_ids": [],
"name": "<string>",
"description": "<string>",
"definition": {},
"created_at": "2026-01-01T00:00:00Z",
"dh_sync_summary": {},
"warnings": [
"<string>"
]
}
Last modified on October 21, 2026
⌘I
POST /v1/scenario
curl --request POST \
--url https://api.getbluejay.ai/v1/scenarioimport requests
url = "https://api.getbluejay.ai/v1/scenario"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.getbluejay.ai/v1/scenario', 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.getbluejay.ai/v1/scenario",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getbluejay.ai/v1/scenario"
req, _ := http.NewRequest("POST", url, nil)
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.getbluejay.ai/v1/scenario")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getbluejay.ai/v1/scenario")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body