26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Unlink camera from intercom

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

Unlinks the intercom's current camera. Sets intercom.camera_id = null, camera.is_intercom = false , removes intercom residents' access to the camera, and recalculates the intercom status. To replace a camera on an intercom that already has one, first detach , then attach the new camera.

int intercom  required , Intercom ID (in the URL)

204  No Content

Camera successfully unlinked

404  Not Found

Intercom not found

422  Unprocessable Entity

No camera is linked to the intercom

JSON
{
    "message": "Validation failed",
    "errors": {
        "error": [
            "Failed to detach camera. Intercom has no camera attached."
        ]
    }
}
cURL
Bash
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/intercoms/{intercom}/camera/detach' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "intercom": 0
}'
PHP
PHP
$data = array (
  'intercom' => 0,
);
$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/detach', false, $context);