Developers
The Wybox API sandbox.
Create an asset, create a recipient, then read which assets an official warning affects. Samples on this page are example data.
Quick start
- Ask for a sandbox key. We reply by email.
- Create an asset with POST /v1/assets.
- Create a recipient with POST /v1/recipients.
- Read GET /v1/alerts.
Example data
# Example data. The host below is not a live Wybox endpoint.
# Use the base URL issued with your sandbox key.
curl -s https://api.example.invalid/v1/assets \
-H "Authorization: Bearer $WYBOX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Example truck 18","kind":"vehicle","geometry":{"type":"Point","coordinates":[-97.5,30.2]}}'
curl -s https://api.example.invalid/v1/recipients \
-H "X-Api-Key: $WYBOX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Example dispatcher","channel":"email","address":"dispatch@example.com","language":"en"}'
curl -s https://api.example.invalid/v1/alerts \
-H "Authorization: Bearer $WYBOX_API_KEY"// Example data. The host below is not a live Wybox endpoint.
const base = "https://api.example.invalid";
const headers = {
Authorization: `Bearer ${process.env.WYBOX_API_KEY}`,
"Content-Type": "application/json",
};
await fetch(`${base}/v1/assets`, {
method: "POST",
headers,
body: JSON.stringify({
name: "Example truck 18",
kind: "vehicle",
geometry: { type: "Point", coordinates: [-97.5, 30.2] },
}),
});
await fetch(`${base}/v1/recipients`, {
method: "POST",
headers,
body: JSON.stringify({
name: "Example dispatcher",
channel: "email",
address: "dispatch@example.com",
language: "en",
}),
});
const alerts = await fetch(`${base}/v1/alerts`, { headers });
console.log(await alerts.json()); Example alert
Example data
JSON
{
"data": [
{
"id": "alt_example",
"source": "Example Agency",
"event": "Flood Warning",
"headline": "Example data: Flood Warning",
"instruction": "Example data. Not an official bulletin.",
"affected_asset_ids": ["ast_example_18", "ast_example_42", "ast_example_7"]
}
]
} Where to go next
Request sandbox access
Early access. Sandbox open to design partners. We review requests manually and reply by email.