Reference
Sandbox
Test scenarios with simulated watches, so you can integrate without watches. Only on sandbox.api.safeonuba.com.
Launch a test scenario
POST/v1/sandbox/scenarios
Any valid token.
Only on sandbox.api.safeonuba.com; in production, 404. A scenario doesn’t invent alerts: simulated watches at a sandbox site send their facts and the usual engine decides, so what arrives —webhook, GET, headcount— is the same as would arrive from a real watch, marked simulated: true. At most five open at once per client and one evacuation per site.
Body application/json SandboxScenarioRequest
Possible values:
sosfallheat_stressevacuationsite_idstring (uuid)The sandbox site. Without it, the first one of yours that is a sandbox site.
Responses
- 202
Launched.
application/json
SandboxScenarioRun - 401
The token is missing, has expired or has been revoked.
application/problem+json
Problem - 403
The token lacks the scope the route requires, or the site doesn’t belong to the client.
application/problem+json
Problem - 404
This is not the sandbox, or the site isn’t yours.
application/problem+json
Problem - 409
An evacuation is already under way at that site, or five scenarios are open.
application/problem+json
Problem - 422
The site isn’t a sandbox site, or it has a real watch and nothing runs.
application/problem+json
Problem - 429
Too many requests, or too much query time: each client has a number of requests per minute (600 by default) and a query time per minute (30 s by default), and each request spends however long it takes, so a long list counts for more than a single alert.
Retry-Aftersays when to retry.application/problem+json
Problem
Request · sandbox
curl -X POST "https://sandbox.api.safeonuba.com/v1/sandbox/scenarios" \
-H "Authorization: Bearer $SAFEONUBA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"scenario": "sos"
}'const res = await fetch('https://sandbox.api.safeonuba.com/v1/sandbox/scenarios', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SAFEONUBA_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"scenario": "sos"
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);import os
import requests
res = requests.post(
"https://sandbox.api.safeonuba.com/v1/sandbox/scenarios",
headers={"Authorization": f"Bearer {os.environ['SAFEONUBA_TOKEN']}"},
json={
"scenario": "sos",
},
timeout=10,
)
res.raise_for_status()using System.Net.Http.Headers;
using System.Text;
using var http = new HttpClient();
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(
"Bearer", Environment.GetEnvironmentVariable("SAFEONUBA_TOKEN"));
var contenido = new StringContent("""
{
"scenario": "sos"
}
""", Encoding.UTF8, "application/json");
var res = await http.PostAsync("https://sandbox.api.safeonuba.com/v1/sandbox/scenarios", contenido);
res.EnsureSuccessStatusCode();Response 202
{
"run_id": "0f6c2b7e-3a1d-4c55-9b0e-7d2f4a8c1e90",
"scenario": "sos",
"site_id": "0f6c2b7e-3a1d-4c55-9b0e-7d2f4a8c1e90",
"resource": {
"type": "alert",
"id": "0f6c2b7e-3a1d-4c55-9b0e-7d2f4a8c1e90"
},
"ends_at": "2026-09-24T11:04:12Z"
}