External sensors

Docs API reference

External sensors

A named thing an outside system tells about: a door bell relay, a building system, a button box. It posts READINGS to its own address; a rule on a stage or a block says “when Front door fired in the last 2 minutes” or “when Queue reads at least 10”. Readings are records in the sensor’s own collection (sensors/<key>/), newest first. The ingest takes the sensor’s own key (Authorization: Bearer wfv.<id>.<secret>, shown once), a workspace API key with the sensors scope, or — when signing is on — Wf-Signature: t=<unix s>,v1=<hex HMAC-SHA256(key, t + "." + body)> within 300 s with ?id=<sensor id>, where the key is the sensor’s webhook signing key (shown once when signing is turned on, and on rotate; used as text). reach narrows which stages, stage groups or single screens a sensor’s rules see. With local.enabled, a system on the venue network may post readings straight to a screen (/endpoints lists them and, for the sensor’s own key or an API key, each screen’s local key; needs the new Android TV, desktop and Raspberry Pi players).

List external sensors

GET /sensors sensors

The workspace’s sensor list, key ascending. ?with=state adds each sensor’s newest reading as state: { at, values } | null.

Parameters

  • with string query

    state: add each sensor’s newest reading.

Responses

  • 200 The sensors.
  • 401 Missing or invalid API key.
  • 403 The key lacks the scope, or the role is read-only.
Response fields (200)
  • items object[] required
    15 fields in items
    • _id string
    • key string
    • label string
    • kind string

      One of event, state, input

    • input object

      Kind input (spec 55 §3): who senses, through what, and for which stages or zones.

      3 fields in input
      • device_id string or null

        The paired screen player that senses; null = another system with the sensor’s key.

      • source object or null

        A player’s camera: { type: "local", camera? } or { type: "network", url } — an rtsp:// URL without a login (camera_login). secret_id is set by the server when a login is sealed.

        4 fields in source
        • type string

          One of local, network

        • camera string
        • url string
        • secret_id string read-only
      • targets object[]

        Up to 8 items

        4 fields in targets
        • stage_id string required

          A stage or a zone.

        • senses string[] required
        • area object

          The active part of the picture: { corners: [{x,y}×4] }, fractions clockwise from top-left. Set by calibrating on the device.

        • calibration object

          The hand calibration (spec 18 §5b), measured on the device.

    • collection_id string
    • fields object[]
    • fresh_min integer
    • keep integer
    • token_hint string

      The key’s last 4 characters.

    • signing boolean
    • reach object

      Where a sensor reaches. Missing or { all: true } = every stage. Ids that no longer exist are dropped on save.

      4 fields in reach
      • all boolean
      • stage_ids string[]

        Up to 50 items

      • group_ids string[]

        Stage groups and walls.

        Up to 20 items

      • device_ids string[]

        Single screens.

        Up to 50 items

    • local object

      The local network path: screens accept this sensor’s readings straight from the venue LAN.

      2 fields in local
      • enabled boolean

        Default false.

      • relay boolean

        A screen in a group passes a local reading on to its group. Default true.

    • last_at integer or null

      Server time of the newest reading.

    • last_via string or null

      How the newest reading arrived.

      One of cloud, local, null

  • next_cursor string or null required

    Pass as cursor for the next page; null on the last page.

curl "https://www.wunderframe.com/api/v1/sensors" \
  -H "Authorization: Bearer $WUNDERFRAME_API_KEY"
Response 200
{
  "items": [
    {
      "_id": "3f9a1c0b7d2e4a51",
      "key": "front-door",
      "label": "Front door",
      "kind": "event",
      "collection_id": "col_1",
      "fields": [],
      "fresh_min": 2,
      "keep": 20,
      "token_hint": "x9Qa",
      "signing": false,
      "reach": {
        "all": true
      },
      "local": {
        "enabled": false,
        "relay": true
      },
      "last_at": 1793450000000,
      "last_via": "cloud"
    }
  ],
  "next_cursor": null
}
Error example
Response 401
{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid API key."
  }
}

Create an external sensor

POST /sensors sensors

Makes the sensor and its collection. The answer carries token ONCE (and signing_key once when signing is on): store them in the relay.

