Door access docs

Any HTTPS-capable device

If your controller, middleware or a small script can make one HTTPS request per tap and open the door on the response, it works with Chronix Hub today. No bridge to wait for.

Works todayWorks with anything that can call a web API.

Updated October 2026

At a glance

Status
Works today
Hardware
Controllers, access platforms, a script on a PC or Raspberry Pi
Members can use
Cards, faces (device user id), QR, one-time PIN
Needs
HTTPS to api.chronixhub.com and a Bearer token

How it connects

  1. Member taps, types or shows a face
  2. Controller or script
  3. POST /api/v1/access/verify
  4. Door opens only on granted: true

Chronix Hub exposes one vendor-neutral endpoint. Your device (or the box in front of it) sends the device ID and the credential it just read. Chronix Hub answers with a decision and a reason, and the device opens only on an explicit yes.

Auth is a Bearer device key. Each key belongs to one device and can only ask door-access questions, so a leaked key cannot read member data.

What counts as HTTPS-capable

The test is simple: can it call a web API for each access attempt and act on the reply?

  • Access-control platforms and controllers with an HTTP or webhook decision step.
  • Middleware or an integrator's custom service sitting between the reader and the lock.
  • A small script on a PC or Raspberry Pi next to the reader, with a relay to the lock.
  • A face terminal whose middleware can send its own user id for the person.
  • Hardware that only speaks its own protocol is not HTTPS-capable on its own. See the ZKTeco, Hikvision, Suprema and Kisi pages.

What members can use

Whatever your device can read, as long as it sends one of these credential types.

Card

The card number as the reader reads it. Add the same number under the member's Door access tab first.

Face

The terminal's own user id for the person, mapped to the member. No photos or biometrics are stored in Chronix Hub.

QR pass

A reader that scans QR codes sends the full scanned text as type qr. The member shows it from My memberships. It refreshes every 30 seconds and works once.

One-time PIN

A keypad sends the 6-digit code the member typed as type pin. The code comes from Show PIN in the portal, lasts 5 minutes and works once.

Connect it, step by step

You will need admin access and the person who configures the device.

  1. Create the door and schedule

    Doors tab: name the door, pick a schedule and set anti-passback. See the overview for the details.

  2. Add the device

    Devices tab, Add device. Name it, choose vendor Other (any device that can call a web API), pick the door. Add the gym's public IP to the allowlist.

  3. Copy the key and device ID

    The key is shown once. Store it in the device's secret store, not in a shared document. The device ID (or its exact name) goes in every request.

  4. Make the device POST each tap

    Send the request below to the verify endpoint with the key as a Bearer token. Open the door only when the response is 200 with granted: true.

  5. Send a heartbeat

    Optionally ping the heartbeat endpoint about once a minute so the Devices tab shows Online (heard from in the last 2 minutes).

  6. Test with a real card

    Tap a member's card and watch the Live Log. You should see the attempt and its reason within seconds.

The API in one screen

This is the whole contract a device needs. The deviceId is the device's id or its exact name. The full reference lives in the API docs.

Ask: may this card enter?
curl -X POST https://api.chronixhub.com/api/v1/access/verify   -H "Authorization: Bearer $CHRONIX_DEVICE_KEY"   -H "Content-Type: application/json"   -d '{
    "deviceId": "Front turnstile",
    "credential": { "type": "card", "value": "0012345678" }
  }'
Answer: yes
HTTP 200
{
  "granted": true,
  "reason": "active_membership",
  "memberId": "clx...",
  "memberName": "Sara Haddad",
  "expiresAt": "2026-12-31T23:59:59.000Z",
  "displayMessage": "Welcome, Sara"
}
Answer: no, with a reason
HTTP 200
{
  "granted": false,
  "reason": "membership_frozen",
  "displayMessage": "Membership is frozen"
}

Credential types

Send exactly one credential per request.

