26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Create access pоint

Create an access point

POST  /api/v1/billing/access-points

Creates an access point. All request body fields are optional:

  • name isn't provided – it is generated automatically.

  • type isn't provided – the default is universal_zone.

  • group_id or group_external_id links the access point to a camera group. If neither is provided, the access point is placed in an automatically created group named Access Points. Both parameters can't be provided together.

JSON
{
    "name": "Main entrance",
    "type": "universal_zone",
    "group_id": 42
}

Method parameters

string name, Access point name. By default, it is generated automatically (`Access Point | <5 characters>`).


string type, Access point type. Allowed values: `entry_zone`, `drive_in_zone`, `fixed_zone`, `universal_zone`. Default: `universal_zone`.


integer group_id, ID of the camera group to which the access point is linked. The group must exist, have the camera type, and contain no nested groups. Can't be provided together with `group_external_id`.


string group_external_id, External ID of the camera group to which the access point is linked. The group requirements are the same as for `group_id`. Can't be provided together with `group_id`.

200  OK

Access point created successfully

JSON
{
    "uuid": "00000000-0000-0000-0000-000000000001",
    "name": "Main entrance",
    "type": "universal_zone",
    "created_at": "2024-01-01T00:00:00.000000Z",
    "updated_at": "2024-01-01T00:00:00.000000Z",
    "intercoms": [],
    "openy_controllers": []
}

422  Unprocessable Entity

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

cURL
Bash
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/access-points' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "name": "string",
    "type": "string",
    "group_id": "integer",
    "group_external_id": "string"
}'
PHP
PHP
$data = array (
  'name' => 'string',
  'type' => 'string',
  'group_id' => 'integer',
  'group_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/access-points', false, $context);