Skip to content

Reference

Devices

Door phones authorized by a link, scoped to one event.

View as Markdown

Every operation below is also in the OpenAPI document. One that names an MCP tool can be called through the MCP server; one that names none cannot.

List door devices#

GET /v1/devices

Operation id listDevices. MCP tool list_devices. SDK tickets.devices.list.

Door devices (phones), filtered by event or status, with their gate and whether they may sell.

Who may call it. Any one of: An API key with scope full, read. Any other scope answers insufficient_scope; A signed-in dashboard member whose role has read (owner, admin, staff, viewer).

ParameterInTypeDescription
limitqueryintegerHow many to return, 1 to 100 (default 20).
starting_afterquerystringAn id from the page before: the page after it.
ending_beforequerystringAn id from the page after: the page before it. A list read from the database offers it as the list comes and filtered by event alone, in the default order, and answers parameter_invalid to any other…
eventquerystringAn id starting with evt_.
statusquery"pending" | "active" | "revoked" | "expired"pending (made, not yet opened on a phone), active, revoked, expired.

Answers 200. A page of devices.

Fields

FieldTypeDescription
object *"list"
data *array of DeviceThis page, newest first.
has_more *booleanTrue when there is another page: pass the last id as starting_after.
url *"/v1/devices"The path this list came from (/v1/devices).

* required

Authorize a door phone (a link and QR)#

POST /v1/devices

Operation id createDevice. MCP tool create_device. SDK tickets.devices.create.

Authorizes a door phone for one event. The answer carries a one-time pairing_url: open it on the phone (or scan its QR). sales_allowed: true lets the phone sell at the gate. No answer is kept for a retry, because it holds the pairing code: a call whose answer was lost may have made a device, so list the devices before you try again. A device that never paired does nothing and can be revoked.

Who may call it. Any one of: An API key with scope full. Any other scope answers insufficient_scope; A signed-in dashboard member whose role has devices.manage (owner, admin, staff).

Request body (CreateDeviceInput)

