Skip to main content
POST
/
scenario-studio
Create Scenario Studio session
curl --request POST \
  --url https://api.exec.com/rest/v1/scenario-studio \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "user_email": "[email protected]",
  "prompt": "Create a discovery call scenario for enterprise software sales with a skeptical IT director",
  "request_id": "meeting-123-scenario"
}
'
import requests

url = "https://api.exec.com/rest/v1/scenario-studio"

payload = {
"user_email": "[email protected]",
"prompt": "Create a discovery call scenario for enterprise software sales with a skeptical IT director",
"request_id": "meeting-123-scenario"
}
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({
user_email: '[email protected]',
prompt: 'Create a discovery call scenario for enterprise software sales with a skeptical IT director',
request_id: 'meeting-123-scenario'
})
};

fetch('https://api.exec.com/rest/v1/scenario-studio', 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.exec.com/rest/v1/scenario-studio",
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([
'user_email' => '[email protected]',
'prompt' => 'Create a discovery call scenario for enterprise software sales with a skeptical IT director',
'request_id' => 'meeting-123-scenario'
]),
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.exec.com/rest/v1/scenario-studio"

payload := strings.NewReader("{\n \"user_email\": \"[email protected]\",\n \"prompt\": \"Create a discovery call scenario for enterprise software sales with a skeptical IT director\",\n \"request_id\": \"meeting-123-scenario\"\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.exec.com/rest/v1/scenario-studio")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_email\": \"[email protected]\",\n \"prompt\": \"Create a discovery call scenario for enterprise software sales with a skeptical IT director\",\n \"request_id\": \"meeting-123-scenario\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.exec.com/rest/v1/scenario-studio")

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 \"user_email\": \"[email protected]\",\n \"prompt\": \"Create a discovery call scenario for enterprise software sales with a skeptical IT director\",\n \"request_id\": \"meeting-123-scenario\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "x9y8z7w6v5u4",
  "url": "https://acme-corp.app.exec.com/chat/x9y8z7w6v5u4",
  "is_new": true
}
{
"error": {
"type": "invalid_request",
"code": "invalid_pagination",
"message": "Invalid pagination parameters"
}
}
{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid or inactive API key"
}
}

Authorizations

Authorization
string
header
required

API key created in Settings > API.

Format: exec_live_ followed by 40 alphanumeric characters.

Body

application/json
user_email
string<email>
required

Email of the user to create the session for (must be a member of your workspace)

prompt
string
required

Meeting context or scenario request that will be sent to the AI agent

request_id
string

Optional client-provided ID for deduplication. If provided and a session with this ID already exists, returns the existing session.

Response

Session created successfully

id
string

Session identifier

url
string<uri>

URL for the user to complete scenario creation

is_new
boolean

True if a new session was created, false if an existing session was returned via request_id