{
  "openapi": "3.0.3",
  "info": {
    "title": "API конструктора Quescha",
    "version": "2.0",
    "description": "Методы для работы с ботами, подписчиками, списками, CRM и платежами. Изменяющие методы принимают только POST."
  },
  "servers": [
    {
      "url": "https://api.quescha.com/api"
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization"
      }
    }
  },
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/account/balance/get": {
      "post": {
        "tags": [
          "Аккаунт"
        ],
        "summary": "Баланс аккаунта",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"balance\": 1234 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Аккаунт"
        ],
        "summary": "Баланс аккаунта",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { \"balance\": 1234 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/account/get": {
      "post": {
        "tags": [
          "Аккаунт"
        ],
        "summary": "Аккаунт, тариф и расход",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"account\": {…}, \"tariff\": {…}, \"used\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Аккаунт"
        ],
        "summary": "Аккаунт, тариф и расход",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { \"account\": {…}, \"tariff\": {…}, \"used\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/account/summary": {
      "post": {
        "tags": [
          "Аккаунт"
        ],
        "summary": "Сводка: боты, проекты, цепочки, списки",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"bots\": [], \"groups\": [], \"chains\": [], \"lists\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Аккаунт"
        ],
        "summary": "Сводка: боты, проекты, цепочки, списки",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { \"bots\": [], \"groups\": [], \"chains\": [], \"lists\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/log/get": {
      "post": {
        "tags": [
          "Аккаунт"
        ],
        "summary": "Журнал вызовов API",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string",
                    "description": "часть адреса метода"
                  },
                  "status": {
                    "type": "string",
                    "description": "код ответа"
                  },
                  "failed": {
                    "type": "string",
                    "description": "только ошибки"
                  },
                  "from": {
                    "type": "string",
                    "description": "с какой даты"
                  },
                  "limit": {
                    "type": "string",
                    "description": "сколько строк"
                  },
                  "offset": {
                    "type": "string",
                    "description": "смещение"
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [], \"total\": 0 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Аккаунт"
        ],
        "summary": "Журнал вызовов API",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "required": false,
            "description": "часть адреса метода",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "код ответа",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "failed",
            "in": "query",
            "required": false,
            "description": "только ошибки",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "с какой даты",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "сколько строк",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "смещение",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [], \"total\": 0 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/subscriber/get": {
      "post": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Карточка подписчика",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": "BotID бота"
                  },
                  "clientid": {
                    "type": "string",
                    "description": "ClientID подписчика"
                  },
                  "messenger": {
                    "type": "string",
                    "description": "мессенджер"
                  },
                  "subscriber": {
                    "type": "string",
                    "description": "внутренний номер карточки — вместо трёх параметров выше"
                  }
                },
                "required": [
                  "botid",
                  "clientid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"subscriber\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Карточка подписчика",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "botid",
            "in": "query",
            "required": true,
            "description": "BotID бота",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientid",
            "in": "query",
            "required": true,
            "description": "ClientID подписчика",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "messenger",
            "in": "query",
            "required": false,
            "description": "мессенджер",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subscriber",
            "in": "query",
            "required": false,
            "description": "внутренний номер карточки — вместо трёх параметров выше",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"subscriber\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/subscriber/find": {
      "post": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Поиск по имени, нику, коду или заметке",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "что искать"
                  },
                  "tag": {
                    "type": "string",
                    "description": "точный тег"
                  },
                  "botid": {
                    "type": "string",
                    "description": "искать в одном боте"
                  },
                  "limit": {
                    "type": "string",
                    "description": ""
                  },
                  "offset": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "query"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Поиск по имени, нику, коду или заметке",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "что искать",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "description": "точный тег",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "botid",
            "in": "query",
            "required": false,
            "description": "искать в одном боте",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/subscriber/list": {
      "post": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Список подписчиков с фильтрами",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "messenger": {
                    "type": "string",
                    "description": ""
                  },
                  "tag": {
                    "type": "string",
                    "description": ""
                  },
                  "active": {
                    "type": "string",
                    "description": "true или false"
                  },
                  "blocked": {
                    "type": "string",
                    "description": ""
                  },
                  "dialog": {
                    "type": "string",
                    "description": "начал диалог"
                  },
                  "from": {
                    "type": "string",
                    "description": "дата подписки с"
                  },
                  "to": {
                    "type": "string",
                    "description": "по"
                  },
                  "sort": {
                    "type": "string",
                    "description": "new или old"
                  },
                  "limit": {
                    "type": "string",
                    "description": ""
                  },
                  "offset": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [], \"total\": 0 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Список подписчиков с фильтрами",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "botid",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "messenger",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "description": "true или false",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "blocked",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dialog",
            "in": "query",
            "required": false,
            "description": "начал диалог",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "дата подписки с",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "по",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "new или old",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [], \"total\": 0 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/subscriber/tag/list": {
      "post": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Теги подписчика",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "botid",
                  "clientid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"tags\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Теги подписчика",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "botid",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientid",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"tags\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/subscriber/data/get": {
      "post": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Переменные подписчика по цепочкам",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  },
                  "chaincode": {
                    "type": "string",
                    "description": "только одна цепочка"
                  }
                },
                "required": [
                  "botid",
                  "clientid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"chains\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Переменные подписчика по цепочкам",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "botid",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientid",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chaincode",
            "in": "query",
            "required": false,
            "description": "только одна цепочка",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"chains\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/subscriber/chat/get": {
      "post": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Переписка с подписчиком",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  },
                  "limit": {
                    "type": "string",
                    "description": ""
                  },
                  "offset": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "botid",
                  "clientid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Переписка с подписчиком",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "botid",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientid",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/subscriber/chains/get": {
      "post": {
        "tags": [
          "Подписчики"
        ],
        "summary": "В каких цепочках находится подписчик",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "botid",
                  "clientid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"chains\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Подписчики"
        ],
        "summary": "В каких цепочках находится подписчик",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "botid",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientid",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"chains\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/subscriber/create": {
      "post": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Создать или обновить подписчика",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  },
                  "messenger": {
                    "type": "string",
                    "description": ""
                  },
                  "name": {
                    "type": "string",
                    "description": ""
                  },
                  "username": {
                    "type": "string",
                    "description": ""
                  },
                  "note": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "botid",
                  "clientid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"subscriber\": {…}, \"created\": true }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/subscriber/update": {
      "post": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Изменить имя, ник или заметку",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  },
                  "name": {
                    "type": "string",
                    "description": ""
                  },
                  "username": {
                    "type": "string",
                    "description": ""
                  },
                  "note": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "botid",
                  "clientid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"subscriber\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/subscriber/tag/add": {
      "post": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Добавить тег",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  },
                  "tag": {
                    "type": "string",
                    "description": "строка или массив строк"
                  }
                },
                "required": [
                  "botid",
                  "clientid",
                  "tag"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"tags\": [], \"chains\": true }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/subscriber/tag/remove": {
      "post": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Снять тег",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  },
                  "tag": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "botid",
                  "clientid",
                  "tag"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"tags\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/subscriber/data/set": {
      "post": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Записать переменные подписчику",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  },
                  "data": {
                    "type": "string",
                    "description": "объект «имя: значение»"
                  },
                  "chaincode": {
                    "type": "string",
                    "description": "только в одну цепочку"
                  }
                },
                "required": [
                  "botid",
                  "clientid",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"ok\": true, \"chains\": 1 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/subscriber/block": {
      "post": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Заблокировать подписчика",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "botid",
                  "clientid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"subscriber\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/subscriber/unblock": {
      "post": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Разблокировать подписчика",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "botid",
                  "clientid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"subscriber\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/subscriber/delete": {
      "post": {
        "tags": [
          "Подписчики"
        ],
        "summary": "Удалить подписчика из базы",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  },
                  "messenger": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "botid",
                  "clientid",
                  "messenger"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"result\": \"Subscriber successfully deleted\" }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/message/send": {
      "post": {
        "tags": [
          "Отправка и запуск"
        ],
        "summary": "Отправить сообщение подписчику",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  },
                  "text": {
                    "type": "string",
                    "description": "текст сообщения"
                  },
                  "buttons": {
                    "type": "string",
                    "description": "массив кнопок-ссылок [{name,url}]"
                  }
                },
                "required": [
                  "botid",
                  "clientid",
                  "text"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"ok\": true, \"sent\": 1 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/block/start": {
      "post": {
        "tags": [
          "Отправка и запуск"
        ],
        "summary": "Запустить блок у подписчика",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  },
                  "chaincode": {
                    "type": "string",
                    "description": "код цепочки"
                  },
                  "stepcode": {
                    "type": "string",
                    "description": "код шага"
                  },
                  "block": {
                    "type": "string",
                    "description": "номер блока с единицы или его ID"
                  },
                  "data": {
                    "type": "string",
                    "description": "переменные для сценария"
                  }
                },
                "required": [
                  "botid",
                  "clientid",
                  "chaincode",
                  "stepcode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"ok\": true, \"block\": \"…\" }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/chain/start": {
      "post": {
        "tags": [
          "Отправка и запуск"
        ],
        "summary": "Запустить цепочку с первого шага",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  },
                  "chaincode": {
                    "type": "string",
                    "description": ""
                  },
                  "data": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "botid",
                  "clientid",
                  "chaincode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"ok\": true }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/chain/stop": {
      "post": {
        "tags": [
          "Отправка и запуск"
        ],
        "summary": "Остановить цепочку у подписчика",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  },
                  "chaincode": {
                    "type": "string",
                    "description": "пусто — остановить все"
                  }
                },
                "required": [
                  "botid",
                  "clientid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"ok\": true, \"stopped\": 1 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/broadcast/send": {
      "post": {
        "tags": [
          "Отправка и запуск"
        ],
        "summary": "Рассылка по сегменту",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": ""
                  },
                  "buttons": {
                    "type": "string",
                    "description": ""
                  },
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "tag": {
                    "type": "string",
                    "description": "кому: тег или массив тегов"
                  },
                  "dialog": {
                    "type": "string",
                    "description": "только начавшим диалог"
                  },
                  "name": {
                    "type": "string",
                    "description": "название рассылки"
                  }
                },
                "required": [
                  "text"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"ok\": true, \"planned\": 100, \"code\": \"…\" }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/broadcast/stop": {
      "post": {
        "tags": [
          "Отправка и запуск"
        ],
        "summary": "Отменить запланированную рассылку",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "код рассылки"
                  }
                },
                "required": [
                  "code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"ok\": true, \"cleared\": 100 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/message/next/clear": {
      "post": {
        "tags": [
          "Отправка и запуск"
        ],
        "summary": "Отменить отложенный запуск следующего сообщения",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "botid",
                  "clientid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"result\": \"cleared\" }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/list/all": {
      "post": {
        "tags": [
          "Списки"
        ],
        "summary": "Все списки аккаунта",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "group": {
                    "type": "string",
                    "description": "код проекта"
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Списки"
        ],
        "summary": "Все списки аккаунта",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "group",
            "in": "query",
            "required": false,
            "description": "код проекта",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/list/rows/get": {
      "post": {
        "tags": [
          "Списки"
        ],
        "summary": "Строки списка",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "listid": {
                    "type": "string",
                    "description": "номер списка; вместо него можно list — название"
                  },
                  "limit": {
                    "type": "string",
                    "description": ""
                  },
                  "offset": {
                    "type": "string",
                    "description": ""
                  },
                  "sort": {
                    "type": "string",
                    "description": "new или old"
                  }
                },
                "required": [
                  "listid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [], \"total\": 0 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Списки"
        ],
        "summary": "Строки списка",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "listid",
            "in": "query",
            "required": true,
            "description": "номер списка; вместо него можно list — название",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "new или old",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [], \"total\": 0 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/list/rows/find": {
      "post": {
        "tags": [
          "Списки"
        ],
        "summary": "Поиск строк по колонкам",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "listid": {
                    "type": "string",
                    "description": ""
                  },
                  "where": {
                    "type": "string",
                    "description": "объект «колонка: значение»"
                  },
                  "column": {
                    "type": "string",
                    "description": "одно условие: колонка"
                  },
                  "value": {
                    "type": "string",
                    "description": "одно условие: значение"
                  },
                  "exact": {
                    "type": "string",
                    "description": "точное совпадение, по умолчанию да"
                  }
                },
                "required": [
                  "listid",
                  "where"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [], \"total\": 0 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Списки"
        ],
        "summary": "Поиск строк по колонкам",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "listid",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "where",
            "in": "query",
            "required": true,
            "description": "объект «колонка: значение»",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "column",
            "in": "query",
            "required": false,
            "description": "одно условие: колонка",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value",
            "in": "query",
            "required": false,
            "description": "одно условие: значение",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exact",
            "in": "query",
            "required": false,
            "description": "точное совпадение, по умолчанию да",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [], \"total\": 0 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/list/create": {
      "post": {
        "tags": [
          "Списки"
        ],
        "summary": "Создать список",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": ""
                  },
                  "headers": {
                    "type": "string",
                    "description": "массив колонок"
                  },
                  "group": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "name",
                  "headers"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"list\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/list/row/add": {
      "post": {
        "tags": [
          "Списки"
        ],
        "summary": "Добавить строку",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "listid": {
                    "type": "string",
                    "description": ""
                  },
                  "row": {
                    "type": "string",
                    "description": "объект «колонка: значение»"
                  },
                  "values": {
                    "type": "string",
                    "description": "или массив значений по порядку колонок"
                  },
                  "clientid": {
                    "type": "string",
                    "description": "для служебных колонок"
                  },
                  "messenger": {
                    "type": "string",
                    "description": ""
                  },
                  "botid": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "listid",
                  "row"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"row\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/list/rows/add": {
      "post": {
        "tags": [
          "Списки"
        ],
        "summary": "Добавить много строк",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "listid": {
                    "type": "string",
                    "description": ""
                  },
                  "rows": {
                    "type": "string",
                    "description": "массив объектов или массивов, не больше 500"
                  }
                },
                "required": [
                  "listid",
                  "rows"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"added\": 10 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/list/row/edit": {
      "post": {
        "tags": [
          "Списки"
        ],
        "summary": "Изменить строку",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "listid": {
                    "type": "string",
                    "description": ""
                  },
                  "rowid": {
                    "type": "string",
                    "description": ""
                  },
                  "row": {
                    "type": "string",
                    "description": "меняются только переданные колонки"
                  },
                  "values": {
                    "type": "string",
                    "description": "или строка целиком"
                  }
                },
                "required": [
                  "listid",
                  "rowid",
                  "row"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"row\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/list/row/delete": {
      "post": {
        "tags": [
          "Списки"
        ],
        "summary": "Удалить строку или несколько",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "listid": {
                    "type": "string",
                    "description": ""
                  },
                  "rowid": {
                    "type": "string",
                    "description": ""
                  },
                  "rowids": {
                    "type": "string",
                    "description": "массив номеров"
                  }
                },
                "required": [
                  "listid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"deleted\": 1 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/list/clear": {
      "post": {
        "tags": [
          "Списки"
        ],
        "summary": "Очистить список",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "listid": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "listid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"ok\": true, \"deleted\": 100 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/crm/stage/list": {
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Этапы воронки",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "group": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Этапы воронки",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "group",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/crm/board": {
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Доска: сколько клиентов на этапах",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "group": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [], \"without\": 0 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Доска: сколько клиентов на этапах",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "group",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [], \"without\": 0 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/crm/stage/get": {
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Этап и ответственный подписчика",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "botid",
                  "clientid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"stage\": \"…\", \"assignee\": \"…\" }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Этап и ответственный подписчика",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "botid",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientid",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"stage\": \"…\", \"assignee\": \"…\" }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/crm/stage/subscribers": {
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Подписчики одного этапа",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stage": {
                    "type": "string",
                    "description": ""
                  },
                  "limit": {
                    "type": "string",
                    "description": ""
                  },
                  "offset": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "stage"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Подписчики одного этапа",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "stage",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/crm/manager/list": {
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Сотрудники, получающие заявки",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Сотрудники, получающие заявки",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/crm/assignee/list": {
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Ответственные",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Ответственные",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/crm/stage/set": {
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Перевести подписчика на этап",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  },
                  "stage": {
                    "type": "string",
                    "description": "пусто — снять этап"
                  }
                },
                "required": [
                  "botid",
                  "clientid",
                  "stage"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"ok\": true, \"stage\": \"…\" }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/crm/stage/create": {
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Создать этап воронки",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": ""
                  },
                  "color": {
                    "type": "string",
                    "description": ""
                  },
                  "group": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"stage\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/crm/assignee/set": {
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Назначить ответственного",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "clientid": {
                    "type": "string",
                    "description": ""
                  },
                  "assignee": {
                    "type": "string",
                    "description": "логин; пусто — снять"
                  }
                },
                "required": [
                  "botid",
                  "clientid",
                  "assignee"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"ok\": true }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/payment/system/list": {
      "post": {
        "tags": [
          "Платежи"
        ],
        "summary": "Подключённые платёжные системы",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Платежи"
        ],
        "summary": "Подключённые платёжные системы",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/payment/status": {
      "post": {
        "tags": [
          "Платежи"
        ],
        "summary": "Статус платежа",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payment": {
                    "type": "string",
                    "description": "номер платежа"
                  }
                },
                "required": [
                  "payment"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"paid\": true }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Платежи"
        ],
        "summary": "Статус платежа",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "payment",
            "in": "query",
            "required": true,
            "description": "номер платежа",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"paid\": true }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/payment/list": {
      "post": {
        "tags": [
          "Платежи"
        ],
        "summary": "Платежи за период",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "paid": {
                    "type": "string",
                    "description": "только оплаченные"
                  },
                  "from": {
                    "type": "string",
                    "description": ""
                  },
                  "to": {
                    "type": "string",
                    "description": ""
                  },
                  "limit": {
                    "type": "string",
                    "description": ""
                  },
                  "offset": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [], \"total\": 0 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Платежи"
        ],
        "summary": "Платежи за период",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "paid",
            "in": "query",
            "required": false,
            "description": "только оплаченные",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [], \"total\": 0 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/payment/link/create": {
      "post": {
        "tags": [
          "Платежи"
        ],
        "summary": "Создать ссылку на оплату",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "system": {
                    "type": "string",
                    "description": "номер или название платёжной системы"
                  },
                  "sum": {
                    "type": "string",
                    "description": ""
                  },
                  "currency": {
                    "type": "string",
                    "description": "по умолчанию RUB"
                  },
                  "description": {
                    "type": "string",
                    "description": ""
                  },
                  "returnurl": {
                    "type": "string",
                    "description": ""
                  },
                  "payloads": {
                    "type": "string",
                    "description": "массив [{name,data}]"
                  }
                },
                "required": [
                  "system",
                  "sum"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"link\": \"https://…\", \"payment\": 1 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/bot/list": {
      "post": {
        "tags": [
          "Боты"
        ],
        "summary": "Боты аккаунта",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Боты"
        ],
        "summary": "Боты аккаунта",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/bot/count": {
      "post": {
        "tags": [
          "Боты"
        ],
        "summary": "Количество подписчиков бота",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "botid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"count\": 1024 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Боты"
        ],
        "summary": "Количество подписчиков бота",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "botid",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"count\": 1024 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/group/list": {
      "post": {
        "tags": [
          "Боты"
        ],
        "summary": "Проекты (группы ботов)",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Боты"
        ],
        "summary": "Проекты (группы ботов)",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/chain/list": {
      "post": {
        "tags": [
          "Боты"
        ],
        "summary": "Цепочки и их коды",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Боты"
        ],
        "summary": "Цепочки и их коды",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/chain/steps": {
      "post": {
        "tags": [
          "Боты"
        ],
        "summary": "Шаги цепочки и блоки внутри них",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "chaincode": {
                    "type": "string",
                    "description": ""
                  },
                  "blocks": {
                    "type": "string",
                    "description": "вернуть блоки шагов-сценариев"
                  }
                },
                "required": [
                  "chaincode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Боты"
        ],
        "summary": "Шаги цепочки и блоки внутри них",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "chaincode",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "blocks",
            "in": "query",
            "required": false,
            "description": "вернуть блоки шагов-сценариев",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/stat/get": {
      "post": {
        "tags": [
          "Боты"
        ],
        "summary": "Статистика по дням",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "description": "дата ГГГГ-ММ-ДД"
                  },
                  "to": {
                    "type": "string",
                    "description": ""
                  },
                  "messenger": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [], \"total\": {…}, \"now\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Боты"
        ],
        "summary": "Статистика по дням",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "дата ГГГГ-ММ-ДД",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "messenger",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [], \"total\": {…}, \"now\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/bot/generate/status": {
      "post": {
        "tags": [
          "Боты"
        ],
        "summary": "Ход генерации бота",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"status\": \"completed\" }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Боты"
        ],
        "summary": "Ход генерации бота",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { \"status\": \"completed\" }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/bot/state/set": {
      "post": {
        "tags": [
          "Боты"
        ],
        "summary": "Включить или выключить бота",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  },
                  "active": {
                    "type": "string",
                    "description": "true или false"
                  }
                },
                "required": [
                  "botid",
                  "active"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"ok\": true }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/bot/webhook/refresh": {
      "post": {
        "tags": [
          "Боты"
        ],
        "summary": "Переустановить вебхук бота",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botid": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "botid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"ok\": true }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/bot/generate": {
      "post": {
        "tags": [
          "Боты"
        ],
        "summary": "Собрать бота нейросетью",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "theme": {
                    "type": "string",
                    "description": "описание бота словами"
                  },
                  "channels": {
                    "type": "string",
                    "description": "куда ставить"
                  },
                  "payment": {
                    "type": "string",
                    "description": "подключить платежи"
                  },
                  "google": {
                    "type": "string",
                    "description": ""
                  },
                  "yandex": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "theme"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"taskId\": \"…\" }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/bot/export": {
      "post": {
        "tags": [
          "Боты"
        ],
        "summary": "Выгрузить проекты файлом",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "groups": {
                    "type": "string",
                    "description": "массив кодов проектов"
                  }
                },
                "required": [
                  "groups"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"snippet\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/bot/import": {
      "post": {
        "tags": [
          "Боты"
        ],
        "summary": "Загрузить проект из выгрузки",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "string",
                    "description": "содержимое выгрузки"
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"ok\": true }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/file/upload": {
      "post": {
        "tags": [
          "Боты"
        ],
        "summary": "Загрузить файл в аккаунт",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "скачать по ссылке"
                  },
                  "content": {
                    "type": "string",
                    "description": "или содержимое в base64"
                  },
                  "name": {
                    "type": "string",
                    "description": "имя файла"
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"file\": \"…\", \"size\": 1024 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/link/create": {
      "post": {
        "tags": [
          "Боты"
        ],
        "summary": "Создать короткую ссылку",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": ""
                  },
                  "maxvisits": {
                    "type": "string",
                    "description": "предел переходов"
                  },
                  "maxlife": {
                    "type": "string",
                    "description": "жизнь в минутах"
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"short\": \"https://…\" }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/link/list": {
      "post": {
        "tags": [
          "Боты"
        ],
        "summary": "Короткие ссылки и переходы",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "string",
                    "description": ""
                  },
                  "offset": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Боты"
        ],
        "summary": "Короткие ссылки и переходы",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/webapp/list": {
      "post": {
        "tags": [
          "Календарь"
        ],
        "summary": "Мини-приложения аккаунта",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Календарь"
        ],
        "summary": "Мини-приложения аккаунта",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/lead/list": {
      "post": {
        "tags": [
          "Боты"
        ],
        "summary": "Заявки с виджетов и бот-лендингов",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "answered": {
                    "type": "string",
                    "description": "обработанные или нет"
                  },
                  "from": {
                    "type": "string",
                    "description": ""
                  },
                  "to": {
                    "type": "string",
                    "description": ""
                  },
                  "limit": {
                    "type": "string",
                    "description": ""
                  },
                  "offset": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [], \"total\": 0 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Боты"
        ],
        "summary": "Заявки с виджетов и бот-лендингов",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "answered",
            "in": "query",
            "required": false,
            "description": "обработанные или нет",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [], \"total\": 0 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/key/scopes": {
      "post": {
        "tags": [
          "Ключи и события"
        ],
        "summary": "Список всех прав",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Ключи и события"
        ],
        "summary": "Список всех прав",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/key/list": {
      "post": {
        "tags": [
          "Ключи и события"
        ],
        "summary": "Ключи аккаунта",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Ключи и события"
        ],
        "summary": "Ключи аккаунта",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/key/create": {
      "post": {
        "tags": [
          "Ключи и события"
        ],
        "summary": "Создать ключ с правами",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": ""
                  },
                  "scopes": {
                    "type": "string",
                    "description": "массив прав; пусто — полный доступ"
                  },
                  "bots": {
                    "type": "string",
                    "description": "массив BotID"
                  },
                  "days": {
                    "type": "string",
                    "description": "срок жизни"
                  },
                  "rate": {
                    "type": "string",
                    "description": "своя частота запросов"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"key\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/key/edit": {
      "post": {
        "tags": [
          "Ключи и события"
        ],
        "summary": "Изменить ключ",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": ""
                  },
                  "name": {
                    "type": "string",
                    "description": ""
                  },
                  "scopes": {
                    "type": "string",
                    "description": ""
                  },
                  "bots": {
                    "type": "string",
                    "description": ""
                  },
                  "active": {
                    "type": "string",
                    "description": ""
                  },
                  "days": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"key\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/key/revoke": {
      "post": {
        "tags": [
          "Ключи и события"
        ],
        "summary": "Отозвать ключ",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"ok\": true }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/hook/events": {
      "post": {
        "tags": [
          "Ключи и события"
        ],
        "summary": "Список событий",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Ключи и события"
        ],
        "summary": "Список событий",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/hook/list": {
      "post": {
        "tags": [
          "Ключи и события"
        ],
        "summary": "Подписки на события",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Ключи и события"
        ],
        "summary": "Подписки на события",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/hook/log": {
      "post": {
        "tags": [
          "Ключи и события"
        ],
        "summary": "Журнал доставок",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "одна подписка"
                  },
                  "event": {
                    "type": "string",
                    "description": ""
                  },
                  "failed": {
                    "type": "string",
                    "description": "только неудачные"
                  },
                  "limit": {
                    "type": "string",
                    "description": ""
                  },
                  "offset": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Ключи и события"
        ],
        "summary": "Журнал доставок",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "одна подписка",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "event",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "failed",
            "in": "query",
            "required": false,
            "description": "только неудачные",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"items\": [] }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/hook/create": {
      "post": {
        "tags": [
          "Ключи и события"
        ],
        "summary": "Подписаться на события",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "куда слать"
                  },
                  "events": {
                    "type": "string",
                    "description": "массив событий; пусто — все"
                  },
                  "name": {
                    "type": "string",
                    "description": ""
                  },
                  "bots": {
                    "type": "string",
                    "description": ""
                  },
                  "secret": {
                    "type": "string",
                    "description": "свой секрет подписи"
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"hook\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/hook/edit": {
      "post": {
        "tags": [
          "Ключи и события"
        ],
        "summary": "Изменить подписку",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": ""
                  },
                  "url": {
                    "type": "string",
                    "description": ""
                  },
                  "events": {
                    "type": "string",
                    "description": ""
                  },
                  "active": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"hook\": {…} }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/hook/delete": {
      "post": {
        "tags": [
          "Ключи и события"
        ],
        "summary": "Удалить подписку",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"ok\": true }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/hook/test": {
      "post": {
        "tags": [
          "Ключи и события"
        ],
        "summary": "Пробная доставка",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"ok\": true, \"status\": 200 }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/catalog/get": {
      "post": {
        "tags": [
          "Каталог товаров"
        ],
        "summary": "Ссылка на каталог",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "webappid": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "webappid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { \"link\": \"…\" }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Каталог товаров"
        ],
        "summary": "Ссылка на каталог",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "webappid",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: { \"link\": \"…\" }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/catalog/item/create": {
      "post": {
        "tags": [
          "Каталог товаров"
        ],
        "summary": "Создать товар",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/catalog/item/edit": {
      "post": {
        "tags": [
          "Каталог товаров"
        ],
        "summary": "Изменить товар",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/catalog/item/delete": {
      "post": {
        "tags": [
          "Каталог товаров"
        ],
        "summary": "Удалить товар",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/catalog/item/bulk/create": {
      "post": {
        "tags": [
          "Каталог товаров"
        ],
        "summary": "Создать товары массово",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/catalog/item/bulk/edit": {
      "post": {
        "tags": [
          "Каталог товаров"
        ],
        "summary": "Изменить товары массово",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/catalog/item/bulk/delete": {
      "post": {
        "tags": [
          "Каталог товаров"
        ],
        "summary": "Удалить товары массово",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/catalog/items/delete": {
      "post": {
        "tags": [
          "Каталог товаров"
        ],
        "summary": "Удалить все товары",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/gcalendar/sync": {
      "post": {
        "tags": [
          "Календарь"
        ],
        "summary": "Синхронизация с Google Календарём",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Календарь"
        ],
        "summary": "Синхронизация с Google Календарём",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/calendar/add": {
      "post": {
        "tags": [
          "Календарь"
        ],
        "summary": "Добавить приложение-календарь",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/calendar/edit": {
      "post": {
        "tags": [
          "Календарь"
        ],
        "summary": "Изменить приложение-календарь",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/calendar/event/add": {
      "post": {
        "tags": [
          "Календарь"
        ],
        "summary": "Записать клиента",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Календарь"
        ],
        "summary": "Записать клиента",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/calendar/check/busy": {
      "post": {
        "tags": [
          "Календарь"
        ],
        "summary": "Проверить занятость времени",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Календарь"
        ],
        "summary": "Проверить занятость времени",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/calendar/schedule/get": {
      "post": {
        "tags": [
          "Календарь"
        ],
        "summary": "Записи календаря",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Календарь"
        ],
        "summary": "Записи календаря",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/calendar/schedule/delete": {
      "post": {
        "tags": [
          "Календарь"
        ],
        "summary": "Удалить запись",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Календарь"
        ],
        "summary": "Удалить запись",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/webapp/delete": {
      "post": {
        "tags": [
          "Календарь"
        ],
        "summary": "Удалить мини-приложение",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Календарь"
        ],
        "summary": "Удалить мини-приложение",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/webapp/calendar/schedule/get": {
      "post": {
        "tags": [
          "Календарь"
        ],
        "summary": "Записи календаря (прежний адрес)",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Календарь"
        ],
        "summary": "Записи календаря (прежний адрес)",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/webapp/calendar/schedule/delete": {
      "post": {
        "tags": [
          "Календарь"
        ],
        "summary": "Удалить запись (прежний адрес)",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Календарь"
        ],
        "summary": "Удалить запись (прежний адрес)",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/proxy": {
      "post": {
        "tags": [
          "Прочее"
        ],
        "summary": "Запрос через зарубежный сервер",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "_url": {
                    "type": "string",
                    "description": "адрес запроса"
                  },
                  "_method": {
                    "type": "string",
                    "description": "GET или POST"
                  }
                },
                "required": [
                  "_url"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: ответ целевого сервиса"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Прочее"
        ],
        "summary": "Запрос через зарубежный сервер",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "_url",
            "in": "query",
            "required": true,
            "description": "адрес запроса",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "_method",
            "in": "query",
            "required": false,
            "description": "GET или POST",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ответ: ответ целевого сервиса"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    },
    "/get": {
      "post": {
        "tags": [
          "Прочее"
        ],
        "summary": "Проверка ключа",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      },
      "get": {
        "tags": [
          "Прочее"
        ],
        "summary": "Проверка ключа",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Ответ: { … }"
          },
          "401": {
            "description": "Ключ не передан или не найден"
          },
          "403": {
            "description": "У ключа нет нужного права"
          },
          "422": {
            "description": "Ошибка в параметре"
          },
          "429": {
            "description": "Слишком часто"
          }
        }
      }
    }
  }
}