{
    "openapi": "3.0.0",
    "info": {
        "title": "My Doc API",
        "version": "1.0.0"
    },
    "paths": {
        "/api/v1/": {},
        "/api/v1/{messenger}/{publicKey}/getInvite": {
            "get": {
                "tags": [
                    "Keys"
                ],
                "summary": "get Invite",
                "operationId": "67bb67e97f8ff8e61a3bb57bd11c7343",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "publicKey",
                        "in": "path",
                        "description": "publicKey",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "Key received successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/InviteKey"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error getting key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/{messenger}/{api_key}/checkInviteKey/{invite_key}": {
            "get": {
                "tags": [
                    "Keys"
                ],
                "summary": "Check invite key",
                "operationId": "67f5e539ba707aac6fc8a6950d3eb7b0",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "invite_key",
                        "in": "path",
                        "description": "invite_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "Invite key checked successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/InviteKey"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Invite key not found",
                                                        "Site not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/sites/{public_key}": {
            "get": {
                "tags": [
                    "Sites"
                ],
                "summary": "Get public info by site",
                "operationId": "b6b374a41974647332711ce1f9c63315",
                "parameters": [
                    {
                        "name": "public_key",
                        "in": "path",
                        "description": "Public key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "Site data successfully geted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/PublicSite"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/sites/{api_key}": {
            "get": {
                "tags": [
                    "Sites"
                ],
                "summary": "Get all info by site",
                "operationId": "b5876b46de7bf97890ab2315c369248d",
                "parameters": [
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "Site data successfully geted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Site"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Sites"
                ],
                "summary": "Delete site",
                "operationId": "e869a608109b105da356ca36847cd683",
                "parameters": [
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "The site has been successfully deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "integer"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Error"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/{messenger}/{api_key}/additionals": {
            "put": {
                "tags": [
                    "Sites"
                ],
                "summary": "Save site additionals by messenger",
                "operationId": "9aac6306da38970d5d676d7b6673b2f0",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Additionals data",
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "callbacksubscribebot": {
                                        "type": "string",
                                        "example": "https://example.com.ua/callback.php"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Data successfully changed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "integer"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Error while save additionals",
                                                        "The domain of the link does not match the domain of the site"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/{messenger}/{api_key}/users": {
            "get": {
                "tags": [
                    "Users"
                ],
                "summary": "Get users list",
                "operationId": "1f9e6dfd8cfdd1b80560589358d6977c",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "query",
                        "in": "query",
                        "description": "Search query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_group_id",
                        "in": "query",
                        "description": "User group id, for show in parameter in_group exist user in query group or not",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "Users list get successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "properties": {
                                                        "items": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/components/schemas/User"
                                                            }
                                                        },
                                                        "limit": {
                                                            "type": "integer"
                                                        },
                                                        "totalCount": {
                                                            "type": "integer"
                                                        },
                                                        "offset": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/{messenger}/{api_key}/getUserInfo/{invite_key}": {
            "get": {
                "tags": [
                    "Users"
                ],
                "summary": "Get user info by invite key",
                "operationId": "443ef898548b2127358353fbbb80a929",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "invite_key",
                        "in": "path",
                        "description": "invite_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "User data get successfully"
                    },
                    "404": {
                        "description": "Error<br>User not registered<br>Invite key not found"
                    }
                }
            }
        },
        "/api/v1/{messenger}/{api_key}/{id}/deactivate": {
            "get": {
                "tags": [
                    "Users"
                ],
                "summary": "Deactivate user",
                "operationId": "bdfe953efb1ace63c9ae18ad31491b1f",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "group id",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "User data get successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/User"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Error<br>User not registered<br>Invite key not found"
                    }
                }
            }
        },
        "/api/v1/{messenger}/{api_key}/templates": {
            "get": {
                "tags": [
                    "Templates"
                ],
                "summary": "Templates list",
                "operationId": "bca2a459a67e5d6f3566834719513b0a",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "Templates list get successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "properties": {
                                                        "items": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/components/schemas/Template"
                                                            }
                                                        },
                                                        "limit": {
                                                            "type": "integer"
                                                        },
                                                        "totalCount": {
                                                            "type": "integer"
                                                        },
                                                        "offset": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "Templates"
                ],
                "summary": "Add new template",
                "operationId": "2ea065925cdd88b880750f6fe2721313",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "description": "New template data",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "Template 1"
                                    },
                                    "template": {
                                        "type": "string",
                                        "example": "New order"
                                    },
                                    "active": {
                                        "type": "boolean",
                                        "example": "true"
                                    },
                                    "send_owner": {
                                        "type": "boolean",
                                        "example": "true"
                                    },
                                    "group_ids": {
                                        "type": "array",
                                        "items": {
                                            "type": "integer"
                                        },
                                        "example": "[1, 2]"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "New template added successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Template"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The answer contains errors",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found",
                                                        "The answer contains errors"
                                                    ]
                                                },
                                                "errors": {
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/{messenger}/{api_key}/templates/{code}": {
            "get": {
                "tags": [
                    "Templates"
                ],
                "summary": "Get template",
                "operationId": "aa74310ffa39703211634dabdeb9fa5e",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "code",
                        "in": "path",
                        "description": "template code",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "Template successfully getting",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "properties": {
                                                        "items": {
                                                            "$ref": "#/components/schemas/Template"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The answer contains errors",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found",
                                                        "User group not found"
                                                    ]
                                                },
                                                "errors": {
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "Templates"
                ],
                "summary": "Edit template",
                "operationId": "4d6df905ac8c4b1aeef1df1cfa704703",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "code",
                        "in": "path",
                        "description": "template code",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Edit template data",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "Template 1"
                                    },
                                    "template": {
                                        "type": "string",
                                        "example": "New order"
                                    },
                                    "active": {
                                        "type": "boolean",
                                        "example": "true"
                                    },
                                    "send_owner": {
                                        "type": "boolean",
                                        "example": "true"
                                    },
                                    "group_ids": {
                                        "type": "array",
                                        "items": {
                                            "type": "integer"
                                        },
                                        "example": "[1, 2]"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Templates list get successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "properties": {
                                                        "items": {
                                                            "$ref": "#/components/schemas/Template"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The answer contains errors",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found",
                                                        "The answer contains errors"
                                                    ]
                                                },
                                                "errors": {
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Templates"
                ],
                "summary": "Delete template",
                "operationId": "7c76f91d260e94e0f58a402dad525967",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "code",
                        "in": "path",
                        "description": "template code",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "Template successfully deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "string"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Template not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found",
                                                        "Template not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/{messenger}/{api_key}/templates/{code}/hook": {
            "post": {
                "tags": [
                    "Templates"
                ],
                "summary": "Hook template",
                "operationId": "80f45b094adee6a042be5aead6bfa8d2",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "code",
                        "in": "path",
                        "description": "template code",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Hook data",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "property1": {
                                        "type": "string",
                                        "example": "property1"
                                    },
                                    "property2": {
                                        "type": "string",
                                        "example": "property2"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Hook successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The answer contains errors",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "The answer contains errors",
                                                        "Site not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/{messenger}/{api_key}/userGroups": {
            "get": {
                "tags": [
                    "User groups"
                ],
                "summary": "User groups list",
                "operationId": "d4cb956ce43bdfbcc1d0e769e49f2a83",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "User groups list get successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "properties": {
                                                        "items": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/components/schemas/UserGroup"
                                                            }
                                                        },
                                                        "limit": {
                                                            "type": "integer"
                                                        },
                                                        "totalCount": {
                                                            "type": "integer"
                                                        },
                                                        "offset": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "User groups"
                ],
                "summary": "Add new user group",
                "operationId": "980b7b5fa3970f9742764702c4e45da3",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Add new user group",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "User group 1"
                                    },
                                    "active": {
                                        "type": "boolean",
                                        "example": "true"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Templates list get successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/UserGroup"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error when creating user groups",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Error when creating user group"
                                                    ]
                                                },
                                                "errors": {
                                                    "description": "Errors list",
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/{messenger}/{api_key}/userGroups/{id}": {
            "get": {
                "tags": [
                    "User groups"
                ],
                "summary": "Get user group info",
                "operationId": "bd49f35c2ca9898fedac5ed1e205b71a",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "group id",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "User group info get successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/UserGroup"
                                                },
                                                "errors": {
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error while getting user group info",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Error while getting user group info"
                                                    ]
                                                },
                                                "errors": {
                                                    "description": "Errors list",
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "User group not found<br>Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found",
                                                        "User group not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "User groups"
                ],
                "summary": "Edit user group",
                "operationId": "0e4347744738863f283adf257e5afec7",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "group id",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Add new user group",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "User group 1"
                                    },
                                    "active": {
                                        "type": "boolean",
                                        "example": "true"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "User group edited successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/UserGroup"
                                                },
                                                "errors": {
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error while editing user group",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Error while editing user group",
                                                        "The system group cannot be edited"
                                                    ]
                                                },
                                                "errors": {
                                                    "description": "Errors list",
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "User group not found<br>Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found",
                                                        "User group not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "User groups"
                ],
                "summary": "Delete user group",
                "operationId": "77d942979782a88be7495573e8295b07",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "group id",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "User group deleted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "integer"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error while deleteing user group",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Error while editing user group",
                                                        "The system group cannot be deleted"
                                                    ]
                                                },
                                                "errors": {
                                                    "description": "Errors list",
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "User group not found<br>Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found",
                                                        "User group not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/{messenger}/{publicKey}/userGroups/{id}/qr.png": {
            "get": {
                "tags": [
                    "User groups"
                ],
                "summary": "Invite qr to user group",
                "operationId": "a446eecc1f3e890f4cf03a0ea09b5872",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "publicKey",
                        "in": "path",
                        "description": "publicKey",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "group id",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "Invite qr to user group in png format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "integer"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error while get invite qr to user group",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Error",
                                                        "The system group cannot have qr"
                                                    ]
                                                },
                                                "errors": {
                                                    "description": "Errors list",
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "User group not found<br>Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found",
                                                        "User group not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/{messenger}/{api_key}/userGroups/{id}/users": {
            "get": {
                "tags": [
                    "User groups"
                ],
                "summary": "Users list in group",
                "operationId": "9180d5503da880c597cf986cd921fd7d",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "group id",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "Users list successfully get",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "properties": {
                                                        "items": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/components/schemas/User"
                                                            }
                                                        },
                                                        "limit": {
                                                            "type": "integer"
                                                        },
                                                        "totalCount": {
                                                            "type": "integer"
                                                        },
                                                        "offset": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/{messenger}/{api_key}/userGroups/{id}/users/{user_id}": {
            "post": {
                "tags": [
                    "User groups"
                ],
                "summary": "Link user to group",
                "operationId": "1c117cfd63c816297ca58723f57f78a9",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "group id",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_id",
                        "in": "path",
                        "description": "user id",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "The user has been successfully added to the group",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/User"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error while deleteing user group",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Error",
                                                        "User group not found",
                                                        "Error adding to group",
                                                        "The user is already in the group",
                                                        "User not found",
                                                        "Linking users to a group is prohibited"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "User groups"
                ],
                "summary": "Delete user from group",
                "operationId": "fb86a0ab53a89a6b3465586c9d7f2758",
                "parameters": [
                    {
                        "name": "messenger",
                        "in": "path",
                        "description": "messenger",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "tg"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "path",
                        "description": "api_key",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "group id",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_id",
                        "in": "path",
                        "description": "user id",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {},
                "responses": {
                    "200": {
                        "description": "User successfully deleted from group",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/User"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error while deleteing user group",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Error",
                                                        "User group not found",
                                                        "Deleting from this group is prohibited",
                                                        "User not found in group",
                                                        "User not found in group",
                                                        "User not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Site not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ErrorResponse"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "description": "Error message",
                                                    "type": "string",
                                                    "enum": [
                                                        "Site not found"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "SuccessResponse": {
                "title": "Success response",
                "description": "Success response scheme",
                "properties": {
                    "status": {
                        "description": "status",
                        "type": "string"
                    },
                    "message": {
                        "description": "Success message",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "ErrorResponse": {
                "title": "Error response",
                "description": "Error response scheme",
                "properties": {
                    "status": {
                        "description": "status",
                        "type": "string"
                    },
                    "message": {
                        "description": "Error message",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "Site": {
                "title": "Site",
                "description": "Site scheme",
                "properties": {
                    "id": {
                        "description": "Id",
                        "type": "integer"
                    },
                    "active": {
                        "description": "Active",
                        "type": "boolean"
                    },
                    "api_key": {
                        "description": "Active",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "Created at",
                        "type": "string",
                        "format": "date"
                    },
                    "domain": {
                        "description": "Domain",
                        "type": "string",
                        "format": "url"
                    },
                    "license": {
                        "description": "License",
                        "type": "string"
                    },
                    "public_key": {
                        "description": "Public key",
                        "type": "string"
                    },
                    "title": {
                        "description": "Title",
                        "type": "string"
                    },
                    "verification_code": {
                        "description": "Verification code",
                        "type": "string"
                    },
                    "user_id": {
                        "description": "User id",
                        "type": "integer"
                    },
                    "user": {
                        "description": "User id",
                        "properties": {
                            "email": {
                                "type": "string",
                                "format": "email"
                            },
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "type": "object"
                    },
                    "messengers": {
                        "description": "Messengers",
                        "type": "array",
                        "items": {
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "name": {
                                    "type": "string"
                                },
                                "created_at": {
                                    "description": "Created at",
                                    "type": "string",
                                    "format": "date"
                                },
                                "updated_at": {
                                    "description": "Updated at",
                                    "type": "string",
                                    "format": "date"
                                },
                                "active": {
                                    "type": "boolean"
                                },
                                "code": {
                                    "type": "string"
                                },
                                "invite": {
                                    "properties": {
                                        "link": {
                                            "type": "string"
                                        },
                                        "qr": {
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                },
                                "additionals": {
                                    "properties": {
                                        "callbacksubscribebot": {
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            },
                            "type": "object"
                        }
                    }
                },
                "type": "object"
            },
            "PublicSite": {
                "title": "Public site info",
                "description": "Public site info scheme",
                "properties": {
                    "domain": {
                        "description": "Domain",
                        "type": "string",
                        "format": "url"
                    },
                    "public_key": {
                        "description": "Public key",
                        "type": "string"
                    },
                    "title": {
                        "description": "Title",
                        "type": "string"
                    },
                    "messengers": {
                        "description": "Messengers",
                        "type": "array",
                        "items": {
                            "properties": {
                                "name": {
                                    "type": "string"
                                },
                                "code": {
                                    "type": "string"
                                },
                                "invite": {
                                    "properties": {
                                        "link": {
                                            "type": "string"
                                        },
                                        "qr": {
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            },
                            "type": "object"
                        }
                    }
                },
                "type": "object"
            },
            "Additional": {
                "title": "Additional",
                "description": "Additional scheme",
                "properties": {
                    "callbacksubscribebot": {
                        "description": "Callback subscribe bot",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "Template": {
                "title": "Template",
                "description": "Template scheme",
                "properties": {
                    "code": {
                        "description": "Code",
                        "type": "string",
                        "format": "uuid"
                    },
                    "name": {
                        "description": "Name",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "Created at",
                        "type": "string",
                        "format": "date"
                    },
                    "updated_at": {
                        "description": "Updated at",
                        "type": "string",
                        "format": "date"
                    },
                    "active": {
                        "description": "Active",
                        "type": "boolean"
                    },
                    "send_owner": {
                        "description": "Send owner",
                        "type": "boolean"
                    },
                    "template": {
                        "description": "Template string",
                        "type": "string"
                    },
                    "group_ids": {
                        "description": "Group ids for whom send",
                        "type": "array",
                        "items": {
                            "type": "integer"
                        }
                    },
                    "fiscale": {
                        "description": "Fiscale",
                        "type": "boolean"
                    },
                    "fiscale_api_key": {
                        "description": "Fiscale api key",
                        "type": "string"
                    },
                    "allow_by_license": {
                        "description": "Allow by license",
                        "type": "string"
                    },
                    "href": {
                        "description": "Hook href",
                        "type": "string",
                        "format": "uri"
                    }
                },
                "type": "object"
            },
            "UserGroup": {
                "title": "User Group",
                "description": "User Group scheme",
                "properties": {
                    "id": {
                        "description": "Id",
                        "type": "integer",
                        "format": "int64"
                    },
                    "name": {
                        "description": "Name",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "Created at",
                        "type": "string",
                        "format": "date"
                    },
                    "updated_at": {
                        "description": "Updated at",
                        "type": "string",
                        "format": "date"
                    },
                    "active": {
                        "description": "Active",
                        "type": "boolean"
                    },
                    "system": {
                        "description": "Is system group or not",
                        "type": "boolean"
                    },
                    "can_delete_users_from_group": {
                        "description": "Can delete users from group",
                        "type": "boolean"
                    },
                    "can_add_users_to_group": {
                        "description": "Can add users to group",
                        "type": "boolean"
                    },
                    "users_count": {
                        "description": "Users count",
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "InviteKey": {
                "title": "Invite key",
                "description": "Invite key scheme",
                "properties": {
                    "status": {
                        "description": "Public key status",
                        "type": "string",
                        "enum": [
                            "active",
                            "inactive",
                            "used"
                        ]
                    },
                    "key": {
                        "description": "Public key",
                        "type": "string"
                    },
                    "invite_key": {
                        "description": "Invite key",
                        "type": "string"
                    },
                    "link": {
                        "description": "Link with invite key",
                        "type": "string",
                        "format": "uri"
                    },
                    "link_with_invite_key": {
                        "description": "Link with public key + invite key",
                        "type": "string",
                        "format": "uri"
                    },
                    "qr": {
                        "description": "Qr link with invite key",
                        "type": "string",
                        "format": "uri"
                    },
                    "qr_with_invite_key": {
                        "description": "Qr with public key + invite key",
                        "type": "string",
                        "format": "uri"
                    }
                },
                "type": "object"
            },
            "User": {
                "title": "User",
                "description": "User scheme",
                "properties": {
                    "id": {
                        "description": "id",
                        "type": "string"
                    },
                    "username": {
                        "description": "Username",
                        "type": "string"
                    },
                    "phone": {
                        "description": "Phone",
                        "type": "string"
                    },
                    "first_name": {
                        "description": "First name",
                        "type": "string"
                    },
                    "last_name": {
                        "description": "Last name",
                        "type": "string"
                    },
                    "hash": {
                        "description": "hash sha256",
                        "type": "string"
                    }
                },
                "type": "object"
            }
        }
    }
}