Skip to main content
Skip table of contents

Update a key

Key update

JSON
{
    "flat": 7
}

PATCH /api/admin/v1/intercoms/{intercom}/keys/{intercom_key}

Parameters

int intercom, Unique identifier of the intercom


int intercom_key, Unique key identifier


integer flat, flat apartments to which the keys will be linked [VMS Admin/Intercom/Intercom Apartments/List of Intercom Apartments](../flats/index.md)

200 OK

Successful response

JSON
{
    "id": 7,
    "key": "0000003045CAAC",
    "flat": {
        "id": 7,
        "flat": 7,
        "key_count": null,
        "users_count": null,
        "number": null,
        "landline_number": null,
        "is_smartphone_sip_line_available": false,
        "is_landline_sip_line_available": true,
        "is_analog_line_enable": false,
        "is_sip_line_enable": false
    },
    "created_at": "2022-11-14 14:27:14",
    "updated_at": "2022-11-14 14:31:21",
    "deleted_at": null
}

401 Unauthorized

Authorization token not sent or not valid

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/intercoms/{intercom}/keys/{intercom_key}' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "intercom": 0,
    "intercom_key": 0,
    "flat": "integer"
}'
PHP
PHP
$data = array (
  'intercom' => 0,
  'intercom_key' => 0,
  'flat' => 'integer',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'PATCH',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/admin/v1/intercoms/{intercom}/keys/{intercom_key}', false, $context);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.