{
  "openapi": "3.1.0",
  "info": {
    "title": "Senden API",
    "version": "0.3.3",
    "description": "Самостоятельный API обычных аккаунтов WhatsApp, Telegram и MAX. Каждому пользователю принадлежит отдельное рабочее пространство. API-ключи имеют права read/write, срок действия и отзыв. Контракты и токены сторонних сервисов не используются."
  },
  "servers": [
    {
      "url": "https://api-senden.ru"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Именованный ключ рабочего пространства с правами read/write. Не управляет профилем и административным кабинетом."
      },
      "dashboardSession": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-senden_session",
        "description": "Сессия кабинета после входа. Публичный HTTPS использует Secure HttpOnly cookie; локальное HTTP имя — senden_session. API-ключ не принимается на этих маршрутах."
      }
    }
  },
  "paths": {
    "/api/v1/health": {
      "get": {
        "summary": "Проверка процесса",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/v1/status": {
      "get": {
        "summary": "Подключения и состояния",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/instances": {
      "post": {
        "summary": "Создать подключение",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "messenger"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "messenger": {
                    "enum": [
                      "whatsapp",
                      "telegram",
                      "max"
                    ]
                  }
                }
              },
              "example": {
                "name": "MAX - рабочий аккаунт",
                "messenger": "max"
              }
            }
          }
        }
      },
      "get": {
        "summary": "Получить активные или архивные подключения",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "archived",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ],
              "default": "0"
            },
            "description": "1 — метаданные архивных подключений."
          }
        ]
      }
    },
    "/api/v1/instances/{id}": {
      "delete": {
        "summary": "Остановить и архивировать подключение с сохранением истории и сессии",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "summary": "Изменить название подключения",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                }
              },
              "example": {
                "name": "Основной аккаунт"
              }
            }
          }
        }
      },
      "get": {
        "summary": "Состояние подключения",
        "tags": [
          "Подключения"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-supported-messengers": [
          "whatsapp",
          "telegram",
          "max"
        ],
        "x-requires-connection": false,
        "x-api-key-scope": "read"
      }
    },
    "/api/v1/instances/{id}/restore": {
      "post": {
        "summary": "Восстановить из архива в пределах лимитов, без автоматического подключения",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/instances/{id}/connect": {
      "post": {
        "summary": "Начать вход",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "mode"
                ],
                "properties": {
                  "mode": {
                    "enum": [
                      "qr",
                      "phone"
                    ]
                  },
                  "phone": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "mode": "qr"
              }
            }
          }
        }
      }
    },
    "/api/v1/instances/{id}/auth": {
      "post": {
        "summary": "Продолжить текущий шаг входа",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "code": "CODE_FROM_MESSENGER"
              }
            }
          }
        }
      }
    },
    "/api/v1/instances/{id}/stop": {
      "post": {
        "summary": "Остановить с сохранением сессии",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/v1/instances/{id}/logout": {
      "post": {
        "summary": "Запросить выход",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/v1/instances/{id}/chats": {
      "get": {
        "summary": "Получить чаты",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v1/instances/{id}/messages": {
      "get": {
        "summary": "Сохранённая история сообщений",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chatId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 200
            }
          }
        ]
      },
      "post": {
        "summary": "Поставить текст или файл в очередь",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "202": {
            "description": "Принято в локальную очередь; доставка ещё не подтверждена"
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "to"
                ],
                "properties": {
                  "to": {
                    "type": "string"
                  },
                  "text": {
                    "type": "string",
                    "maxLength": 16000
                  },
                  "fileId": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              "example": {
                "to": "CHAT_ID",
                "text": "Сообщение из вашей системы"
              }
            }
          }
        }
      }
    },
    "/api/v1/instances/{id}/messages/from-url": {
      "post": {
        "summary": "Безопасно загрузить HTTPS-файл и поставить документ в очередь",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "to",
                  "urlFile",
                  "fileName"
                ],
                "properties": {
                  "to": {
                    "type": "string"
                  },
                  "urlFile": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2048
                  },
                  "fileName": {
                    "type": "string",
                    "maxLength": 180
                  },
                  "caption": {
                    "type": "string",
                    "maxLength": 16000
                  }
                }
              },
              "example": {
                "to": "CHAT_ID",
                "urlFile": "https://your-project.example/document.pdf",
                "fileName": "document.pdf",
                "caption": "Документ"
              }
            }
          }
        }
      }
    },
    "/api/v1/instances/{id}/settings": {
      "get": {
        "summary": "Настройки подключения и событий",
        "tags": [
          "Подключения"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-supported-messengers": [
          "whatsapp",
          "telegram",
          "max"
        ],
        "x-requires-connection": false,
        "x-api-key-scope": "read"
      },
      "put": {
        "summary": "Изменить настройки",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sendDelayMs": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 600000,
                    "default": 1000
                  },
                  "notificationFilters": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "webhookEnabled": {
                    "type": "boolean"
                  },
                  "webhookUrl": {
                    "type": "string"
                  },
                  "webhookSecret": {
                    "type": "string",
                    "writeOnly": true,
                    "maxLength": 256
                  },
                  "retry": {
                    "type": "object",
                    "properties": {
                      "maxAttempts": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 12
                      },
                      "baseDelaySeconds": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 3600
                      },
                      "maxDelaySeconds": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 86400
                      },
                      "timeoutSeconds": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 30
                      }
                    }
                  }
                }
              },
              "example": {
                "sendDelayMs": 1000,
                "notificationFilters": [
                  "message",
                  "status"
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/instances/{id}/queue": {
      "get": {
        "summary": "Постоянная очередь сообщений",
        "tags": [
          "Очередь"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-supported-messengers": [
          "whatsapp",
          "telegram",
          "max"
        ],
        "x-requires-connection": false,
        "x-api-key-scope": "read"
      }
    },
    "/api/v1/instances/{id}/queue/clear": {
      "post": {
        "summary": "Отменить все queued сообщения",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/v1/instances/{id}/queue/{messageId}/cancel": {
      "post": {
        "summary": "Отменить одно queued сообщение",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/v1/instances/{id}/queue/{messageId}/retry": {
      "post": {
        "summary": "Повторить только подтверждённую ошибку failed",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/v1/instances/{id}/notifications/stats": {
      "get": {
        "summary": "Число ожидающих и обработанных уведомлений",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v1/instances/{id}/notifications/receive": {
      "post": {
        "summary": "Получить уведомление с арендой и ожиданием",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Квитанция receiptId, body, leaseExpiresAt либо null при пустой очереди"
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "leaseSeconds": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 300,
                    "default": 30
                  },
                  "timeoutSeconds": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 60,
                    "default": 0
                  }
                }
              },
              "example": {
                "leaseSeconds": 30,
                "timeoutSeconds": 0
              }
            }
          }
        }
      }
    },
    "/api/v1/instances/{id}/notifications/{receiptId}": {
      "delete": {
        "summary": "Подтвердить обработку текущей квитанции",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "receiptId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v1/instances/{id}/deliveries": {
      "get": {
        "summary": "Результаты доставки webhook",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v1/instances/{id}/deliveries/stats": {
      "get": {
        "summary": "Счётчики заданий webhook",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v1/instances/{id}/deliveries/clear": {
      "post": {
        "summary": "Отменить ожидающие, повторяемые и dead-letter webhook",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/v1/instances/{id}/deliveries/{jobId}/attempts": {
      "get": {
        "summary": "Журнал попыток webhook",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/instances/{id}/deliveries/{jobId}/retry": {
      "post": {
        "summary": "Повторить webhook из dead-letter",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/v1/events": {
      "get": {
        "summary": "События с курсором",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stream": {
      "get": {
        "summary": "Поток событий SSE",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "События; запросы авторизации временные",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files": {
      "post": {
        "summary": "Загрузить файл до 20 МБ",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Filename",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-File-Mime",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/files/{fileId}": {
      "get": {
        "summary": "Скачать ранее загруженный локальный файл",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Документ",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Загруженный файл не найден",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v1/config": {
      "put": {
        "summary": "Настройки приложения и сетевых подключений",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/v1/methods": {
      "get": {
        "summary": "Каталог доступных операций",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/integrations/manifest": {
      "get": {
        "summary": "Подключения текущего пространства, команды и готовые файлы интеграции без ключей и данных авторизации",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/integrations/files/{name}": {
      "get": {
        "summary": "Скачать шаблон интеграции или общий ZIP без личных данных",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Готовый файл; Content-Disposition: attachment. В шаблонах нет действующих ключей или данных рабочего пространства.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Имя файла не входит в разрешённый список",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Имя из files в manifest, например starter.zip или llms.txt.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          }
        ]
      }
    },
    "/api/v1/account": {
      "get": {
        "summary": "Профиль пользователя и лимиты рабочего пространства",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "dashboardSession": []
          }
        ]
      }
    },
    "/api/v1/account/keys": {
      "get": {
        "summary": "Именованные API-ключи без секретных значений",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "dashboardSession": []
          }
        ]
      },
      "post": {
        "summary": "Создать ключ; секрет возвращается один раз",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "scopes"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "enum": [
                        "read",
                        "write"
                      ]
                    }
                  },
                  "expiresInDays": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 365
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {
            "dashboardSession": []
          }
        ],
        "parameters": [
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "description": "Точный origin кабинета; изменяющие запросы с cookie защищены от межсайтовых запросов.",
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ]
      }
    },
    "/api/v1/account/keys/{keyId}": {
      "delete": {
        "summary": "Отозвать API-ключ",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "description": "Точный origin кабинета; изменяющие запросы с cookie защищены от межсайтовых запросов.",
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "security": [
          {
            "dashboardSession": []
          }
        ]
      }
    },
    "/api/v1/account/sessions": {
      "get": {
        "summary": "Активные сессии текущего пользователя",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "dashboardSession": []
          }
        ]
      }
    },
    "/api/v1/account/sessions/{sessionId}": {
      "delete": {
        "summary": "Завершить сессию",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "description": "Точный origin кабинета; изменяющие запросы с cookie защищены от межсайтовых запросов.",
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "security": [
          {
            "dashboardSession": []
          }
        ]
      }
    },
    "/api/v1/admin/overview": {
      "get": {
        "summary": "Сводка администратора без содержимого переписки",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "dashboardSession": []
          }
        ],
        "x-required-roles": [
          "owner",
          "admin"
        ]
      }
    },
    "/api/v1/admin/mail-diagnostics": {
      "get": {
        "summary": "Диагностика публичного DNS первичного почтового узла; SPF, DKIM, DMARC и PTR. Кеш 60 секунд, без отправки письма",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "dashboardSession": []
          }
        ],
        "x-required-roles": [
          "owner",
          "admin"
        ]
      }
    },
    "/api/v1/admin/users": {
      "get": {
        "summary": "Список пользователей и лимитов",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "dashboardSession": []
          }
        ],
        "x-required-roles": [
          "owner",
          "admin"
        ]
      }
    },
    "/api/v1/admin/users/{userId}": {
      "patch": {
        "summary": "Изменить доступ и лимит пользователя",
        "tags": [
          "Senden API"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "description": "Точный origin кабинета; изменяющие запросы с cookie защищены от межсайтовых запросов.",
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "enum": [
                      "active",
                      "suspended"
                    ]
                  },
                  "instanceLimit": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 20
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {
            "dashboardSession": []
          }
        ],
        "x-required-roles": [
          "owner",
          "admin"
        ]
      }
    },
    "/api/v1/instances/{id}/operations/account.settings.get": {
      "post": {
        "summary": "Профиль подключённого аккаунта",
        "tags": [
          "Аккаунт"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "read"
      }
    },
    "/api/v1/instances/{id}/operations/contacts.list": {
      "post": {
        "summary": "Список контактов",
        "tags": [
          "Контакты"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "read"
      }
    },
    "/api/v1/instances/{id}/operations/contacts.get": {
      "post": {
        "summary": "Информация о контакте",
        "tags": [
          "Контакты"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "chatId"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}"
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "read"
      }
    },
    "/api/v1/instances/{id}/operations/contacts.lookup": {
      "post": {
        "summary": "Проверить наличие аккаунта по телефону или ID",
        "tags": [
          "Контакты"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "phoneNumber": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\+?[1-9]\\d{6,14}$"
                      },
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    ]
                  },
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "phoneNumber": "{{phoneNumber}}"
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "read"
      }
    },
    "/api/v1/instances/{id}/operations/contacts.create": {
      "post": {
        "summary": "Добавить контакт",
        "tags": [
          "Контакты"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "firstName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "lastName": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "phoneNumber": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\+?[1-9]\\d{6,14}$"
                      },
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    ]
                  }
                },
                "required": [
                  "chatId"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}",
                "firstName": "Имя",
                "phoneNumber": "{{phoneNumber}}"
              }
            }
          }
        },
        "x-supported-messengers": [
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/contacts.update": {
      "post": {
        "summary": "Изменить контакт",
        "tags": [
          "Контакты"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "firstName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "lastName": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "phoneNumber": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\+?[1-9]\\d{6,14}$"
                      },
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    ]
                  }
                },
                "required": [
                  "chatId",
                  "firstName"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}",
                "firstName": "Новое имя"
              }
            }
          }
        },
        "x-supported-messengers": [
          "telegram"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/contacts.delete": {
      "post": {
        "summary": "Удалить контакт",
        "tags": [
          "Контакты"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "chatId"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}"
              }
            }
          }
        },
        "x-supported-messengers": [
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/profile.avatar.get": {
      "post": {
        "summary": "Получить аватар",
        "tags": [
          "Аккаунт"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "chatId"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}"
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "read"
      }
    },
    "/api/v1/instances/{id}/operations/messages.history": {
      "post": {
        "summary": "Загрузить историю из мессенджера",
        "tags": [
          "Сообщения"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "count": {
                    "default": 50,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "idMessage": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "chatId"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}",
                "count": 50
              }
            }
          }
        },
        "x-supported-messengers": [
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "read"
      }
    },
    "/api/v1/instances/{id}/operations/messages.get": {
      "post": {
        "summary": "Получить сообщение из мессенджера",
        "tags": [
          "Сообщения"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "idMessage": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "chatId",
                  "idMessage"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}",
                "idMessage": "{{providerMessageId}}"
              }
            }
          }
        },
        "x-supported-messengers": [
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "read"
      }
    },
    "/api/v1/instances/{id}/operations/messages.read": {
      "post": {
        "summary": "Отметить сообщения прочитанными",
        "tags": [
          "Сообщения"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "idMessage": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "chatId"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}"
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/messages.delete": {
      "post": {
        "summary": "Удалить сообщение",
        "tags": [
          "Сообщения"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "idMessage": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "onlySenderDelete": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "chatId",
                  "idMessage"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}",
                "idMessage": "{{providerMessageId}}",
                "onlySenderDelete": false
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/messages.edit": {
      "post": {
        "summary": "Изменить текст сообщения",
        "tags": [
          "Сообщения"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "idMessage": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 16000
                  }
                },
                "required": [
                  "chatId",
                  "idMessage",
                  "message"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}",
                "idMessage": "{{providerMessageId}}",
                "message": "Новый текст"
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/messages.forward": {
      "post": {
        "summary": "Переслать выбранные сообщения",
        "tags": [
          "Сообщения"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "chatIdFrom": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "messages": {
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  }
                },
                "required": [
                  "chatId",
                  "chatIdFrom",
                  "messages"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}",
                "chatIdFrom": "{{chatId}}",
                "messages": [
                  "{{providerMessageId}}"
                ]
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/messages.react": {
      "post": {
        "summary": "Изменить реакцию на сообщение",
        "tags": [
          "Сообщения"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "idMessage": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "reaction": {
                    "type": "string",
                    "maxLength": 32
                  }
                },
                "required": [
                  "chatId",
                  "idMessage",
                  "reaction"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}",
                "idMessage": "{{providerMessageId}}",
                "reaction": "👍"
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/messages.contact": {
      "post": {
        "summary": "Отправить карточку контакта",
        "tags": [
          "Сообщения"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "contact": {
                    "type": "object",
                    "properties": {
                      "phoneContact": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^\\+?[1-9]\\d{6,14}$"
                          },
                          {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          }
                        ]
                      },
                      "firstName": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "middleName": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "lastName": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "company": {
                        "type": "string",
                        "maxLength": 100
                      }
                    },
                    "required": [
                      "phoneContact"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "chatId",
                  "contact"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}",
                "contact": {
                  "phoneContact": "{{phoneNumber}}",
                  "firstName": "Имя"
                }
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/messages.location": {
      "post": {
        "summary": "Отправить местоположение",
        "tags": [
          "Сообщения"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "latitude": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "longitude": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180
                  },
                  "nameLocation": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "address": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "chatId",
                  "latitude",
                  "longitude"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}",
                "latitude": 55.75,
                "longitude": 37.62
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/messages.poll": {
      "post": {
        "summary": "Отправить опрос",
        "tags": [
          "Сообщения"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "options": {
                    "minItems": 2,
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        {
                          "type": "object",
                          "properties": {
                            "optionName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            }
                          },
                          "required": [
                            "optionName"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "multipleAnswers": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "chatId",
                  "message",
                  "options"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}",
                "message": "Ваш выбор?",
                "options": [
                  "Первый",
                  "Второй"
                ]
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/chats.typing": {
      "post": {
        "summary": "Показать индикатор набора",
        "tags": [
          "Чаты"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "chatId"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}"
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/chats.archive": {
      "post": {
        "summary": "Архивировать чат",
        "tags": [
          "Чаты"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "chatId"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}"
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/chats.unarchive": {
      "post": {
        "summary": "Вернуть чат из архива",
        "tags": [
          "Чаты"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "chatId"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}"
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/chats.expiration": {
      "post": {
        "summary": "Настроить исчезающие сообщения",
        "tags": [
          "Чаты"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "ephemeralExpiration": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 31536000
                  }
                },
                "required": [
                  "chatId",
                  "ephemeralExpiration"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}",
                "ephemeralExpiration": 86400
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/chats.reactions": {
      "post": {
        "summary": "Получить доступные реакции",
        "tags": [
          "Чаты"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "chatId"
                ],
                "additionalProperties": false
              },
              "example": {
                "chatId": "{{chatId}}"
              }
            }
          }
        },
        "x-supported-messengers": [
          "telegram"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "read"
      }
    },
    "/api/v1/instances/{id}/operations/groups.get": {
      "post": {
        "summary": "Информация о группе",
        "tags": [
          "Группы"
        ],
        "responses": {
          "200": {
            "description": "Успешный результат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Конфликт состояния или идемпотентности",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Операция транспорта не выполнена",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "groupId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "groupId"
                ],
                "additionalProperties": false
              },
              "example": {
                "groupId": "{{groupId}}"
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "read"
      }
    },
    "/api/v1/instances/{id}/operations/groups.create": {
      "post": {
        "summary": "Создать группу",
        "tags": [
          "Группы"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "groupName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "chatIds": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  }
                },
                "required": [
                  "groupName",
                  "chatIds"
                ],
                "additionalProperties": false
              },
              "example": {
                "groupName": "Моя группа",
                "chatIds": [
                  "CHAT_ID"
                ]
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/groups.rename": {
      "post": {
        "summary": "Изменить название группы",
        "tags": [
          "Группы"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "groupId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "groupName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "required": [
                  "groupId",
                  "groupName"
                ],
                "additionalProperties": false
              },
              "example": {
                "groupId": "{{groupId}}",
                "groupName": "Новое название"
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/groups.members.add": {
      "post": {
        "summary": "Добавить участника",
        "tags": [
          "Группы"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "groupId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "participantChatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "groupId",
                  "participantChatId"
                ],
                "additionalProperties": false
              },
              "example": {
                "groupId": "{{groupId}}",
                "participantChatId": "{{participantChatId}}"
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/groups.members.remove": {
      "post": {
        "summary": "Удалить участника",
        "tags": [
          "Группы"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "groupId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "participantChatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "groupId",
                  "participantChatId"
                ],
                "additionalProperties": false
              },
              "example": {
                "groupId": "{{groupId}}",
                "participantChatId": "{{participantChatId}}"
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/groups.admins.add": {
      "post": {
        "summary": "Назначить администратора группы",
        "tags": [
          "Группы"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "groupId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "participantChatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "groupId",
                  "participantChatId"
                ],
                "additionalProperties": false
              },
              "example": {
                "groupId": "{{groupId}}",
                "participantChatId": "{{participantChatId}}"
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/groups.admins.remove": {
      "post": {
        "summary": "Снять администратора группы",
        "tags": [
          "Группы"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "groupId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "participantChatId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "groupId",
                  "participantChatId"
                ],
                "additionalProperties": false
              },
              "example": {
                "groupId": "{{groupId}}",
                "participantChatId": "{{participantChatId}}"
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/groups.leave": {
      "post": {
        "summary": "Покинуть группу",
        "tags": [
          "Группы"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "groupId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "groupId"
                ],
                "additionalProperties": false
              },
              "example": {
                "groupId": "{{groupId}}"
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp",
          "telegram",
          "max"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    },
    "/api/v1/instances/{id}/operations/groups.settings": {
      "post": {
        "summary": "Изменить одно разрешение группы",
        "tags": [
          "Группы"
        ],
        "responses": {
          "200": {
            "description": "Сохранённый результат {result,repeated}; repeated=true при повторе завершённого запроса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Войдите в кабинет или передайте именованный API-ключ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав ключа, роли или сессии кабинета",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Ключ уже занят другими параметрами, операция выполняется, результат неизвестен или подключение не готово",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "501": {
            "description": "Операция не поддерживается выбранным транспортом",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Исход нативной операции не подтверждён. Проверьте мессенджер; повтор с новым ключом может создать дубликат",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Обязательный ключ нативного изменения. Те же параметры возвращают сохранённый результат; неизвестный исход автоматически не повторяется.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "groupId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "announcement": {
                    "type": "boolean"
                  },
                  "restrict": {
                    "type": "boolean"
                  },
                  "allowParticipantsSendMessages": {
                    "type": "boolean"
                  },
                  "allowParticipantsEditGroupSettings": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "groupId"
                ],
                "additionalProperties": false
              },
              "example": {
                "groupId": "{{groupId}}",
                "announcement": true
              }
            }
          }
        },
        "x-supported-messengers": [
          "whatsapp"
        ],
        "x-requires-connection": true,
        "x-api-key-scope": "write"
      }
    }
  }
}
