1KEY Developers
API reference

Settings

Base URL https://api.1keyplatform.dev/v1. Every endpoint below is generated from the OpenAPI contract, which you can download as openapi.yaml.

Log in to send these requests to your organization from this page.

Settings

A device's own configuration, such as a lock's auto-lock time.

GET /hubs/{hub_id}/devices/{device_id}/settings

A device's settings

Needs the hubs:read scope.

The device's own configuration, as it describes it. auto_lock on locks and wakeup_interval on sleeping devices are always named so.

Parameters

Name In Type Description
hub_id required path string The hub ID printed on the hub (lowercase).
device_id required path integer

Responses

200 Its settings.

Errors

401 unauthenticated Missing, malformed, revoked or unknown API key.
403 insufficient_scope The key lacks the scope this operation needs.
404 not_found No such resource, or it is not your organization's.
503 hub_offline hub_offline: the hub is not connected. hub_unavailable: it is connected but cannot do it now, for example its radio is down or it does not know the time yet.
504 The hub did not answer in time.
PATCH /hubs/{hub_id}/devices/{device_id}/settings/{setting_id}

Change a setting

Needs the hubs:write scope.

The hub sends it; a sleeping device takes it at its next wake-up. Read the settings again for the device's value. null takes back a value set through the API.

Parameters

Name In Type Description
hub_id required path string The hub ID printed on the hub (lowercase).
device_id required path integer
setting_id required path string

Body

value any · required Of the setting's type; null takes back a value set through the API.

Responses

202 Sent.

Errors

400 invalid_request The request is malformed or a field is invalid.
401 unauthenticated Missing, malformed, revoked or unknown API key.
403 insufficient_scope The key lacks the scope this operation needs.
404 not_found No such resource, or it is not your organization's.
503 hub_offline hub_offline: the hub is not connected. hub_unavailable: it is connected but cannot do it now, for example its radio is down or it does not know the time yet.
504 The hub did not answer in time.