Credential typeValue to send
cardThe card number as the reader reads it.
pinThe 6-digit one-time code the member typed.
faceThe terminal's own user id for the person.
qrThe full text the reader scanned from the member's QR.
Heartbeat (optional)
curl -X POST https://api.chronixhub.com/api/v1/access/heartbeat   -H "Authorization: Bearer $CHRONIX_DEVICE_KEY"   -H "Content-Type: application/json"   -d '{ "deviceId": "Front turnstile", "firmwareVersion": "1.4.2" }'

HTTP 200
{ "ok": true, "serverTime": "2026-10-21T08:30:00.000Z" }
Opening the door safely
// Open the door ONLY on an explicit yes. Everything else is "no".
const res = await fetch("https://api.chronixhub.com/api/v1/access/verify", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CHRONIX_DEVICE_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ deviceId, credential: { type, value } }),
});
const open = res.status === 200 && (await res.json()).granted === true;
if (open) unlockDoor();

Rules your integration must follow

  • Only HTTP 200 with granted: true opens the door. Treat every other status and every timeout as a no.
  • Every decision, including a refusal, is a 200. Non-200 means a problem with the request or key: 400, 401, 403, 404, 429 or 5xx.
  • Never put the key in a query string or a URL. Use the Authorization header.
  • Show displayMessage on the device's screen if it has one. It is short and safe to show.
  • A denied PIN never includes a member name, so do not expect one.
  • Respect 429 by waiting before you retry. The default limit is 60 attempts a minute per device.
  • Fail open is a setting for when the device cannot reach Chronix Hub at all. A server error is never permission to open.
Open the full API reference

Troubleshooting

What you seeLikely causeFix
401 from the verify callKey missing, wrong or regenerated.Copy the current key again, or Regenerate key and update the device.
403 from the verify callIP not in the allowlist, wrong kind of key, or door access is not on the studio's plan.Check the allowlist against the gym's public IP and confirm the plan.
404 from the verify callThe device ID or door does not match this key.Use the device's id or exact name, and only name its own door.
400 validation_failedThe body is malformed, or the key is in the query string.Send JSON with deviceId and credential, key in the header only.
429 at busy timesThe device hit its per-minute limit.Raise Rate limit on the device in the admin (up to 600).
Always unknown_credentialThe card is not registered, was revoked, or the number format differs.Add the credential under Door access, using the number exactly as the reader sends it.
Device shows OfflineNo tap or heartbeat in 2 minutes.Check connectivity and the heartbeat job.

What to ask your installer

Forward this list before they quote.

  • Can the controller or middleware make an HTTPS POST with a Bearer token for each access attempt and open on the response?
  • Can it send a card number, a typed code, a face terminal's user id and a scanned QR as the credential value?
  • Will it treat every error, timeout and non-200 as a refusal?
  • Can it send a heartbeat every minute or so?
  • Where will the device key be stored, and who can read it?
  • What is the gym's public IP, so we can add it to the allowlist?

Frequently asked questions

Do I need to be a developer?

Someone has to configure the device or write the small script. Many access platforms can do this with settings alone. If yours cannot, an integrator can build it against the contract above.

Is there an official integration for my brand?

Chronix Hub does not bundle vendor integrations today and is not an official partner of any hardware maker. Anything that can call the open API works.

Can I test without a real door?

Yes. Create a device, send the curl request with a card you added, and watch the Live Log. The API is the same either way.

How fast is the answer?

A typical answer takes a few hundredths of a second in production, plus your network time to the API.

What about face terminals?

The terminal or its middleware sends its own user id for the person as type face. You map that id to a member under Door access, Add credential, Face. Faces the terminal holds but you have not linked can be reported to the enrollments endpoint and appear under Pending enrollments.

Can the same member use a card and a PIN?

Yes. Anti-passback is per member, not per credential, so a card followed by a PIN at the same door inside the window is refused.

Other ways to connect

Back to the door access overview

Product names belong to their owners. Chronix Hub is not a certified or official partner of any hardware maker and does not sell hardware.

Want to see door access on your own studio?

Book a short demo and we will walk through your door, your hardware and your membership plans.