Request body required

  • label string required

    What people call it: “Front door”.

    Up to 60 characters

  • key string

    Made from the label when left out. Fixed after creation.

    Pattern ^[a-z0-9][a-z0-9-]{0,38}[a-z0-9]$

  • kind string

    event: it happened. state: it reads something now (one row, at least one field). input: an input device (spec 55) — a camera on another device that senses for stages or zones; its fields are fixed (near, state, count, sign, target), its reach comes from its targets.

    One of event, state, input

  • fields object[]

    Up to 8 items

    3 fields in fields
    • name string required
    • label string
    • type string

      One of text, number

  • fresh_min integer

    How long a firing counts when a rule names no minutes. Default 2.

    1–1440

  • keep integer

    Readings kept (event). Default 20; a state sensor keeps 1.

    1–200

  • signing boolean

    Also accept HMAC-signed webhooks (Wf-Signature). Turning it on answers signing_key once.

  • reach object

    Where a sensor reaches. Missing or { all: true } = every stage. Ids that no longer exist are dropped on save.

    4 fields in reach
    • all boolean
    • stage_ids string[]

      Up to 50 items

    • group_ids string[]

      Stage groups and walls.

      Up to 20 items

    • device_ids string[]

      Single screens.

      Up to 50 items

  • local object

    The local network path: screens accept this sensor’s readings straight from the venue LAN.

    2 fields in local
    • enabled boolean

      Default false.

    • relay boolean

      A screen in a group passes a local reading on to its group. Default true.

  • input object

    Kind input (spec 55 §3): who senses, through what, and for which stages or zones.

    3 fields in input
    • device_id string or null

      The paired screen player that senses; null = another system with the sensor’s key.

    • source object or null

      A player’s camera: { type: "local", camera? } or { type: "network", url } — an rtsp:// URL without a login (camera_login). secret_id is set by the server when a login is sealed.

      3 fields in source
      • type string

        One of local, network

      • camera string
      • url string
    • targets object[]

      Up to 8 items

      4 fields in targets
      • stage_id string required

        A stage or a zone.

      • senses string[] required
      • area object

        The active part of the picture: { corners: [{x,y}×4] }, fractions clockwise from top-left. Set by calibrating on the device.

      • calibration object

        The hand calibration (spec 18 §5b), measured on the device.

  • camera_login object or null

    Kind input, a network camera: its login, sealed on save and never answered; null forgets it, missing keeps it.

    2 fields in camera_login
    • user string
    • password string

Responses

  • 201 The sensor, its key (once) and its ingest address.
  • 400 The request is invalid — details.field names the field when there is one.
  • 401 Missing or invalid API key.
  • 403 The key lacks the scope, or the role is read-only.
  • 409 Conflicts with the current state.
Response fields (201)
  • _id string
  • key string
  • label string
  • kind string

    One of event, state, input

  • input object

    Kind input (spec 55 §3): who senses, through what, and for which stages or zones.

    3 fields in input
    • device_id string or null

      The paired screen player that senses; null = another system with the sensor’s key.

    • source object or null

      A player’s camera: { type: "local", camera? } or { type: "network", url } — an rtsp:// URL without a login (camera_login). secret_id is set by the server when a login is sealed.

      4 fields in source
      • type string

        One of local, network

      • camera string
      • url string
      • secret_id string read-only
    • targets object[]

      Up to 8 items

      4 fields in targets
      • stage_id string required

        A stage or a zone.

      • senses string[] required
      • area object

        The active part of the picture: { corners: [{x,y}×4] }, fractions clockwise from top-left. Set by calibrating on the device.

      • calibration object

        The hand calibration (spec 18 §5b), measured on the device.

  • collection_id string
  • fields object[]
  • fresh_min integer
  • keep integer
  • token_hint string

    The key’s last 4 characters.

  • signing boolean
  • reach object

    Where a sensor reaches. Missing or { all: true } = every stage. Ids that no longer exist are dropped on save.

    4 fields in reach
    • all boolean
    • stage_ids string[]

      Up to 50 items

    • group_ids string[]

      Stage groups and walls.

      Up to 20 items

    • device_ids string[]

      Single screens.

      Up to 50 items

  • local object

    The local network path: screens accept this sensor’s readings straight from the venue LAN.

    2 fields in local
    • enabled boolean

      Default false.

    • relay boolean

      A screen in a group passes a local reading on to its group. Default true.

  • last_at integer or null

    Server time of the newest reading.

  • last_via string or null

    How the newest reading arrived.

    One of cloud, local, null

curl -X POST "https://www.wunderframe.com/api/v1/sensors" \
  -H "Authorization: Bearer $WUNDERFRAME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "label": "Front door",
  "kind": "event",
  "fresh_min": 2
}'
Response 201
{
  "_id": "3f9a1c0b7d2e4a51",
  "key": "front-door",
  "label": "Front door",
  "kind": "event",
  "collection_id": "col_1",
  "fields": [],
  "fresh_min": 2,
  "keep": 20,
  "token_hint": "x9Qa",
  "signing": false,
  "reach": {
    "all": true
  },
  "local": {
    "enabled": false,
    "relay": true
  },
  "last_at": 1793450000000,
  "last_via": "cloud"
}
Error example
Response 400
{
  "error": {
    "code": "invalid",
    "message": "The request is invalid — `details.field` names the field when there is one."
  }
}

Read an external sensor

GET /sensors/{key} sensors

Parameters

  • key string required path

    The sensor’s key, e.g. front-door.

Responses

  • 200 The sensor.
  • 401 Missing or invalid API key.
  • 403 The key lacks the scope, or the role is read-only.
  • 404 Not found in this workspace.
