Skip to main content
POST
Create Scenario job

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 scenario for (must be a workspace member)

prompt
string
required

Instructions for the AI agent describing what scenario to create

Maximum string length: 10000
context
string

Additional context in Markdown format (e.g., CRM data, meeting notes, product info). This is provided to the AI agent as background information.

Maximum string length: 50000
scenario_slug
string

Slug of an existing scenario to remix/iterate on. The AI will use this as a starting point and apply your prompt as modifications.

request_id
string

Client-provided idempotency key. If a job with this ID already exists, returns the existing job instead of creating a new one.

callback_url
string<uri>

URL to receive a webhook POST when the job completes

callback_headers
object

Custom headers to include in the callback request (e.g., authorization)

Response

Existing job returned (idempotent duplicate — a job with this request_id already exists)

id
string

Job identifier

status
enum<string>

Current job status

Available options:
queued,
processing,
completed,
failed,
cancelled
scenario
object | null

Created scenario details (only present when status is "completed")

error
object | null

Error details (only present when status is "failed")

created_at
string<date-time>

When the job was created

started_at
string<date-time> | null

When the job started processing

completed_at
string<date-time> | null

When the job finished (success, failure, or cancelled)

duration_seconds
number | null

Processing duration in seconds (only present when job has completed)

is_new
boolean

Always false when an existing job is returned via request_id