Skip to main content
POST
/
api
/
scenario-events
Python
import requests

url = "https://app.langwatch.ai/api/scenario-events"

payload = {
    "type": "<string>",
    "timestamp": 123,
    "batchRunId": "<string>",
    "scenarioId": "<string>",
    "scenarioRunId": "<string>",
    "metadata": {
        "name": "<string>",
        "description": "<string>"
    }
}
headers = {
    "X-Auth-Token": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
{
  "success": true,
  "url": "<string>"
}

Authorizations

X-Auth-Token
string
header
required

Body

application/json
  • Option 1
  • Option 2
  • Option 3
type
string
required
Allowed value: "SCENARIO_RUN_STARTED"
timestamp
number
required
batchRunId
string
required
scenarioId
string
required
scenarioRunId
string
required
metadata
object
required
rawEvent
any
scenarioSetId
string
default:default

Response

Event created successfully

success
boolean
required
url
string | null
⌘I