Response fields (200)
  • _id string
  • key string
  • label string
  • kind string

    One of event, state, input

  • input object

    Kind input (spec 55 §3): who senses, through what, and for which stages or zones.

    3 fields in input
    • device_id string or null

      The paired screen player that senses; null = another system with the sensor’s key.

    • source object or null

      A player’s camera: { type: "local", camera? } or { type: "network", url } — an rtsp:// URL without a login (camera_login). secret_id is set by the server when a login is sealed.

      4 fields in source
      • type string

        One of local, network

      • camera string
      • url string
      • secret_id string read-only
    • targets object[]

      Up to 8 items

      4 fields in targets
      • stage_id string required

        A stage or a zone.

      • senses string[] required
      • area object

        The active part of the picture: { corners: [{x,y}×4] }, fractions clockwise from top-left. Set by calibrating on the device.

      • calibration object

        The hand calibration (spec 18 §5b), measured on the device.

  • collection_id string
  • fields object[]
  • fresh_min integer
  • keep integer
  • token_hint string

    The key’s last 4 characters.

  • signing boolean
  • reach object

    Where a sensor reaches. Missing or { all: true } = every stage. Ids that no longer exist are dropped on save.

    4 fields in reach
    • all boolean
    • stage_ids string[]

      Up to 50 items

    • group_ids string[]

      Stage groups and walls.

      Up to 20 items

    • device_ids string[]

      Single screens.

      Up to 50 items

  • local object

    The local network path: screens accept this sensor’s readings straight from the venue LAN.

    2 fields in local
    • enabled boolean

      Default false.

    • relay boolean

      A screen in a group passes a local reading on to its group. Default true.

  • last_at integer or null

    Server time of the newest reading.

  • last_via string or null

    How the newest reading arrived.

    One of cloud, local, null

curl "https://www.wunderframe.com/api/v1/sensors/front-door" \
  -H "Authorization: Bearer $WUNDERFRAME_API_KEY"
Response 200
{
  "_id": "3f9a1c0b7d2e4a51",
  "key": "front-door",
  "label": "Front door",
  "kind": "event",
  "collection_id": "col_1",
  "fields": [],
  "fresh_min": 2,
  "keep": 20,
  "token_hint": "x9Qa",
  "signing": false,
  "reach": {
    "all": true
  },
  "local": {
    "enabled": false,
    "relay": true
  },
  "last_at": 1793450000000,
  "last_via": "cloud"
}
Error example
Response 401
{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid API key."
  }
}

Change an external sensor

PATCH /sensors/{key} sensors

Label and settings, reach and local too; the key stays. Turning signing on answers signing_key ONCE.

Parameters

  • key string required path

    The sensor’s key, e.g. front-door.

Request body required

  • label string

    What people call it: “Front door”.

    Up to 60 characters

  • key string

    Made from the label when left out. Fixed after creation.

    Pattern ^[a-z0-9][a-z0-9-]{0,38}[a-z0-9]$

  • kind string

    event: it happened. state: it reads something now (one row, at least one field). input: an input device (spec 55) — a camera on another device that senses for stages or zones; its fields are fixed (near, state, count, sign, target), its reach comes from its targets.

    One of event, state, input

  • fields object[]

    Up to 8 items

    3 fields in fields
    • name string required
    • label string
    • type string

      One of text, number

  • fresh_min integer

    How long a firing counts when a rule names no minutes. Default 2.

    1–1440

  • keep integer

    Readings kept (event). Default 20; a state sensor keeps 1.

    1–200

  • signing boolean

    Also accept HMAC-signed webhooks (Wf-Signature). Turning it on answers signing_key once.

  • reach object

    Where a sensor reaches. Missing or { all: true } = every stage. Ids that no longer exist are dropped on save.

    4 fields in reach
    • all boolean
    • stage_ids string[]

      Up to 50 items

    • group_ids string[]

      Stage groups and walls.

      Up to 20 items

    • device_ids string[]

      Single screens.

      Up to 50 items

  • local object

    The local network path: screens accept this sensor’s readings straight from the venue LAN.

    2 fields in local
    • enabled boolean

      Default false.

    • relay boolean

      A screen in a group passes a local reading on to its group. Default true.

  • input object

    Kind input (spec 55 §3): who senses, through what, and for which stages or zones.

    3 fields in input
    • device_id string or null

      The paired screen player that senses; null = another system with the sensor’s key.

    • source object or null

      A player’s camera: { type: "local", camera? } or { type: "network", url } — an rtsp:// URL without a login (camera_login). secret_id is set by the server when a login is sealed.

      3 fields in source
      • type string

        One of local, network

      • camera string
      • url string
    • targets object[]

      Up to 8 items

      4 fields in targets
      • stage_id string required

        A stage or a zone.

      • senses string[] required
      • area object

        The active part of the picture: { corners: [{x,y}×4] }, fractions clockwise from top-left. Set by calibrating on the device.

      • calibration object

        The hand calibration (spec 18 §5b), measured on the device.

  • camera_login object or null

    Kind input, a network camera: its login, sealed on save and never answered; null forgets it, missing keeps it.

    2 fields in camera_login
    • user string
    • password string