FieldTypeDescription
event *stringAn id starting with evt_.
name *string
gatestringA gate or door name ("Gate B").
sales_allowedboolean
expires_atstring (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.

* required

JSON
{
  "event": "evt_yrd2027",
  "name": "Gate B phone",
  "gate": "Gate B",
  "sales_allowed": true
}

Answers 201. The device, with its one-time pairing_url.

Fields (Device)

FieldTypeDescription
object *"device"
id *stringAn id starting with dev_.
mode *Modetest or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix.
event *stringAn id starting with evt_.
name *string
gate *string | null
sales_allowed *booleanMay sell at the gate.
status *DeviceStatuspending (made, not yet opened on a phone), active, revoked, expired.
pairing_url *string | nullThe one-time link (and QR) that authorizes a phone: only in the answer that made it, until it is used.
expires_at *string (date-time)After the event's last day by default.
last_seen_at *string | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
manifest_at *string | nullWhen it last downloaded the offline manifest (its generated_at); null: never. Older than 10 minutes while doors are open, its offline answers may be stale.
pending_scans *integer | nullOffline scans it holds that the server has not seen, as it last reported (each manifest refresh sends pending_scans, and each sync says what it still holds, a revoked phone's too); null: it never reported. A phone with…
created_by *ActorWho made a change.
created_at *string (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
revoked_at *string | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
hand_in_countintegerRecords this phone handed in after it was turned off, at most 2000. Absent: none.
hand_in_settledintegerHow many of those a manager has dealt with (POST /v1/devices/{id}/hand_in): the Check-in page speaks up while hand_in_count is above it.
hand_in_ended_atstring (date-time)A manager ended the phone's hand-in early.

* required

Errors of its own. invalid_state_transition. The errors every operation can answer are on the errors page.

The calling device#

GET /v1/devices/me

Operation id getThisDevice.

The device making the call, with its event, gate and whether it may sell. A door app calls this on start.

Who may call it. A door device, for its own event.

Answers 200. This device.

Fields (Device)

FieldTypeDescription
object *"device"
id *stringAn id starting with dev_.
mode *Modetest or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix.
event *stringAn id starting with evt_.
name *string
gate *string | null
sales_allowed *booleanMay sell at the gate.
status *DeviceStatuspending (made, not yet opened on a phone), active, revoked, expired.
pairing_url *string | nullThe one-time link (and QR) that authorizes a phone: only in the answer that made it, until it is used.
expires_at *string (date-time)After the event's last day by default.
last_seen_at *string | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
manifest_at *string | nullWhen it last downloaded the offline manifest (its generated_at); null: never. Older than 10 minutes while doors are open, its offline answers may be stale.
pending_scans *integer | nullOffline scans it holds that the server has not seen, as it last reported (each manifest refresh sends pending_scans, and each sync says what it still holds, a revoked phone's too); null: it never reported. A phone with…
created_by *ActorWho made a change.
created_at *string (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
revoked_at *string | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
hand_in_countintegerRecords this phone handed in after it was turned off, at most 2000. Absent: none.
hand_in_settledintegerHow many of those a manager has dealt with (POST /v1/devices/{id}/hand_in): the Check-in page speaks up while hand_in_count is above it.
hand_in_ended_atstring (date-time)A manager ended the phone's hand-in early.

* required

Errors of its own. device_token_invalid. The errors every operation can answer are on the errors page.

Retrieve a device#

GET /v1/devices/{id}

Operation id getDevice. MCP tool get_device. SDK tickets.devices.retrieve.

One door device with its event, gate, status, whether it may sell, and when it last called.

Who may call it. Any one of: An API key with scope full, read. Any other scope answers insufficient_scope; A signed-in dashboard member whose role has read (owner, admin, staff, viewer).

ParameterInTypeDescription
id *pathstringAn id starting with dev_.

Answers 200. The device.

Fields (Device)

FieldTypeDescription
object *"device"
id *stringAn id starting with dev_.
mode *Modetest or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix.
event *stringAn id starting with evt_.
name *string
gate *string | null
sales_allowed *booleanMay sell at the gate.
status *DeviceStatuspending (made, not yet opened on a phone), active, revoked, expired.
pairing_url *string | nullThe one-time link (and QR) that authorizes a phone: only in the answer that made it, until it is used.
expires_at *string (date-time)After the event's last day by default.
last_seen_at *string | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
manifest_at *string | nullWhen it last downloaded the offline manifest (its generated_at); null: never. Older than 10 minutes while doors are open, its offline answers may be stale.
pending_scans *integer | nullOffline scans it holds that the server has not seen, as it last reported (each manifest refresh sends pending_scans, and each sync says what it still holds, a revoked phone's too); null: it never reported. A phone with…
created_by *ActorWho made a change.
created_at *string (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
revoked_at *string | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
hand_in_countintegerRecords this phone handed in after it was turned off, at most 2000. Absent: none.
hand_in_settledintegerHow many of those a manager has dealt with (POST /v1/devices/{id}/hand_in): the Check-in page speaks up while hand_in_count is above it.
hand_in_ended_atstring (date-time)A manager ended the phone's hand-in early.

* required

Rename, move to a gate, allow sales#

PATCH /v1/devices/{id}

Operation id updateDevice. MCP tool update_device. SDK tickets.devices.update.

Renames a device, moves it to another gate, or turns gate sales on or off.

Who may call it. Any one of: An API key with scope full. Any other scope answers insufficient_scope; A signed-in dashboard member whose role has devices.manage (owner, admin, staff).

ParameterInTypeDescription
id *pathstringAn id starting with dev_.

Request body (UpdateDeviceInput)

FieldTypeDescription
namestring
gatestring | nullA gate or door name ("Gate B").
sales_allowedboolean
JSON
{
  "gate": null
}

Answers 200. Updated.

Fields (Device)

FieldTypeDescription
object *"device"
id *stringAn id starting with dev_.
mode *Modetest or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix.
event *stringAn id starting with evt_.
name *string
gate *string | null
sales_allowed *booleanMay sell at the gate.
status *DeviceStatuspending (made, not yet opened on a phone), active, revoked, expired.
pairing_url *string | nullThe one-time link (and QR) that authorizes a phone: only in the answer that made it, until it is used.
expires_at *string (date-time)After the event's last day by default.
last_seen_at *string | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
manifest_at *string | nullWhen it last downloaded the offline manifest (its generated_at); null: never. Older than 10 minutes while doors are open, its offline answers may be stale.
pending_scans *integer | nullOffline scans it holds that the server has not seen, as it last reported (each manifest refresh sends pending_scans, and each sync says what it still holds, a revoked phone's too); null: it never reported. A phone with…
created_by *ActorWho made a change.
created_at *string (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
revoked_at *string | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
hand_in_countintegerRecords this phone handed in after it was turned off, at most 2000. Absent: none.
hand_in_settledintegerHow many of those a manager has dealt with (POST /v1/devices/{id}/hand_in): the Check-in page speaks up while hand_in_count is above it.
hand_in_ended_atstring (date-time)A manager ended the phone's hand-in early.

* required

Errors of its own. invalid_state_transition. The errors every operation can answer are on the errors page.

Deal with what a turned-off phone handed in#

POST /v1/devices/{id}/hand_in

Operation id settleDeviceHandIn. MCP tool settle_device_hand_in. SDK tickets.devices.settleHandIn.

Deals with what a turned-off phone handed in (at most 2,000 records). take_back corrects every admission it handed in, each with your reason, so each is on the record and the count moves: while the answer says more, send it again with a new Idempotency-Key. keep lets them stand. end_window stops its sync now.

Who may call it. Any one of: An API key with scope full. Any other scope answers insufficient_scope; A signed-in dashboard member whose role has devices.manage (owner, admin, staff).

ParameterInTypeDescription
id *pathstringAn id starting with dev_.

Request body (SettleHandInInput)

FieldTypeDescription
action *"take_back" | "keep" | "end_window"take_back: every admission this phone handed in, each corrected with this reason, so each is on the record and the count moves; send it again while more is true. keep: they stand. end_window: its sync stops now.
reasonstringRequired for take_back.

* required

JSON
{
  "action": "take_back",
  "reason": "A stolen phone"
}

Answers 200. What was done.

Fields (DeviceHandIn)

FieldTypeDescription
object *"device_hand_in"
device *DeviceA door phone. Its token is scoped to one event (and a gate), expires, and can be revoked. Door staff need no account.
taken_back *integer
skipped *integerAdmissions that could not be taken back (a later re-entry came first).
more *booleanOut of time on this call: send it again.

* required

Errors of its own. invalid_state_transition. The errors every operation can answer are on the errors page.

Revoke a device now#

POST /v1/devices/{id}/revoke

Operation id revokeDevice. MCP tool revoke_device. SDK tickets.devices.revoke.

Revokes a device now: every call answers device_token_invalid, but for one. For 24 hours it can still send the scans it saved offline (POST /v1/checkins/sync), so people it let in aren't lost. Each one is named by the device, and a manager can take it back.

Who may call it. Any one of: An API key with scope full. Any other scope answers insufficient_scope; A signed-in dashboard member whose role has devices.manage (owner, admin, staff).

ParameterInTypeDescription
id *pathstringAn id starting with dev_.

Answers 200. Revoked: its token stops working, but for sending its offline scans for 24 hours.

Fields (Device)

FieldTypeDescription
object *"device"
id *stringAn id starting with dev_.
mode *Modetest or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix.
event *stringAn id starting with evt_.
name *string
gate *string | null
sales_allowed *booleanMay sell at the gate.
status *DeviceStatuspending (made, not yet opened on a phone), active, revoked, expired.
pairing_url *string | nullThe one-time link (and QR) that authorizes a phone: only in the answer that made it, until it is used.
expires_at *string (date-time)After the event's last day by default.
last_seen_at *string | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
manifest_at *string | nullWhen it last downloaded the offline manifest (its generated_at); null: never. Older than 10 minutes while doors are open, its offline answers may be stale.
pending_scans *integer | nullOffline scans it holds that the server has not seen, as it last reported (each manifest refresh sends pending_scans, and each sync says what it still holds, a revoked phone's too); null: it never reported. A phone with…
created_by *ActorWho made a change.
created_at *string (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
revoked_at *string | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
hand_in_countintegerRecords this phone handed in after it was turned off, at most 2000. Absent: none.
hand_in_settledintegerHow many of those a manager has dealt with (POST /v1/devices/{id}/hand_in): the Check-in page speaks up while hand_in_count is above it.
hand_in_ended_atstring (date-time)A manager ended the phone's hand-in early.

* required

Errors of its own. invalid_state_transition. The errors every operation can answer are on the errors page.

A phone trades its pairing code for its token#

POST /v1/devices/pair

Operation id pairDevice.

A phone trades its one-time pairing code for its device token, which is shown once. No key needed: the code is the proof.

Who may call it. Anyone: no key or sign-in is needed.

Request body (PairDeviceInput)

FieldTypeDescription
pairing_code *stringFrom the pairing link.

* required

JSON
{
  "pairing_code": "abcdefghijklmnopqrst"
}

Answers 200. The device token, shown once.

Fields (DevicePairing)

FieldTypeDescription
object *"device_pairing"
device *DeviceA door phone. Its token is scoped to one event (and a gate), expires, and can be revoked. Door staff need no account.
token *stringThe device's bearer token: kept on the phone, shown once.
expires_at *string (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.

* required

Errors of its own. pairing_code_invalid. The errors every operation can answer are on the errors page.