Skip to main content
Skip table of contents

Creating and linking keys to an apartment

When creating keys, they are initially registered on the intercom, and after a successful response from the intercom, they are registered on the platform.

POST/api/admin/v1/intercoms/{intercom}/keys

Headers

Authorization

Bearer token

Accept

application/json

X-Client

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

X-UUID

unique device id

Body

json

JSON
{
    "flat": null,
    "keys": [
        "0000003045CAAC",
        "0000003046CAAC"
    ]
}

intercomoptional

int

Unique identifier of the intercom

keysrequired

array

Array of intercom keys. The maximum number of keys in the array is 100

flatrequired

integer

the apartment to which the keys will be linked. See the List of intercom apartments

Response

200

A successful response will return all the created keys

JSON
[
                {
                    "id": 7,
                    "key": "0000003045CAAC",
                    "flat": null,
                    "created_at": "2022-11-14 14:27:14",
                    "updated_at": "2022-11-14 14:27:14"
                },
                {
                    "id": 8,
                    "key": "0000003046CAAC",
                    "flat": null,
                    "created_at": "2022-11-14 14:27:14",
                    "updated_at": "2022-11-14 14:27:14"
                }
            ]
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/{intercom}/keys' \
--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 '{
    "flat": null,
    "keys": [
        "0000003045CAAC",
        "0000003046CAAC"
    ]
}'
JavaScript errors detected

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

If this problem persists, please contact our support.