Skip to main content
Skip table of contents

Create a group. VMS Admin API

POST/api/admin/v1/intercoms/groups

Headers

Authorization

Bearer token

Accept

application/json

X-Client

ios-cctv|android-cctv|thick-legal|web

X-UUID

unique device id

Body

json

JSON
{
    "name": "name",
    "parent_id": 2,
    "is_house": true
}

namerequired

string

Group name

parent_idrequired

int

ID of the parent group to which the created group will belong

is_houserequired

bool

Is it a building

Response

201

Successful response

JSON
{
    "id": 1,
    "name": "Cameras",
    "full_pretty": null,
    "is_house": 0,
    "cameras_count": 0,
    "parent_id": null,
    "csa_id": null,
    "intercoms_count": 0
}
401

Authorization token is not provided or is invalid. Obtaining a token

422

Returns a JSON object with an error. Validation

JSON
{
    "message": "There will be no informative message here",
    "errors": {
        "any_key": [
            "The reason for the error will be described here"
        ]
    }
}

Example

JSON
curl -k --location --request POST 'https://vms.local/api/admin/v1/intercoms/groups' \
--header 'Authorization:Bearer token' \
--header 'Accept:application/json' \
--header 'X-Client:ios-cctv|android-cctv|thick-legal|web' \
--header 'X-UUID:unique device id' \
--header 'Content-Type: application/json \
--data-raw '{
    "name": "name",
    "parent_id": 2,
    "is_house": true
}'
JavaScript errors detected

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

If this problem persists, please contact our support.