Getting started
An owner makes an API key under Integrations in the OneIn web app. API access is an extra on the Multi-door and Max plans (£19.99 a month + VAT, added under Integrations) and is included with Enterprise. Each key can be limited to particular venues. Send the key as a bearer token on every request:
curl https://app.oneinhq.com/api/v1/venues \
-H "Authorization: Bearer onein_…"Responses are JSON. Times are ISO 8601 in UTC. Dates are the venue’s trading nights: a night that runs past midnight stays one night, named by the day it started.
Errors and limits
Errors come back as { "code": "…", "message": "…" } with a matching status: 401 for a missing, invalid or revoked key, 403 when the organisation doesn’t have API access, 404 for a venue the key can’t read, 429 above 60 requests a minute per key. The message is written for people and safe to show.
List venues
GET https://app.oneinhq.com/api/v1/venues
The venues this key can read, sorted by name.
Example response
{
"venues": [
{
"id": "v_riverside",
"name": "Riverside Bar",
"capacity": 250,
"timeZone": "Europe/London",
"doors": [
{
"id": "front",
"name": "Front door"
},
{
"id": "side",
"name": "Side exit"
}
],
"channels": {
"twoChannels": false,
"labels": [
"A",
"B"
]
},
"hours": [
null,
{
"opens": "17:00",
"closes": "01:00"
},
{
"opens": "17:00",
"closes": "01:00"
},
{
"opens": "17:00",
"closes": "01:00"
},
{
"opens": "17:00",
"closes": "02:00"
},
{
"opens": "17:00",
"closes": "04:00"
},
{
"opens": "17:00",
"closes": "04:00"
}
]
}
]
}One venue
GET https://app.oneinhq.com/api/v1/venues/{venueId}
| Parameter | Where | Notes |
|---|---|---|
venueId | path | From GET /venues. |
Example response
{
"id": "v_riverside",
"name": "Riverside Bar",
"capacity": 250,
"timeZone": "Europe/London",
"doors": [
{
"id": "front",
"name": "Front door"
},
{
"id": "side",
"name": "Side exit"
}
],
"channels": {
"twoChannels": false,
"labels": [
"A",
"B"
]
},
"hours": [
null,
{
"opens": "17:00",
"closes": "01:00"
},
{
"opens": "17:00",
"closes": "01:00"
},
{
"opens": "17:00",
"closes": "01:00"
},
{
"opens": "17:00",
"closes": "02:00"
},
{
"opens": "17:00",
"closes": "04:00"
},
{
"opens": "17:00",
"closes": "04:00"
}
]
}Who’s in now
GET https://app.oneinhq.com/api/v1/venues/{venueId}/live
The current trading night’s totals. `capacityState` is ok, warn (90% or more) or full. `byDoor` is keyed by door id.
| Parameter | Where | Notes |
|---|---|---|
venueId | path | From GET /venues. |
Example response
{
"venueId": "v_riverside",
"day": "2026-10-03",
"total": 184,
"ins": 212,
"outs": 28,
"capacity": 250,
"capacityState": "ok",
"byDoor": {
"front": {
"ins": 212,
"outs": 28
}
},
"byChannel": [
184,
0
],
"updatedAt": "2026-10-03T23:41:08.120Z"
}Trading nights
GET https://app.oneinhq.com/api/v1/venues/{venueId}/nights
Nights between `from` and `to` inclusive, most recent first; the last 31 days by default, up to 92 at a time. Send `Accept: text/csv` (or `?format=csv`) for a CSV with one row per night.
| Parameter | Where | Notes |
|---|---|---|
venueId | path | From GET /venues. |
from (optional) | query | A date like 2026-10-04. Example: 2026-09-01. |
to (optional) | query | A date like 2026-10-04. Example: 2026-09-30. |
Example response
{
"venueId": "v_riverside",
"nights": [
{
"venueId": "v_riverside",
"date": "2026-10-03",
"peak": 231,
"peakAt": "2026-10-04T00:45:00.000Z",
"entries": 612,
"exits": 609,
"entriesBy15": {
"20:00": 8,
"20:15": 6,
"20:30": 11
}
}
]
}One night
GET https://app.oneinhq.com/api/v1/venues/{venueId}/nights/{date}
A night’s peak, entries, exits and entries in every 15-minute slot (keyed by local time). CSV gives one row per slot.
| Parameter | Where | Notes |
|---|---|---|
venueId | path | From GET /venues. |
date | path | A date like 2026-10-04. Example: 2026-10-03. |
Example response
{
"venueId": "v_riverside",
"date": "2026-10-03",
"peak": 231,
"peakAt": "2026-10-04T00:45:00.000Z",
"entries": 612,
"exits": 609,
"entriesBy15": {
"20:00": 8,
"20:15": 6,
"20:30": 11
}
}Counters
GET https://app.oneinhq.com/api/v1/counters
Every clicker and phone in the organisation that this key’s venues cover: where it is and how it’s doing. `signal` is WiFi RSSI in dBm.
Example response
{
"counters": [
{
"id": "ON1-24A7C3",
"kind": "clicker",
"label": "Front door",
"venueId": "v_riverside",
"doorId": "front",
"lastSeenAt": "2026-10-03T23:41:02.000Z",
"batteryPct": 74,
"signal": -58,
"version": "1.2.0"
}
]
}Webhooks
Rather than polling, have OneIn tell you. An owner adds an endpoint under Integrations, choosing which events it gets and for which venues, and receives a signing secret once. OneIn then POSTs JSON to the endpoint:
| Event | When |
|---|---|
occupancy.changed | The live total, at most once per venue every 10 seconds. |
capacity.state_changed | Quiet, nearly full or full: sent on the change only. |
night.closed | The finished night’s summary when the trading day ends. |
counter.offline | A counter at a door hasn’t checked in for 10 minutes. |
counter.battery_low | A clicker’s battery is under 15%. |
Example body
{
"id": "dlv_k7m2p9x4qw3n8vz5bt6c",
"event": "capacity.state_changed",
"createdAt": "2026-10-03T23:41:08.120Z",
"orgId": "org_4f2a",
"venueId": "v_riverside",
"data": {
"state": "warn",
"previous": "ok",
"total": 226,
"capacity": 250
}
}data depends on the event. occupancy.changed carries the same fields as the live endpoint. night.closed carries the same as one night. The counter events carry counterId, label, doorId and lastSeenAt or batteryPct. A test.ping is sent when you press Send test.
Headers
OneIn-Event: capacity.state_changed
OneIn-Delivery: dlv_k7m2p9x4qw3n8vz5bt6c
OneIn-Signature: t=1759534868,v1=5f1c…Verify the signature before trusting a delivery: take t from the header, join it to the raw body with a dot, HMAC-SHA256 it with your secret, and compare with v1 in constant time. Reject anything whose t is more than five minutes old.
import { createHmac, timingSafeEqual } from 'node:crypto';
export function verify(secret, header, rawBody) {
const { t, v1 } = Object.fromEntries(header.split(',').map((p) => p.split('=')));
if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
const expected = createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
return expected.length === v1.length && timingSafeEqual(Buffer.from(expected), Buffer.from(v1));
}Respond with a 2xx within 10 seconds, and do the real work afterwards. Anything else is retried with growing gaps for several hours. After five deliveries in a row have been given up, the endpoint is paused; an owner can fix it and press Resume. Deliveries may arrive more than once or out of order, so key your handling on the delivery id. The last ten deliveries, with response codes, are shown under Integrations, where any can be resent.
OpenAPI and Postman
The same description, for machines: /api/v1/openapi.json. Import that URL into Postman, Insomnia or a client generator and every endpoint above appears with its parameters and examples.
Next is a write endpoint for pushing counts in from your own devices or ticketing. Say what you’d build with it: .