{
  "openapi": "3.1.1",
  "info": {
    "title": "Звукотекст API",
    "version": "1.0.0-preview.1",
    "description": "Справочник методов Звукотекста. Доступ к операциям API входит в действующие тарифы «Премиум», «Компания» и «Индивидуальный»."
  },
  "servers": [
    {
      "url": "/api/v1"
    }
  ],
  "paths": {
    "/uploads": {
      "post": {
        "operationId": "createUpload",
        "summary": "Создать сессию загрузки",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "uploads:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUpload"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Успешно.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Upload"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "410": {
            "$ref": "#/components/responses/410"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "415": {
            "$ref": "#/components/responses/415"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        },
        "description": "Создаёт долговечную сессию. Если хранилище ещё открывает загрузку, запрос URL частей принимает повтор после Retry-After."
      }
    },
    "/uploads/{uploadId}": {
      "get": {
        "operationId": "getUpload",
        "summary": "Узнать состояние загрузки",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "uploads:write",
        "parameters": [
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "description": "Загрузка",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешно.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Upload"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "410": {
            "$ref": "#/components/responses/410"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        }
      },
      "delete": {
        "operationId": "cancelUpload",
        "summary": "Отменить незавершённую загрузку",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "uploads:write",
        "parameters": [
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "description": "Загрузка",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Успешно."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "410": {
            "$ref": "#/components/responses/410"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        }
      }
    },
    "/uploads/{uploadId}/parts": {
      "post": {
        "operationId": "signUploadParts",
        "summary": "Получить разрешения на загрузку частей",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "uploads:write",
        "description": "Возвращает временные разрешения для частей. Повтор запроса выдаёт новые разрешения для тех же частей и не создаёт задание.",
        "parameters": [
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "description": "Загрузка",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "part_numbers": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 10000
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true
                  }
                },
                "required": [
                  "part_numbers"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успешно.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadParts"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "410": {
            "$ref": "#/components/responses/410"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "415": {
            "$ref": "#/components/responses/415"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        }
      }
    },
    "/uploads/{uploadId}/complete": {
      "post": {
        "operationId": "completeUpload",
        "summary": "Завершить передачу частей",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "uploads:write",
        "parameters": [
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "description": "Загрузка",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "parts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "number": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "etag": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "required": [
                        "number",
                        "etag"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 10000
                  }
                },
                "required": [
                  "parts"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Команда принята. Итоговое состояние доступно отдельным запросом.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Upload"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "410": {
            "$ref": "#/components/responses/410"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "415": {
            "$ref": "#/components/responses/415"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        },
        "description": "Принимает перечень частей на асинхронную проверку. После 202 опрашивайте состояние загрузки до ready или failed."
      }
    },
    "/recordings": {
      "post": {
        "operationId": "createRecording",
        "summary": "Поставить запись на расшифровку",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "recordings:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRecording"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Команда принята. Итоговое состояние доступно отдельным запросом.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Recording"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "402": {
            "$ref": "#/components/responses/402"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "410": {
            "$ref": "#/components/responses/410"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "415": {
            "$ref": "#/components/responses/415"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        },
        "description": "Принимает подтверждённую загрузку в общую очередь. Нехватка минут может определиться асинхронно и тогда возвращается в статусе записи."
      },
      "get": {
        "operationId": "listRecordings",
        "summary": "Перечислить доступные записи",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "recordings:read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Непрозрачный указатель из предыдущей страницы.",
            "schema": {
              "type": "string",
              "maxLength": 1024
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешно.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Recording"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "next_cursor"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        }
      }
    },
    "/recordings/{recordingId}": {
      "get": {
        "operationId": "getRecording",
        "summary": "Получить состояние записи",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "recordings:read",
        "parameters": [
          {
            "name": "recordingId",
            "in": "path",
            "required": true,
            "description": "Запись",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешно.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Recording"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        }
      }
    },
    "/recordings/{recordingId}/transcript": {
      "get": {
        "operationId": "getTranscript",
        "summary": "Получить текст с репликами и тайм-кодами",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "recordings:read",
        "parameters": [
          {
            "name": "recordingId",
            "in": "path",
            "required": true,
            "description": "Запись",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Непрозрачный указатель из предыдущей страницы.",
            "schema": {
              "type": "string",
              "maxLength": 1024
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешно.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transcript"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        }
      }
    },
    "/recordings/{recordingId}/summary": {
      "get": {
        "operationId": "getSummary",
        "summary": "Получить состояние и содержимое пересказа",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "recordings:read",
        "parameters": [
          {
            "name": "recordingId",
            "in": "path",
            "required": true,
            "description": "Запись",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешно.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Summary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        }
      }
    },
    "/recordings/{recordingId}/summary/export": {
      "get": {
        "operationId": "exportSummary",
        "summary": "Скачать краткий пересказ в TXT",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "recordings:read",
        "parameters": [
          {
            "name": "recordingId",
            "in": "path",
            "required": true,
            "description": "Запись",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Сохранённый пересказ в UTF-8.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        }
      }
    },
    "/recordings/{recordingId}/export/{format}": {
      "get": {
        "operationId": "exportTranscript",
        "summary": "Скачать расшифровку",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "recordings:read",
        "parameters": [
          {
            "name": "recordingId",
            "in": "path",
            "required": true,
            "description": "Запись",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "format",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "txt",
                "srt",
                "docx",
                "pdf"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Файл в запрошенном формате.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        }
      }
    },
    "/recordings/{recordingId}/documents": {
      "post": {
        "operationId": "createDocument",
        "summary": "Заказать документ по форме",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "documents:write",
        "parameters": [
          {
            "name": "recordingId",
            "in": "path",
            "required": true,
            "description": "Запись",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "template": {
                    "$ref": "#/components/schemas/Template"
                  }
                },
                "required": [
                  "template"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Команда принята. Итоговое состояние доступно отдельным запросом.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "402": {
            "$ref": "#/components/responses/402"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "415": {
            "$ref": "#/components/responses/415"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        },
        "description": "Повтор возвращает тот же документ. Готовую форму и текущий запрос по тому же шаблону можно переиспользовать. Успешная генерация расходует общий дневной лимит кабинета."
      },
      "get": {
        "operationId": "listDocuments",
        "summary": "Перечислить документы записи",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "recordings:read",
        "parameters": [
          {
            "name": "recordingId",
            "in": "path",
            "required": true,
            "description": "Запись",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Непрозрачный указатель из предыдущей страницы.",
            "schema": {
              "type": "string",
              "maxLength": 1024
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешно.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Document"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "next_cursor"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        }
      }
    },
    "/recordings/{recordingId}/documents/{documentId}": {
      "get": {
        "operationId": "getDocument",
        "summary": "Получить состояние и текст документа",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "recordings:read",
        "parameters": [
          {
            "name": "recordingId",
            "in": "path",
            "required": true,
            "description": "Запись",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "description": "Документ",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешно.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        }
      }
    },
    "/recordings/{recordingId}/documents/{documentId}/export/{format}": {
      "get": {
        "operationId": "exportDocument",
        "summary": "Скачать документ",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "recordings:read",
        "parameters": [
          {
            "name": "recordingId",
            "in": "path",
            "required": true,
            "description": "Запись",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "description": "Документ",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "format",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "txt",
                "docx",
                "pdf"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Файл в запрошенном формате.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        }
      }
    },
    "/meetings": {
      "post": {
        "operationId": "createMeeting",
        "summary": "Записать встречу сразу или по расписанию",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "meetings:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMeeting"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Команда принята. Итоговое состояние доступно отдельным запросом.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Meeting"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "415": {
            "$ref": "#/components/responses/415"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        },
        "description": "Запускает обычного бота в личной или командной области ключа. По API перечисляются встречи, поставленные через API."
      },
      "get": {
        "operationId": "listMeetings",
        "summary": "Перечислить доступные встречи",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "meetings:read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Непрозрачный указатель из предыдущей страницы.",
            "schema": {
              "type": "string",
              "maxLength": 1024
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешно.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Meeting"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "next_cursor"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        }
      }
    },
    "/meetings/{meetingId}": {
      "get": {
        "operationId": "getMeeting",
        "summary": "Проверить состояние встречи",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "meetings:read",
        "parameters": [
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "description": "Встреча",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешно.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Meeting"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        }
      }
    },
    "/meetings/{meetingId}/cancel": {
      "post": {
        "operationId": "cancelMeeting",
        "summary": "Отменить запланированную встречу",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "meetings:write",
        "parameters": [
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "description": "Встреча",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Успешно.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Meeting"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        },
        "description": "Отменяет встречу до назначения бота. Повтор возвращает текущее состояние отменённой встречи."
      }
    },
    "/webhooks": {
      "post": {
        "operationId": "createWebhook",
        "summary": "Создать подписку на уведомления",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "webhooks:manage",
        "responses": {
          "201": {
            "description": "Операция выполнена.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscription"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "415": {
            "$ref": "#/components/responses/415"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "endpoint": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2048
                  },
                  "event_types": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "recording.ready",
                        "recording.failed",
                        "recording.canceled",
                        "summary.ready",
                        "summary.failed",
                        "document.ready",
                        "document.failed",
                        "meeting.ready",
                        "meeting.failed",
                        "meeting.canceled"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 10,
                    "uniqueItems": true
                  }
                },
                "required": [
                  "endpoint",
                  "event_types"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listWebhooks",
        "summary": "Показать активные подписки",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "webhooks:manage",
        "responses": {
          "200": {
            "description": "Операция выполнена.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookSubscription"
                      }
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        }
      }
    },
    "/webhooks/{subscriptionId}": {
      "delete": {
        "operationId": "disableWebhook",
        "summary": "Отключить подписку",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "webhooks:manage",
        "responses": {
          "204": {
            "description": "Операция выполнена."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        },
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/webhooks/{subscriptionId}/deliveries": {
      "get": {
        "operationId": "webhookDeliveries",
        "summary": "Показать историю доставки",
        "security": [
          {
            "integrationKey": []
          }
        ],
        "x-zt-permission": "webhooks:manage",
        "responses": {
          "200": {
            "description": "Операция выполнена.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookDelivery"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "next_cursor"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        },
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Непрозрачный указатель из предыдущей страницы.",
            "schema": {
              "type": "string",
              "maxLength": 1024
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ]
      }
    }
  },
  "webhooks": {
    "resourceEvent": {
      "post": {
        "operationId": "receiveResourceEvent",
        "summary": "Событие о состоянии записи, встречи или документа",
        "parameters": [
          {
            "name": "X-ZT-Timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Время подписания доставки, секунды Unix."
          },
          {
            "name": "X-ZT-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^v1=[a-f0-9]{64}$"
            },
            "description": "HMAC-SHA256 от ASCII-представления timestamp, точки и исходных байтов тела."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Получатель подтвердил приём события."
          },
          "default": {
            "description": "Получатель не подтвердил приём. Политика повторов зависит от ответа."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "integrationKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Личный ключ «Премиума» или ключ команды на тарифе «Компания» либо «Индивидуальный». Ключ привязан к области записей и источнику минут. Выдача, отзыв и настройка подписок выполняются в кабинете."
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 16,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "description": "Уникальный ключ в пределах кабинета, операции и целевого ресурса. Повтор той же команды возвращает ранее созданный ресурс или прежний результат. Повтор с другими параметрами возвращает 409. Доступ проверяется и при повторе."
      }
    },
    "responses": {
      "400": {
        "description": "Некорректные параметры.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "401": {
        "description": "Ключ отсутствует, истёк или отозван.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "402": {
        "description": "Не хватает доступного объёма обработки.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "403": {
        "description": "Операция недоступна на тарифе или для данного ключа.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "404": {
        "description": "Ресурс отсутствует или находится вне области доступа.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "409": {
        "description": "Конфликт команды, состояния или ключа повтора.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "410": {
        "description": "Сессия загрузки истекла.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "413": {
        "description": "Превышен разрешённый размер.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "415": {
        "description": "Тип файла не поддерживается.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "422": {
        "description": "Данные не прошли предметную проверку.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "429": {
        "description": "Временный предел частоты или числа заданий.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Рекомендуемая пауза в секундах."
          }
        }
      },
      "503": {
        "description": "Временная недоступность. Повторите безопасную команду с тем же ключом.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Рекомендуемая пауза в секундах."
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message",
          "request_id"
        ]
      },
      "OperationFailure": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "CreateUpload": {
        "type": "object",
        "properties": {
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "content_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 127
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 1
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "filename",
          "content_type",
          "size_bytes",
          "sha256"
        ],
        "additionalProperties": false
      },
      "Upload": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "type": "string",
            "enum": [
              "uploading",
              "verifying",
              "ready",
              "failed",
              "canceled",
              "expired",
              "consumed"
            ]
          },
          "part_size_bytes": {
            "type": "integer",
            "minimum": 1
          },
          "part_count": {
            "type": "integer",
            "minimum": 1
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "error": {
            "$ref": "#/components/schemas/OperationFailure"
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "state",
          "part_size_bytes",
          "part_count",
          "expires_at"
        ]
      },
      "UploadParts": {
        "type": "object",
        "properties": {
          "parts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "number": {
                  "type": "integer",
                  "minimum": 1
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "expires_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "headers": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "number",
                "url",
                "expires_at",
                "headers"
              ]
            }
          }
        },
        "required": [
          "parts"
        ]
      },
      "CreateRecording": {
        "type": "object",
        "properties": {
          "upload_id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "language": {
            "type": "string",
            "minLength": 2,
            "maxLength": 20
          },
          "speakers": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          },
          "summary": {
            "type": "boolean"
          }
        },
        "required": [
          "upload_id"
        ],
        "additionalProperties": false
      },
      "Recording": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "title": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "ready",
              "failed",
              "canceled"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "web",
              "api",
              "crm",
              "meeting",
              "max",
              "disk"
            ]
          },
          "duration_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "error": {
            "$ref": "#/components/schemas/OperationFailure"
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "title",
          "state",
          "source"
        ]
      },
      "Transcript": {
        "type": "object",
        "properties": {
          "recording_id": {
            "type": "string",
            "format": "uuid"
          },
          "segments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "minimum": 0
                },
                "start_ms": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "description": "Для архивного текста без этой метки возвращается null."
                },
                "end_ms": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "description": "Для архивного текста без этой метки возвращается null."
                },
                "speaker": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "text": {
                  "type": "string"
                }
              },
              "required": [
                "index",
                "start_ms",
                "end_ms",
                "speaker",
                "text"
              ]
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "recording_id",
          "segments",
          "next_cursor"
        ]
      },
      "Summary": {
        "type": "object",
        "properties": {
          "recording_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "off",
              "pending",
              "ready",
              "failed"
            ]
          },
          "text": {
            "type": "string"
          },
          "error": {
            "$ref": "#/components/schemas/OperationFailure"
          }
        },
        "required": [
          "recording_id",
          "state"
        ]
      },
      "Template": {
        "type": "string",
        "enum": [
          "protocol",
          "lecture",
          "interview",
          "sales",
          "post"
        ]
      },
      "Document": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "recording_id": {
            "type": "string",
            "format": "uuid"
          },
          "template": {
            "$ref": "#/components/schemas/Template"
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "ready",
              "failed"
            ]
          },
          "text": {
            "type": "string"
          },
          "error": {
            "$ref": "#/components/schemas/OperationFailure"
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "recording_id",
          "template",
          "state"
        ]
      },
      "CreateMeeting": {
        "type": "object",
        "properties": {
          "join_url": {
            "type": "string",
            "format": "uri"
          },
          "starts_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "RFC 3339 с часовым поясом. Пустое значение запускает бота при наличии места, указанное время допускается на 90 дней вперёд."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "language": {
            "type": "string",
            "description": "Код из списка языков кабинета, включая auto. По умолчанию ru."
          },
          "speakers": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10,
            "description": "Ноль включает автоматическое определение."
          }
        },
        "required": [
          "join_url"
        ],
        "additionalProperties": false
      },
      "Meeting": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "type": "string",
            "enum": [
              "scheduled",
              "joining",
              "waiting",
              "recording",
              "processing",
              "ready",
              "failed",
              "canceled"
            ]
          },
          "starts_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "recording_id": {
            "type": "string",
            "format": "uuid"
          },
          "error": {
            "$ref": "#/components/schemas/OperationFailure"
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "state",
          "starts_at"
        ]
      },
      "WebhookEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "recording.ready",
              "recording.failed",
              "recording.canceled",
              "summary.ready",
              "summary.failed",
              "document.ready",
              "document.failed",
              "meeting.ready",
              "meeting.failed",
              "meeting.canceled"
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "resource_id": {
            "type": "string",
            "format": "uuid"
          },
          "recording_id": {
            "type": "string",
            "format": "uuid",
            "description": "Связанная запись для событий встреч и документов, если она существует."
          }
        },
        "required": [
          "id",
          "type",
          "occurred_at",
          "resource_id"
        ]
      },
      "WebhookSubscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "host": {
            "type": "string"
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "recording.ready",
                "recording.failed",
                "recording.canceled",
                "summary.ready",
                "summary.failed",
                "document.ready",
                "document.failed",
                "meeting.ready",
                "meeting.failed",
                "meeting.canceled"
              ]
            }
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "disabled"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "signing_secret": {
            "type": "string",
            "description": "Выдаётся один раз при первом успешном создании."
          }
        },
        "required": [
          "id",
          "host",
          "event_types",
          "state",
          "created_at"
        ]
      },
      "WebhookDelivery": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "event_type": {
            "type": "string",
            "enum": [
              "recording.ready",
              "recording.failed",
              "recording.canceled",
              "summary.ready",
              "summary.failed",
              "document.ready",
              "document.failed",
              "meeting.ready",
              "meeting.failed",
              "meeting.canceled"
            ]
          },
          "resource_id": {
            "type": "string",
            "format": "uuid"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "sending",
              "delivered",
              "failed",
              "canceled"
            ]
          },
          "attempts": {
            "type": "integer",
            "minimum": 0
          },
          "last_attempt_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "http_status": {
            "type": [
              "integer",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "event_id",
          "event_type",
          "resource_id",
          "occurred_at",
          "state",
          "attempts",
          "last_attempt_at",
          "http_status",
          "error"
        ]
      }
    }
  }
}
