Issue virtual keys to a list of users
|
POST /api/v1/billing/ble-controllers/{ble_controller}/virtual-keys |
Issues BLE controller virtual keys to the specified users. Recipients are identified by logins (logins) and/or IDs (user_ids ). At least one list is required. If any recipient isn't found, the request is rejected with a 422 error under users.
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.
Issuing a key replaces the recipient's existing key on this controller: the old key is revoked and a new key is created with a new id.
A recipient 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.
{
"logins": [
"170300101"
],
"user_ids": [
43
],
"valid_till": "2026-02-15T10:00:00Z"
}
Method parameters
string ble_controller required , BLE controller UUID (in URL)
array logins, Recipient logins. Required if `user_ids` isn't provided
array user_ids, Recipient IDs. Required if `logins` isn't provided
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
|
200 |
|
Successful response – array of issued keys JSON
|
|
404 |
|
BLE controller not found JSON
|
|
422 |
|
Returns a JSON error object. For more information, see General information > Validation. JSON
|