26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Create intercom (v1)

Create an intercom (v1)

With the release of request version v2, version v1 is being moved to legacy.
For new integrations, use the current v2.
Version v1 remains available to support existing integrations.

POST  /api/v1/billing/intercoms

Only vendor, name and a group (address) — group_id or group_external_id — are required. The two group fields cannot be provided together.

Panel access settings can be provided in one of two mutually exclusive ways (both optional):

  • onvif_credentials — only the ONVIF credentials are saved; no connection to the panel is made during creation. The intercom is created with status empty.

  • schema, ip, port, login, password — VMS immediately connects to the panel: reads its mac, model and serial_number (overriding values supplied in the request), checks model support, configures the SIP server address, and closes the doors. The intercom changes to status uninstalled. All five parameters must be provided together. If the panel cannot be reached or its model is unsupported, the intercom is not created and an error is returned under 422.

If neither onvif_credentials nor network settings are provided, the intercom is created without access settings. These can be configured later by updating the intercom.

Create using ONVIF credentials:

JSON
{
    "group_external_id": "00000000-0000-0000-0000-000000000001",
    "flat_from": 1,
    "flat_to": 15,
    "serial_number": "serial_number",
    "mac": "AA:BB:CC:DD:EE:FF",
    "vendor": "interconnection",
    "model": "3516EV200",
    "name": "intercom name",
    "department": 1,
    "onvif_credentials": {
        "login": "admin",
        "password": "password",
        "port": 80
    },
    "log_extra": {
        "some": "information"
    }
}

Create using panel network settings (mac, model and serial_number are read from the panel):

JSON
{
    "group_external_id": "00000000-0000-0000-0000-000000000001",
    "flat_from": 1,
    "flat_to": 15,
    "vendor": "interconnection",
    "name": "intercom name",
    "department": 1,
    "schema": "http",
    "ip": "192.168.1.100",
    "port": 80,
    "login": "admin",
    "password": "password"
}

Method parameters

integer group_id  required , ID of the group (address) where the intercom should be placed.


string group_external_id, External ID of the group (address) (used instead of `group_id`).


integer flat_from, First apartment number connected to the intercom.


integer flat_to, Last apartment number connected to the intercom.


string serial_number, Panel serial number. Must be unique. Read from the panel when network settings are provided.


string mac  required , Panel MAC address in `AA:BB:CC:DD:EE:FF` format. Must be unique. Read from the panel when network settings are provided.


string vendor  required , Intercom manufacturer.


string model, Panel model. Must be supported by the specified manufacturer. Read from the panel when network settings are provided.


string name  required , Intercom/entrance name (displayed to users).


integer department, Entrance number (1 to 10,000).


array onvif_credentials, Credentials for accessing the intercom camera through ONVIF. Cannot be provided with `schema`, `ip`, `port`, `login`, or `password`.

object array

string onvif_credentials.login, ONVIF username.


string onvif_credentials.password, ONVIF password. Must not contain spaces, Cyrillic characters, or any of these characters: `: / ? # [ ] @ ! $ & ' ( ) * + , ; =`.


integer onvif_credentials.port, ONVIF port (1–65535).


string schema, Panel connection scheme: `http` or `https`. Required when providing `ip`, `port`, `login`, and `password`.


string ip, Panel IP address (IPv4), unique among intercoms. Required when providing `schema`, `port`, `login`, and `password`.


integer port, Panel port. Required when providing `schema`, `ip`, `login`, and `password`.


string login, Panel username. Required when providing `schema`, `ip`, `port`, and `password`.


string password, Panel password. Required when providing `schema`, `ip`, `port`, and `login`.


boolean is_restricted_live, Restriction on viewing the intercom camera's live stream.


boolean is_restricted_archive, Restriction on viewing the intercom camera's archive recordings.


string|array log_extra, Additional information received from an external system.

201  Created

Intercom created successfully

JSON
{
    "id": 1,
    "external_id": null,
    "department": 1,
    "title": "intercom name",
    "mac": "A:BB:CC:DD:EE:FF",
    "model": "3516EV200",
    "serial_number": "serial_number",
    "status": "empty",
    "flat_from": 1,
    "flat_to": 15,
    "source": "auto"
}

422  Unprocessable Entity

Validation error. For more information, see General information > Validation.

JSON
{
    "message": "Validation failed",
    "errors": {
        "mac": [
            "This MAC address already exists"
        ],
        "error": [
            "Panel model is not supported by the specified manufacturer"
        ]
    }
}
cURL
Bash
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/intercoms' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "group_id": "integer",
    "group_external_id": "string",
    "flat_from": "integer",
    "flat_to": "integer",
    "serial_number": "string",
    "mac": "string",
    "vendor": "string",
    "model": "string",
    "name": "string",
    "department": "integer",
    "onvif_credentials": {
        "login": "string",
        "password": "string",
        "port": "integer"
    },
    "onvif_credentials.login": "void",
    "onvif_credentials.password": "void",
    "onvif_credentials.port": "void",
    "schema": "string",
    "ip": "string",
    "port": "integer",
    "login": "string",
    "password": "string",
    "is_restricted_live": "boolean",
    "is_restricted_archive": "boolean",
    "log_extra": "string|array"
}'
PHP
PHP
$data = array (
  'group_id' => 'integer',
  'group_external_id' => 'string',
  'flat_from' => 'integer',
  'flat_to' => 'integer',
  'serial_number' => 'string',
  'mac' => 'string',
  'vendor' => 'string',
  'model' => 'string',
  'name' => 'string',
  'department' => 'integer',
  'onvif_credentials' => 
  array (
    'login' => 'string',
    'password' => 'string',
    'port' => 'integer',
  ),
  'onvif_credentials.login' => 'void',
  'onvif_credentials.password' => 'void',
  'onvif_credentials.port' => 'void',
  'schema' => 'string',
  'ip' => 'string',
  'port' => 'integer',
  'login' => 'string',
  'password' => 'string',
  'is_restricted_live' => 'boolean',
  'is_restricted_archive' => 'boolean',
  'log_extra' => 'string|array',
);
$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', false, $context);