GET/api/v1/legionella/regionipublicList of all 20 Italian regions with cases, incidence per 100k, YoY change.
Example request
curl https://123legionella.com/api/v1/legionella/regioni
Response (sample)
{
"meta": { "license": "CC BY 4.0", "version": "v1" },
"count": 20,
"data": [
{
"regione": "Lombardia",
"slug": "lombardia",
"popolazione": 9985000,
"casiAnnoCorrente": 612,
"incidenzaPer100k": 6.13,
"variazioneYoY": 0.12
}
]
}POST/api/sviluppatori/webhook-subscribepublicRegister a new webhook subscription. Returns a one-time HMAC secret used to verify payload signatures.
Example request
curl -X POST https://123legionella.com/api/sviluppatori/webhook-subscribe \
-H "Content-Type: application/json" \
-d '{
"endpointUrl": "https://your-app.com/webhook",
"contactEmail": "dev@your-app.com",
"events": ["lead.created","order.paid"]
}'Response (sample)
{
"ok": true,
"id": 42,
"endpointUrl": "https://your-app.com/webhook",
"events": ["lead.created","order.paid"],
"secret": "a1b2c3...",
"note": "Store this secret securely — won't be shown again."
}POST/api/sviluppatori/webhook-testpublicTrigger a test webhook delivery to ALL subscriptions listening for the given event.
Example request
curl -X POST https://123legionella.com/api/sviluppatori/webhook-test \
-H "Content-Type: application/json" \
-d '{"event":"lead.created"}'Response (sample)
{
"ok": true,
"event": "lead.created",
"sent": 1,
"failed": 0,
"skipped": 0
}GET/api/admin/webhook-deliveriesbearer adminAdmin-only: list recent webhook delivery attempts with status, response code, retry count.
Example request
curl https://123legionella.com/api/admin/webhook-deliveries \
-H "Authorization: Bearer $ADMIN_API_SECRET"
Response (sample)
{
"ok": true,
"count": 50,
"deliveries": [
{ "id": 1, "event_type": "lead.created", "status": "delivered",
"response_status": 200, "retry_count": 0 }
]
}