Skip to content

Getting started with the API

The Occulights API gives you the same data as the Occulights platform: rooms, Occu-Hub sensors, Occu-Lights, live presence and history, indoor climate and integrations. Use it to show room status in your own app, send occupancy data to Power BI or a workplace platform, or switch an Occu-Light from a system you already run.

https://api.occulights.com/api/v1

All requests use HTTPS. Times are in RFC 3339 format, for example 2026-10-15T09:00:00Z.

  1. Sign in to the Occulights platform at app.occulights.com.
  2. Go to Tokens (app.occulights.com/admin/tokens) and click +. Give the token a name, the email of the person responsible for it, and the date it stops working (Valid Until).
  3. Copy the token and store it as a secret – in a password manager or your system’s secret store, never in source code.

Send the token in the Authorization header of every request:

Authorization: Bearer <your token>

List the rooms in your organisation:

Terminal window
curl https://api.occulights.com/api/v1/rooms/ \
-H "Authorization: Bearer $OCCULIGHTS_TOKEN"
I want to… Endpoint
See if rooms are free or occupied right now GET /presence/?id=… for several sensors, or GET /presence/{id} for one
Get presence history for reports GET /presence/{id}/history with since and until
Get changes pushed to you as they happen Real-time events over WebSocket
Catch up on every change since a point in time GET /events/presence/{cursor} – keep the last cursor and ask for what came after it
Get temperature and humidity GET /events/environment/{cursor}
Set an Occu-Light from your own system PUT /presence/{id} with occupied or vacant
Mark a room as booked PUT /presence/{id}/booked
Create many rooms at once POST /rooms/import

Successful requests return JSON with status 200 (or 201 when something was created). Errors return a JSON body with a message:

Status Meaning
400 The request is not valid – check the parameters and body
401 The token is missing, wrong or expired
404 The room, sensor or Occu-Light does not exist in your organisation
409 It already exists
500 Something went wrong on our side – try again, then contact support

Questions about the API? E-mail support@occulights.com.