Sandboxes

Upsert Sandbox Scenario

Beta
POST

Upserts a new scenario for a sandbox, keying off of the optionally provided scenario id.

If an id is provided and has a match, the scenario will be updated. If no id is provided or no match is found, a new scenario will be appended to the end.

Note that a full replacement of the scenario is performed, so any fields not provided will be removed or overwritten with default values.

Path parameters

idstringRequired
A UUID string identifying this sandbox.

Request

This endpoint expects an object.
inputs
list of unionsRequired
The inputs for the scenario
label
stringOptional
scenario_id
stringOptional
The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended.

Response

This endpoint returns an object
inputs
list of unions
The inputs for the scenario
id
string
The id of the scenario
label
stringOptional
POST
1curl -X POST https://api.vellum.ai/v1/sandboxes/id/scenarios \
2 -H "X_API_KEY: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "inputs": [],
6 "label": "Scenario 1"
7}'
200
Successful
1{
2 "inputs": [],
3 "id": "id",
4 "label": "label"
5}