Responses

  • 200 The sensor.
  • 400 The request is invalid — details.field names the field when there is one.
  • 401 Missing or invalid API key.
  • 403 The key lacks the scope, or the role is read-only.
  • 404 Not found in this workspace.
Response fields (200)
  • _id string
  • key string
  • label string
  • kind string

    One of event, state, input

  • input object

    Kind input (spec 55 §3): who senses, through what, and for which stages or zones.

    3 fields in input
    • device_id string or null

      The paired screen player that senses; null = another system with the sensor’s key.

    • source object or null

      A player’s camera: { type: "local", camera? } or { type: "network", url } — an rtsp:// URL without a login (camera_login). secret_id is set by the server when a login is sealed.

      4 fields in source
      • type string

        One of local, network

      • camera string
      • url string
      • secret_id string read-only
    • targets object[]

      Up to 8 items

      4 fields in targets
      • stage_id string required

        A stage or a zone.

      • senses string[] required
      • area object

        The active part of the picture: { corners: [{x,y}×4] }, fractions clockwise from top-left. Set by calibrating on the device.

      • calibration object

        The hand calibration (spec 18 §5b), measured on the device.

  • collection_id string
  • fields object[]
  • fresh_min integer
  • keep integer
  • token_hint string

    The key’s last 4 characters.

  • signing boolean
  • reach object

    Where a sensor reaches. Missing or { all: true } = every stage. Ids that no longer exist are dropped on save.

    4 fields in reach
    • all boolean
    • stage_ids string[]

      Up to 50 items

    • group_ids string[]

      Stage groups and walls.

      Up to 20 items

    • device_ids string[]

      Single screens.

      Up to 50 items

  • local object

    The local network path: screens accept this sensor’s readings straight from the venue LAN.

    2 fields in local
    • enabled boolean

      Default false.

    • relay boolean

      A screen in a group passes a local reading on to its group. Default true.

  • last_at integer or null

    Server time of the newest reading.

  • last_via string or null

    How the newest reading arrived.

    One of cloud, local, null

curl -X PATCH "https://www.wunderframe.com/api/v1/sensors/front-door" \
  -H "Authorization: Bearer $WUNDERFRAME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "label": "Main door",
  "fresh_min": 5
}'
Response 200
{
  "_id": "3f9a1c0b7d2e4a51",
  "key": "front-door",
  "label": "Front door",
  "kind": "event",
  "collection_id": "col_1",
  "fields": [],
  "fresh_min": 2,
  "keep": 20,
  "token_hint": "x9Qa",
  "signing": false,
  "reach": {
    "all": true
  },
  "local": {
    "enabled": false,
    "relay": true
  },
  "last_at": 1793450000000,
  "last_via": "cloud"
}
Error example
Response 400
{
  "error": {
    "code": "invalid",
    "message": "The request is invalid — `details.field` names the field when there is one."
  }
}

Delete an external sensor

DELETE /sensors/{key} sensors

The sensor, its collection and its readings. Rules naming it then never hold.

Parameters

  • key string required path

    The sensor’s key, e.g. front-door.

Responses

  • 200 How many readings went with it.
  • 401 Missing or invalid API key.
  • 403 The key lacks the scope, or the role is read-only.
  • 404 Not found in this workspace.
Response fields (200)
  • ok boolean
  • records integer
curl -X DELETE "https://www.wunderframe.com/api/v1/sensors/front-door" \
  -H "Authorization: Bearer $WUNDERFRAME_API_KEY"
Response 200
{
  "ok": false,
  "records": 0
}
Error example
Response 401
{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid API key."
  }
}

Rotate a sensor’s key

POST /sensors/{key}/rotate sensors

A new key (and a new signing_key when signing is on), in the answer ONCE, and new local keys for the screens. The old ones stop working at once.

Parameters

  • key string required path

    The sensor’s key, e.g. front-door.

Responses

  • 200 The sensor and its new key.
  • 401 Missing or invalid API key.
  • 403 The key lacks the scope, or the role is read-only.
  • 404 Not found in this workspace.
