API reference

Manage your devices from scripts and CI. Available on plans that include API access; create a key in your dashboard.

Send Authorization: Bearer YOUR_KEY. Requests are limited to 60 per minute per key. Responses are JSON.

Endpoints

REST
GET    /api/v1/account                       plan, email, device usage
GET    /api/v1/devices                       list devices (online, offline or pending)
GET    /api/v1/devices/{name}                one device
POST   /api/v1/devices                       create a device: {"name":"my-device"}
POST   /api/v1/devices/{name}/enroll-code    new one-time code for a pending device
DELETE /api/v1/devices/{name}                remove a device and disconnect it

Example

terminal
curl -X POST -H "Authorization: Bearer $KEY" -d '{"name":"garage-pi"}' https://exposenow.net/api/v1/devices

The response contains enroll_command. Run it on the device with the device's own key. The code works once and expires after an hour.

Webhooks

If your plan includes webhook alerts, device.offline and device.online events are POSTed as JSON to your https URL. Verify them with the X-Exposenow-Signature header: sha256= followed by the hex HMAC-SHA256 of timestamp + "." + body using your signing secret, where the timestamp is the X-Exposenow-Timestamp header. Reject requests whose timestamp is more than a few minutes old.