Skip to main content
Skip table of contents

Update multiple keys

Updating keys

Linking a user to a list of keys.

JSON
{
    "keys": [
        1269,
        1270
    ],
    "user_id": 57
}

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

Parameters

int intercom, Unique identifier of the intercom


integer keys, Array of intercom key id


integer user_id, Id of the user to which the keys are added

200 OK

Successful response

JSON
[
    {
        "id": 1269,
        "title": null,
        "key": "000000FFFFAAAA",
        "user": {
            "id": 57,
            "name": "FIO",
            "login": "375222737476",
            "created_at": "2019-10-02 20:03:30",
            "updated_at": "2020-06-11 19:40:16",
            "expired_at": null,
            "is_licence_limit_reached": true,
            "ptz_priority": 10,
            "access_token_id": null
        },
        "created_at": "2022-10-25 17:23:54",
        "updated_at": "2022-10-25 18:12:20",
        "type": "sub",
        "type_pretty": "Additional",
        "flat": 1
    },
    {
        "id": 1270,
        "title": null,
        "key": "000000FFFFAAAB",
        "user": {
            "id": 57,
            "name": "FIO",
            "login": "375222737476",
            "created_at": "2019-10-02 20:03:30",
            "updated_at": "2020-06-11 19:40:16",
            "expired_at": null,
            "is_licence_limit_reached": true,
            "ptz_priority": 10,
            "access_token_id": null
        },
        "created_at": "2022-10-25 17:23:54",
        "updated_at": "2022-10-25 18:12:20",
        "type": "sub",
        "type_pretty": "Additional",
        "flat": 1
    }
]

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' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "intercom": 0,
    "keys": "integer",
    "user_id": "integer"
}'
PHP
PHP
$data = array (
  'intercom' => 0,
  'keys' => 'integer',
  'user_id' => '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', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.