Response fields (200)
  • _id string
  • key string
  • label string
  • kind string

    One of event, state, input

  • input object

    Kind input (spec 55 §3): who senses, through what, and for which stages or zones.

    3 fields in input
    • device_id string or null

      The paired screen player that senses; null = another system with the sensor’s key.

    • source object or null

      A player’s camera: { type: "local", camera? } or { type: "network", url } — an rtsp:// URL without a login (camera_login). secret_id is set by the server when a login is sealed.

      4 fields in source
      • type string

        One of local, network

      • camera string
      • url string
      • secret_id string read-only
    • targets object[]

      Up to 8 items

      4 fields in targets
      • stage_id string required

        A stage or a zone.

      • senses string[] required
      • area object

        The active part of the picture: { corners: [{x,y}×4] }, fractions clockwise from top-left. Set by calibrating on the device.

      • calibration object

        The hand calibration (spec 18 §5b), measured on the device.

  • collection_id string
  • fields object[]
  • fresh_min integer
  • keep integer
  • token_hint string

    The key’s last 4 characters.

  • signing boolean
  • reach object

    Where a sensor reaches. Missing or { all: true } = every stage. Ids that no longer exist are dropped on save.

    4 fields in reach
    • all boolean
    • stage_ids string[]

      Up to 50 items

    • group_ids string[]

      Stage groups and walls.

      Up to 20 items

    • device_ids string[]

      Single screens.

      Up to 50 items

  • local object

    The local network path: screens accept this sensor’s readings straight from the venue LAN.

    2 fields in local
    • enabled boolean

      Default false.

    • relay boolean

      A screen in a group passes a local reading on to its group. Default true.

  • last_at integer or null

    Server time of the newest reading.

  • last_via string or null

    How the newest reading arrived.

    One of cloud, local, null

curl -X POST "https://www.wunderframe.com/api/v1/sensors/front-door/rotate" \
  -H "Authorization: Bearer $WUNDERFRAME_API_KEY"
Response 200
{
  "_id": "3f9a1c0b7d2e4a51",
  "key": "front-door",
  "label": "Front door",
  "kind": "event",
  "collection_id": "col_1",
  "fields": [],
  "fresh_min": 2,
  "keep": 20,
  "token_hint": "x9Qa",
  "signing": false,
  "reach": {
    "all": true
  },
  "local": {
    "enabled": false,
    "relay": true
  },
  "last_at": 1793450000000,
  "last_via": "cloud"
}
Error example
Response 401
{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid API key."
  }
}

Reset a sensor’s local keys

POST /sensors/{key}/reset-local sensors

New local keys for every screen; the sensor’s key and signing key stay. LAN systems read the new keys from /endpoints.

Parameters

  • key string required path

    The sensor’s key, e.g. front-door.

Responses

  • 200 The sensor and its new local key generation.
  • 401 Missing or invalid API key.
  • 403 The key lacks the scope, or the role is read-only.
  • 404 Not found in this workspace.
Response fields (200)
  • _id string
  • key string
  • label string
  • kind string

    One of event, state, input

  • input object

    Kind input (spec 55 §3): who senses, through what, and for which stages or zones.

    3 fields in input
    • device_id string or null

      The paired screen player that senses; null = another system with the sensor’s key.

    • source object or null

      A player’s camera: { type: "local", camera? } or { type: "network", url } — an rtsp:// URL without a login (camera_login). secret_id is set by the server when a login is sealed.

      4 fields in source
      • type string

        One of local, network

      • camera string
      • url string
      • secret_id string read-only
    • targets object[]

      Up to 8 items

      4 fields in targets
      • stage_id string required

        A stage or a zone.

      • senses string[] required
      • area object

        The active part of the picture: { corners: [{x,y}×4] }, fractions clockwise from top-left. Set by calibrating on the device.

      • calibration object

        The hand calibration (spec 18 §5b), measured on the device.

  • collection_id string
  • fields object[]
  • fresh_min integer
  • keep integer
  • token_hint string

    The key’s last 4 characters.

  • signing boolean
  • reach object

    Where a sensor reaches. Missing or { all: true } = every stage. Ids that no longer exist are dropped on save.

    4 fields in reach
    • all boolean
    • stage_ids string[]

      Up to 50 items

    • group_ids string[]

      Stage groups and walls.

      Up to 20 items

    • device_ids string[]

      Single screens.

      Up to 50 items

  • local object

    The local network path: screens accept this sensor’s readings straight from the venue LAN.

    2 fields in local
    • enabled boolean

      Default false.

    • relay boolean

      A screen in a group passes a local reading on to its group. Default true.

  • last_at integer or null

    Server time of the newest reading.

  • last_via string or null

    How the newest reading arrived.

    One of cloud, local, null

curl -X POST "https://www.wunderframe.com/api/v1/sensors/front-door/reset-local" \
  -H "Authorization: Bearer $WUNDERFRAME_API_KEY"
Response 200
{
  "_id": "3f9a1c0b7d2e4a51",
  "key": "front-door",
  "label": "Front door",
  "kind": "event",
  "collection_id": "col_1",
  "fields": [],
  "fresh_min": 2,
  "keep": 20,
  "token_hint": "x9Qa",
  "signing": false,
  "reach": {
    "all": true
  },
  "local": {
    "enabled": false,
    "relay": true
  },
  "last_at": 1793450000000,
  "last_via": "cloud"
}
Error example
Response 401
{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid API key."
  }
}

List the screens that take this sensor on the local network

GET /sensors/{key}/endpoints sensors

