Delete Scenario
Permanently delete a scenario and its associated schedules.
Delete Scenario
Permanently removes a scenario and all schedules linked to it. Existing simulation results are preserved.
This action is irreversible. All schedules associated with this scenario will also be deleted.
Endpoint
DELETE /api/v1/scenarios/:id
curl -X DELETE "https://api.chanl.ai/api/v1/scenarios/scenario_abc123" \
-H "Authorization: Bearer <access_token>"const response = await fetch('https://api.chanl.ai/api/v1/scenarios/scenario_abc123', {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${accessToken}`,
},
});
const data = await response.json();import requests
response = requests.delete(
'https://api.chanl.ai/api/v1/scenarios/scenario_abc123',
headers={'Authorization': f'Bearer {access_token}'},
)
data = response.json()Path Parameters
idstringrequiredThe scenario ID (e.g., scenario_abc123).
Response
Response
{
"success": true,
"data": {
"message": "Scenario deleted successfully",
"deleted_at": "2025-03-17T10:30:00Z",
"impact": {
"schedules_deleted": 2,
"simulations_preserved": 156
}
}
}Errors
| Status | Code | Description |
|---|---|---|
| 401 | unauthorized | Missing or invalid access token |
| 404 | not_found | Scenario not found |