Scenario Evaluation Config
API Contract
REST
/api/v1/scenario-configs
9 endpoints
GET
/api/v1/scenario-configs/api/v1/scenario-configs
List all scenario evaluation configuration entries
Public
Response Example
{
"data": [
{
"id": "cfg_01HCFG001",
"scenario_type": "inactivity",
"org_id": null,
"inactivity_threshold_days": 7,
"cooldown_days": 3,
"enabled": true,
"updated_at": "2026-01-15T00:00:00Z"
},
{
"id": "cfg_01HCFG002",
"scenario_type": "certification_expiry",
"org_id": null,
"lead_time_days": 30,
"cooldown_days": 7,
"enabled": true,
"updated_at": "2026-01-15T00:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 9
}
}
GET
/api/v1/scenario-configs/api/v1/scenario-configs/:id
Get a specific scenario configuration entry
Public
Response Example
{
"id": "cfg_01HCFG001",
"scenario_type": "inactivity",
"org_id": null,
"inactivity_threshold_days": 7,
"cooldown_days": 3,
"enabled": true,
"updated_at": "2026-01-15T00:00:00Z"
}
POST
/api/v1/scenario-configs/api/v1/scenario-configs
Create a new scenario evaluation configuration (e.g. org-level override)
Public
Request Example
{
"scenario_type": "inactivity",
"org_id": "org_oslo_01",
"inactivity_threshold_days": 5,
"cooldown_days": 2,
"enabled": true
}
Response Example
{
"id": "cfg_01HCFG050",
"scenario_type": "inactivity",
"org_id": "org_oslo_01",
"inactivity_threshold_days": 5,
"cooldown_days": 2,
"enabled": true,
"updated_at": "2026-03-26T10:30:00Z"
}
PUT
/api/v1/scenario-configs/api/v1/scenario-configs/:id
Update a scenario evaluation configuration entry
Public
Request Example
{
"inactivity_threshold_days": 10,
"cooldown_days": 5
}
Response Example
{
"id": "cfg_01HCFG001",
"scenario_type": "inactivity",
"org_id": null,
"inactivity_threshold_days": 10,
"cooldown_days": 5,
"enabled": true,
"updated_at": "2026-03-26T10:31:00Z"
}
DELETE
/api/v1/scenario-configs/api/v1/scenario-configs/:id
Delete a scenario configuration entry
Public
Response Example
{
"success": true,
"deleted_id": "cfg_01HCFG050"
}
GET
/api/v1/scenario-configs/api/v1/scenario-configs/inactivity-threshold/:scenarioType
Get the inactivity threshold days for a specific scenario type
Public
Response Example
{
"scenario_type": "inactivity",
"org_id": "org_oslo_01",
"inactivity_threshold_days": 5,
"source": "org_override"
}
GET
/api/v1/scenario-configs/api/v1/scenario-configs/cooldown/:scenarioType
Get the cooldown period in days for a specific scenario type
Public
Response Example
{
"scenario_type": "inactivity",
"org_id": "org_oslo_01",
"cooldown_days": 2,
"source": "org_override"
}
GET
/api/v1/scenario-configs/api/v1/scenario-configs/milestone-thresholds
Get all milestone thresholds and their trigger counts
Public
Response Example
{
"milestone_thresholds": [
{
"milestone_type": "first_session_completed",
"trigger_count": 1,
"notification_enabled": true
},
{
"milestone_type": "sessions_5_completed",
"trigger_count": 5,
"notification_enabled": true
},
{
"milestone_type": "sessions_10_completed",
"trigger_count": 10,
"notification_enabled": false
}
]
}
GET
/api/v1/scenario-configs/api/v1/scenario-configs/org-enabled/:scenarioType
Check whether a scenario type is enabled for a given org
Public
Response Example
{
"scenario_type": "inactivity",
"org_id": "org_oslo_01",
"enabled": true,
"source": "org_override"
}