Every screen the sensor reaches that reported a local listener in the last 24 hours, group leaders first. With the sensor’s own key (Bearer wfv.…) or an API key, each entry carries that screen’s kid and local key secret for signing (X-WF-Kid, X-WF-Timestamp, X-WF-Signature: v1=<hex HMAC-SHA256(base64url-decode(secret), "wf-local:v1\nPOST\n/wf/v1/sensors/readings\n" + timestamp + "\n" + id + "\n" + hex(sha256(body)))>). A signed-in member gets the addresses only.

Parameters

  • key string required path

    The sensor’s key, e.g. front-door.

  • stage_id string query

    Only this stage.

  • group_id string query

    Only this stage group or wall.

  • device_id string query

    Only this screen.

Responses

  • 200 The screens.
  • 401 Missing or invalid API key.
  • 403 The key lacks the scope, or the role is read-only.
  • 404 Not found in this workspace.
  • 429 Too many requests for this key: wait details.retry_after_s seconds (also in Retry-After).
  • 503 A service this call needs is not available right now.
Response fields (200)
  • sensor object
    3 fields in sensor
    • id string
    • key string
    • local object

      The local network path: screens accept this sensor’s readings straight from the venue LAN.

      2 fields in local
      • enabled boolean

        Default false.

      • relay boolean

        A screen in a group passes a local reading on to its group. Default true.

  • endpoints object[]
    9 fields in endpoints
    • device_id string
    • stage_id string
    • group_id string or null
    • leader boolean

      It leads its sync group now: post once, to the leader.

    • urls string[]
    • last_seen_at integer
    • kid string

      Only for the sensor’s own key or an API key: X-WF-Kid.

    • secret string

      Only for the sensor’s own key or an API key: this screen’s local key (base64url, 32 bytes).

    • input object

      Kind input: the screen’s input WebSocket (ws://<ip>:<port>/wf/v1/input) and the targets it accepts (X-WF-Target). Stream to a wall’s leader only.

      2 fields in input
      • ws_urls string[]
      • targets string[]
  • server_now integer
  • cloud object

    Kind input, with the sensor’s own key: the fallback when no LAN path works — POST the frames to frames_url for one of targets. Only the server publishes on the target channels; no publish token is handed out.

    2 fields in cloud
    • targets string[]
    • frames_url string
curl "https://www.wunderframe.com/api/v1/sensors/front-door/endpoints" \
  -H "Authorization: Bearer $WUNDERFRAME_API_KEY"
Response 200
{
  "sensor": {
    "id": "a1b2c3d4e5f60718",
    "key": "front-door",
    "local": {
      "enabled": true,
      "relay": true
    }
  },
  "endpoints": [
    {
      "device_id": "dev_lobby_1",
      "stage_id": "stg_lobby",
      "group_id": "grp_hall_b",
      "leader": true,
      "urls": [
        "http://10.0.4.21:47772/wf/v1/sensors/readings"
      ],
      "last_seen_at": 1793450000000
    }
  ],
  "server_now": 1793450000000
}
Error example
Response 401
{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid API key."
  }
}

Send an input device’s frames through the cloud

POST /sensors/{key}/frames sensors

Kind input (spec 55 §5.3): up to 30 frames for one target, read as the screens read them and published on the target’s channel private-wf-input-{target}; a facts frame is also written as the sensor’s reading. For a system without a path on the venue network, and the console’s *Send a pointer to this stage*. A pointer over the cloud is slow (~100–300 ms); the LAN WebSocket ws://<screen>/wf/v1/input is the fast path. At most 1200 frames a minute.

Parameters

  • key string required path

    The sensor’s key, e.g. front-door.

Request body required

  • target string required
  • frames string or object[] required

    Up to 30 items

Responses

  • 200 Published.
  • 400 The request is invalid — details.field names the field when there is one.
  • 401 Missing or invalid API key.
  • 403 The key lacks the scope, or the role is read-only.
  • 404 Not found in this workspace.
  • 413 Too large.
  • 429 Too many requests for this key: wait details.retry_after_s seconds (also in Retry-After).
Response fields (200)
  • published integer
  • refused object[]
    2 fields in refused
    • index integer
    • code string
  • facts integer
curl -X POST "https://www.wunderframe.com/api/v1/sensors/front-door/frames" \
  -H "Authorization: Bearer $WUNDERFRAME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "target": "stg_side",
  "frames": [
    {
      "t": "in",
      "seq": 1,
      "at": 1793450000123,
      "ev": {
        "kind": "pointer",
        "phase": "move",
        "x": 0.41,
        "y": 0.66,
        "source": "hand"
      }
    }
  ]
}'
Response 200
{
  "published": 0,
  "refused": [
    {
      "index": 0,
      "code": "string"
    }
  ],
  "facts": 0
}
Error example
Response 400
{
  "error": {
    "code": "invalid",
    "message": "The request is invalid — `details.field` names the field when there is one."
  }
}

Realtime tokens for an input device’s cloud channels

GET /sensors/{key}/input-token sensors

