AIRLERT-OPEN-API Partner Developer Guide

AIRlert POSTs selected HUB messages to a partner HTTPS endpoint as signed JSON. The partner system verifies the request, stores or routes the event, and returns an accepted HTTP status.

Flow

  1. A HUB message is ingested by AIRlert.
  2. The portal stores it in user_data.
  3. If the HUB is in allowed_hub_ids, AIRlert POSTs the event to the partner endpoint.
  4. The partner endpoint verifies authentication and returns HTTP 200 or 202.

Request

Payload

Schema 1.1 is additive. location and sensor remain. New keys: sensor_serial (stable mapping id), bed, room, event_type (seizure / bed_exit / bed_occupied / low_battery / sensor_fault, classified by CAPCODE only; occupancy is a legacy alias), capcode. Partners that still expect 1.0 can set payload_schema to 1.0 (new keys omitted).

{
    "type": "airlert.hub.message.ingested",
    "schema_version": "1.1",
    "event_id": "airlert-9a8b7c6d5e4f3210abcd1234-a1b2c3d4",
    "occurred_at_unix": 1781766000,
    "occurred_at": "2026-06-18T06:20:00Z",
    "source": "airlert_portal",
    "ingest_endpoint": "tttupload.php",
    "hub": {
        "canonical_hub_id": 42,
        "user_data_hub_id": 42,
        "hub_name": "Bedroom hub",
        "user_id": 3
    },
    "message": {
        "location": "Room 1",
        "sensor": "Bed pad",
        "raw": "Not Return to Bed",
        "presented": "Not Return to Bed",
        "user_data_id": 123456,
        "sensor_serial": "MAT-001",
        "bed": "Bed 1",
        "room": "Room 1",
        "event_type": "seizure",
        "capcode": "1234567"
    }
}

Authentication

Token rotation endpoint

Response and logging

OpenAPI

Use airlert_open_api_spec.php on the portal for the live OpenAPI JSON document.