Issue a virtual key to a user
|
POST /api/v1/billing/users/{login}/ble-controllers/{ble_controller}/virtual-keys |
Issues a BLE controller virtual key to the user with the specified login.
Issuing a key replaces the user's existing key on this controller: the old key is revoked and a new key is created with a new id. Repeating the request reissues the key rather than causing an error.
The key type is determined by valid_till:
-
valid_tillis provided – a temporary key is issued for the period fromvalid_fromtovalid_till; withoutvalid_fromthe period starts at the current time; -
valid_tillisn't provided – a permanent key is issued:valid_fromin the response isnull, andvalid_tillis set far into the future (100 years by default). The suppliedvalid_fromisn't used in this case.
A user with an expired account (or an expired parent account, for a subuser) is rejected with a 422 error under user_ids.
The key format is described in Get a virtual key by ID.
{
"valid_from": "2026-01-15T10:00:00Z",
"valid_till": "2026-02-15T10:00:00Z"
}
Method parameters
string login required , User login (in URL)
string ble_controller required , BLE controller UUID (in URL)
string valid_from, Temporary key validity start date. Defaults to the current time
string valid_till, Key expiration date: later than the current time and no earlier than `valid_from`. If provided, the key is temporary; otherwise, it's permanent
|
201 |
|
Key issued JSON
|
|
404 |
|
BLE controller not found JSON
|
|
404 |
|
User not found JSON
|
|
422 |
|
Returns a JSON error object. For more information, see General information > Validation. JSON
|