Kind input (spec 55 §5.3). A signed-in member gets SUBSCRIBE tokens per target channel private-wf-input-{target}, to watch what a screen receives. The sensor’s own key or an API key is answered 403: only the server publishes on an input channel — POST the frames to /sensors/{key}/frames.

Parameters

  • key string required path

    The sensor’s key, e.g. front-door.

  • target string query

    Only this stage or zone.

Responses

  • 200 The grants.
  • 401 Missing or invalid API key.
  • 403 The key lacks the scope, or the role is read-only.
  • 404 Not found in this workspace.
  • 429 Too many requests for this key: wait details.retry_after_s seconds (also in Retry-After).
Response fields (200)
  • grants object[]
    6 fields in grants
    • sensor_id string
    • sensor_key string
    • target string
    • channel string

      private-wf-input-{target}.

    • token string
    • expires_in integer
  • rt_ws_url string
curl "https://www.wunderframe.com/api/v1/sensors/front-door/input-token" \
  -H "Authorization: Bearer $WUNDERFRAME_API_KEY"
Response 200
{
  "grants": [
    {
      "sensor_id": "a1b2c3d4e5f60718",
      "sensor_key": "side-camera",
      "target": "stg_side",
      "channel": "private-wf-input-stg_side",
      "token": "…",
      "expires_in": 3600
    }
  ],
  "rt_ws_url": "string"
}
Error example
Response 401
{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid API key."
  }
}

Set an input device’s active area for one target

PUT /sensors/{key}/calibration sensors

Kind input (spec 55 §2.1a, F.1). The part of the camera picture that maps onto the target: four corners {x, y} in 0..1 of the unmirrored source frame, clockwise from the top left, a convex quad covering at least 0.1 % of the picture; null = the whole picture. The sensing device follows through its keys at once. Corners only — never a picture.

Parameters

  • key string required path

    The sensor’s key, e.g. front-door.

Request body required

  • target string required

    A stage or zone the device senses for.

  • area object or null required
    1 fields in area
    • corners object[]

      Up to 4 items

      2 fields in corners
      • x number
      • y number

Responses

  • 200 The target as stored.
  • 400 The request is invalid — details.field names the field when there is one.
  • 401 Missing or invalid API key.
  • 403 The key lacks the scope, or the role is read-only.
  • 404 Not found in this workspace.
Response fields (200)
  • target object or null
curl -X PUT "https://www.wunderframe.com/api/v1/sensors/front-door/calibration" \
  -H "Authorization: Bearer $WUNDERFRAME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "target": "stg_side",
  "area": {
    "corners": [
      {
        "x": 0.1,
        "y": 0.1
      },
      {
        "x": 0.9,
        "y": 0.1
      },
      {
        "x": 0.9,
        "y": 0.9
      },
      {
        "x": 0.1,
        "y": 0.9
      }
    ]
  }
}'
Response 200
{
  "target": {}
}
Error example
Response 400
{
  "error": {
    "code": "invalid",
    "message": "The request is invalid — `details.field` names the field when there is one."
  }
}

Ask the sensing device for its picture, encrypted to this browser tab

POST /sensors/{key}/calibration-preview sensors

Kind input (spec 55 §2.1a, F.5). For the console’s calibration view: a signed-in editor or owner only (an API key gets 403 session_only). epk is the tab’s ECDH P-256 public key (base64url of the 65-byte point); the device seals small JPEGs to it (HKDF-SHA256 → AES-256-GCM) and publishes them on the returned channel, which only this member may subscribe to. With session it is a keepalive (every 30 s); the device stops 2 minutes after the last one. The server never holds a key that opens a picture.

Parameters

  • key string required path

    The sensor’s key, e.g. front-door.

Request body required

  • target string required
  • epk string required
  • session string

    Pattern ^[0-9a-f]{32}$

Responses

  • 200 The subscribe grant and the limits.
  • 400 The request is invalid — details.field names the field when there is one.
  • 401 Missing or invalid API key.
  • 403 The key lacks the scope, or the role is read-only.
  • 404 Not found in this workspace.
  • 409 Conflicts with the current state.
  • 429 Too many requests for this key: wait details.retry_after_s seconds (also in Retry-After).
  • 503 A service this call needs is not available right now.
Response fields (200)
  • session string
  • channel string
  • token string
  • expires_in integer
  • until integer
  • server_now integer
  • rt_ws_url string
  • device object
  • limits object
curl -X POST "https://www.wunderframe.com/api/v1/sensors/front-door/calibration-preview" \
  -H "Authorization: Bearer $WUNDERFRAME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "target": "stg_side",
  "epk": "BKJQ3vk9TArunJjIp8ZJ-rvksdIAzanIfwvVNYIgK48VHsr00KvnjQW3TbD8hRObcTk8Jxs1zUqSCFxviE3mKf0"
}'
Response 200
{
  "session": "string",
  "channel": "string",
  "token": "string",
  "expires_in": 0,
  "until": 0,
  "server_now": 0,
  "rt_ws_url": "string",
  "device": {},
  "limits": {}
}
Error example
Response 400
{
  "error": {
    "code": "invalid",
    "message": "The request is invalid — `details.field` names the field when there is one."
  }
}

