26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Link camera to intercom

POST  /api/v1/billing/intercoms/{intercom}/camera/attach

Links an existing camera to an intercom that does not yet have a camera assigned. The camera must not be linked to another intercom; a link to a deleted intercom is ignored and removed. Specify the camera by id or by external_id — exactly one of the two. Sets camera.is_intercom = true, synchronizes intercom residents' access to the camera, and recalculates the intercom status.

JSON
{
    "id": 42
}

Method parameters

int intercom  required , Intercom ID (in the URL)


int id, Existing camera ID. Required if external_id


string external_id , Existing camera external_id. Required if id

204  No Content

Camera successfully linked

404  Not Found

Intercom or camera not found

422  Unprocessable Entity

Validation error.

For more information, see General information > Validation.

JSON
{
    "message": "Validation failed",
    "errors": {
        "camera_id": [
            "Failed to attach camera. Intercom already has a camera attached - detach it first."
        ]
    }
}
cURL
Bash
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/intercoms/{intercom}/camera/attach' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "intercom": 0,
    "id": 0,
    "external_id": "string"
}'
PHP
PHP
$data = array (
  'intercom' => 0,
  'id' => 0,
  'external_id' => 'string',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'POST',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/v1/billing/intercoms/{intercom}/camera/attach', false, $context);