curl -g "https://YOUR_PROJECT.texterchat.com/server/api/v2/scenarios/runs?scenarioId=6970b3c1d2e3f40123456789&sortStarted=desc&limit=20" \
-H "Authorization: Bearer YOUR_API_TOKEN"{
"total": 1,
"runs": [
{
"_id": "6970c4d5e6f7a80123456789",
"scenarioId": "6970b3c1d2e3f40123456789",
"version": 1,
"triggerEvent": "domain.message.created",
"started": 1768315000000,
"executionTime": 84,
"success": true,
"conditionsResult": true,
"steps": [
{
"type": "action",
"name": "request",
"executionTime": 71,
"paramsIsValid": true,
"confidentialData": false
}
]
}
]
}{
"error": "<string>"
}Scenarios (Advanced)
List Scenario Runs
Retrieve execution records of your scenarios - useful for debugging webhook subscriptions: see whether the event fired, whether the conditions matched (conditionsResult), whether the webhook request succeeded (success), and per-step timings and errors.
GET
https://{projectID}.texterchat.com/server/api/v2
/
scenarios
/
runs
curl -g "https://YOUR_PROJECT.texterchat.com/server/api/v2/scenarios/runs?scenarioId=6970b3c1d2e3f40123456789&sortStarted=desc&limit=20" \
-H "Authorization: Bearer YOUR_API_TOKEN"{
"total": 1,
"runs": [
{
"_id": "6970c4d5e6f7a80123456789",
"scenarioId": "6970b3c1d2e3f40123456789",
"version": 1,
"triggerEvent": "domain.message.created",
"started": 1768315000000,
"executionTime": 84,
"success": true,
"conditionsResult": true,
"steps": [
{
"type": "action",
"name": "request",
"executionTime": 71,
"paramsIsValid": true,
"confidentialData": false
}
]
}
]
}{
"error": "<string>"
}Required token scopes:
View scenarios runsהרשאות
פרמטרי שאילתה
תגובה
The matching runs and total count. Field-by-field reference: The Scenario Run object