Stop the picture of a calibration view

POST /sensors/{key}/calibration-preview/stop sensors

Spec 55 F.5. Idempotent; only the member’s own session. Accepts a text/plain JSON body (navigator.sendBeacon).

Parameters

  • key string required path

    The sensor’s key, e.g. front-door.

Request body required

  • session string required

Responses

  • 200 Stopped (or nothing ran).
  • 400 The request is invalid — details.field names the field when there is one.
  • 401 Missing or invalid API key.
  • 403 The key lacks the scope, or the role is read-only.
Response fields (200)
  • ok boolean
  • stopped boolean
curl -X POST "https://www.wunderframe.com/api/v1/sensors/front-door/calibration-preview/stop" \
  -H "Authorization: Bearer $WUNDERFRAME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "session": "0f1e2d3c4b5a69788796a5b4c3d2e1f0"
}'
Response 200
{
  "ok": false,
  "stopped": false
}
Error example
Response 400
{
  "error": {
    "code": "invalid",
    "message": "The request is invalid — `details.field` names the field when there is one."
  }
}

Calibrate by pointing, or test pointing, on the target’s screens

POST /sensors/{key}/pointing-check sensors

Kind input (spec 55 §2.1b, Appendix G). The console’s *Calibrate by pointing* and *Test pointing*: a signed-in editor or owner only (an API key gets 403 session_only). start (target, mode calibrate | test) makes the sensing device decide through the cloud for that target (and, calibrating, with the whole picture and absolute pointing) and answers the subscribe grant for the target’s input channel and the stage’s hand mapping. show puts a ring (step { n, of, x, y }), a hit marker (hit { x, y, ok }) and a note on the target’s screens (0–1 of the target). keepalive every 15 s; everything ends by itself 60 s after the last word. stop ends it at once. cancel (target optional) is the console’s Stop: it ends whatever runs for this input device — a screen’s calibration wizard (closed at once) or any member’s check. A start blocked by a running one answers 409 check_running with details.running { mode, target, stage, by, until }. Accepts a text/plain JSON body (navigator.sendBeacon).

Parameters

  • key string required path

    The sensor’s key, e.g. front-door.

Request body required

  • action string required

    One of start, show, keepalive, stop, cancel

  • target string
  • mode string

    One of calibrate, test

  • session string

    Pattern ^[0-9a-f]{32}$

  • step object
  • hit object
  • note string

Responses

  • 200 The check (start), or { ok, until } / { ok, stopped }.
  • 400 The request is invalid — details.field names the field when there is one.
  • 401 Missing or invalid API key.
  • 403 The key lacks the scope, or the role is read-only.
  • 404 Not found in this workspace.
  • 409 Conflicts with the current state.
  • 429 Too many requests for this key: wait details.retry_after_s seconds (also in Retry-After).
  • 503 A service this call needs is not available right now.
curl -X POST "https://www.wunderframe.com/api/v1/sensors/front-door/pointing-check" \
  -H "Authorization: Bearer $WUNDERFRAME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "action": "start",
  "target": "stg_side",
  "mode": "calibrate"
}'
Response 200
{}
Error example
Response 400
{
  "error": {
    "code": "invalid",
    "message": "The request is invalid — `details.field` names the field when there is one."
  }
}

Post a reading

POST /sensors/{key}/readings sensors

An empty body is a firing. id (8 to 64 of A-Z a-z 0-9 _ -) makes the reading idempotent for 48 h: the same id twice is one record (duplicate: true). values are only the sensor’s own fields, stored as text; source_at is kept but never trusted for rules — the server stamps at. At most 8 KB and 60 readings a minute per sensor.

Parameters

  • key string required path

    The sensor’s key, e.g. front-door.

  • id string query

    The sensor id, for a signed webhook (Wf-Signature) without Authorization.

Request body

  • id string

    Pattern ^[A-Za-z0-9_-]{8,64}$

  • values map of string or number
  • source_at string (date-time)

Responses

  • 202 Taken.
  • 400 The request is invalid — details.field names the field when there is one.
  • 401 Missing or invalid API key.
  • 403 The key lacks the scope, or the role is read-only.
  • 404 Not found in this workspace.
  • 413 Too large.
  • 429 Too many requests for this key: wait details.retry_after_s seconds (also in Retry-After).
  • 503 A service this call needs is not available right now.
Response fields (202)
  • ok boolean
  • at string (date-time)
curl -X POST "https://www.wunderframe.com/api/v1/sensors/front-door/readings" \
  -H "Authorization: Bearer $WUNDERFRAME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "values": {
    "length": 12
  }
}'
Response 202
{
  "ok": false,
  "at": "2026-09-14T09:00:00Z"
}
Error example
Response 400
{
  "error": {
    "code": "invalid",
    "message": "The request is invalid — `details.field` names the field when there is one."
  }
}