{"components":{"parameters":{"HeaderIdempotencyKey":{"description":"Token-scoped mutation identity","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":256,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},"HeaderXRequestID":{"description":"Optional UUID request identifier","in":"header","name":"X-Request-ID","required":false,"schema":{"format":"uuid","type":"string"}},"PathActionPlanId":{"description":"Идентификатор действия","in":"path","name":"action_plan_id","required":true,"schema":{"format":"uuid","type":"string"}},"PathTaskId":{"description":"Идентификатор задачи Агента","in":"path","name":"task_id","required":true,"schema":{"format":"uuid","type":"string"}},"QueryAvailable":{"description":"Ресурс доступен","in":"query","name":"available","required":false,"schema":{"type":"boolean"}},"QueryCategoryIds":{"description":"Идентификаторы категорий","in":"query","name":"category_ids","required":false,"schema":{"items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true}},"QueryChatIds":{"description":"Идентификаторы чатов","in":"query","name":"chat_ids","required":false,"schema":{"items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true}},"QueryContactIds":{"description":"Идентификаторы контактов","in":"query","name":"contact_ids","required":false,"schema":{"items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true}},"QueryCursor":{"description":"Непрозрачный курсор следующей страницы","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},"QueryFrom":{"description":"Начало периода включительно","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},"QueryIds":{"description":"Идентификаторы ресурсов для отбора","in":"query","name":"ids","required":false,"schema":{"items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true}},"QueryPageSize":{"description":"Размер страницы; значение 0 использует значение по умолчанию","in":"query","name":"page_size","required":false,"schema":{"default":50,"maximum":200,"minimum":0,"type":"integer"}},"QueryPlatforms":{"description":"Мессенджеры","in":"query","name":"platforms","required":false,"schema":{"items":{"enum":["telegram","discord","whatsapp","max"],"type":"string"},"type":"array","uniqueItems":true}},"QueryResultLimit":{"description":"Общий предел результатов; значение 0 использует значение по умолчанию","in":"query","name":"result_limit","required":false,"schema":{"default":500,"maximum":500,"minimum":0,"type":"integer"}},"QuerySectionIds":{"description":"Идентификаторы разделов","in":"query","name":"section_ids","required":false,"schema":{"items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true}},"QuerySourceIds":{"description":"Идентификаторы источников","in":"query","name":"source_ids","required":false,"schema":{"items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true}},"QueryUngrouped":{"description":"Отбор ресурсов без соответствующих связей","in":"query","name":"ungrouped","required":false,"schema":{"type":"boolean"}},"QueryUntil":{"description":"Конец периода исключительно","in":"query","name":"until","required":false,"schema":{"format":"date-time","type":"string"}}},"responses":{"BadRequest":{"content":{"application/problem+json":{"example":{"code":"invalid_request","detail":"Проверьте параметры запроса и ошибки полей","request_id":"123e4567-e89b-42d3-a456-426614174000","retryable":false,"status":400,"title":"Bad Request","type":"about:blank"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Проверьте параметры запроса и ошибки полей"},"Conflict":{"content":{"application/problem+json":{"example":{"code":"state_conflict","detail":"Состояние ресурса, ревизия или ключ идемпотентности конфликтуют с запросом","request_id":"123e4567-e89b-42d3-a456-426614174000","retryable":false,"status":409,"title":"Conflict","type":"about:blank"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Состояние ресурса, ревизия или ключ идемпотентности конфликтуют с запросом"},"Forbidden":{"content":{"application/problem+json":{"example":{"code":"access_denied","detail":"Недостаточно прав для выполнения операции","request_id":"123e4567-e89b-42d3-a456-426614174000","retryable":false,"status":403,"title":"Forbidden","type":"about:blank"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Недостаточно прав для выполнения операции"},"InternalError":{"content":{"application/problem+json":{"example":{"code":"operation_failed","detail":"Операция завершилась внутренней ошибкой; сохраните request_id для диагностики","request_id":"123e4567-e89b-42d3-a456-426614174000","retryable":false,"status":500,"title":"Internal Server Error","type":"about:blank"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Операция завершилась внутренней ошибкой; сохраните request_id для диагностики"},"NotFound":{"content":{"application/problem+json":{"example":{"code":"not_found","detail":"Ресурс не найден или недоступен текущему владельцу","request_id":"123e4567-e89b-42d3-a456-426614174000","retryable":false,"status":404,"title":"Not Found","type":"about:blank"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Ресурс не найден или недоступен текущему владельцу"},"TooManyRequests":{"content":{"application/problem+json":{"example":{"code":"rate_limited","detail":"Превышен лимит запросов; повторите позже","request_id":"123e4567-e89b-42d3-a456-426614174000","retryable":true,"status":429,"title":"Too Many Requests","type":"about:blank"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Превышен лимит запросов; повторите позже"},"Unauthorized":{"content":{"application/problem+json":{"example":{"code":"not_authenticated","detail":"Требуется действующий Bearer-токен","request_id":"123e4567-e89b-42d3-a456-426614174000","retryable":false,"status":401,"title":"Unauthorized","type":"about:blank"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Требуется действующий Bearer-токен"},"Unavailable":{"content":{"application/problem+json":{"example":{"code":"operation_unavailable","detail":"Операция временно недоступна","request_id":"123e4567-e89b-42d3-a456-426614174000","retryable":true,"status":503,"title":"Service Unavailable","type":"about:blank"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Операция временно недоступна"}},"schemas":{"Account":{"additionalProperties":false,"properties":{"attributes":{"properties":{"contact_id":{"description":"Идентификатор контакта","type":["string","null"]},"contact_name":{"type":["string","null"]},"display_name":{"description":"Отображаемое имя","type":["string","null"]},"first_seen_at":{"description":"Время первого наблюдения","type":["string","null"]},"is_bot":{"description":"Признак аккаунта бота","type":["boolean","null"]},"last_seen_at":{"description":"Время последнего наблюдения","type":["string","null"]},"phone":{"description":"Номер телефона, если известен","type":["string","null"]},"platform":{"description":"Мессенджер","type":["string","null"]},"platform_account_id":{"type":["string","null"]},"source_id":{"description":"Идентификатор источника","type":["string","null"]},"username":{"description":"Имя пользователя в мессенджере","type":["string","null"]}},"type":"object"},"id":{"description":"Идентификатор ресурса","minLength":1,"type":"string"},"type":{"description":"Тип ресурса","enum":["account"],"type":"string"}},"required":["type","id","attributes"],"type":"object"},"AccountsListResponse":{"additionalProperties":false,"properties":{"page":{"additionalProperties":false,"description":"Страница результатов","properties":{"items":{"description":"Элементы текущей страницы","items":{"$ref":"#/components/schemas/Account"},"type":"array"},"next_cursor":{"description":"Курсор следующей страницы; отсутствует, если страниц больше нет","type":"string"}},"required":["items"],"type":"object"}},"required":["page"],"type":"object"},"ActionPlan":{"additionalProperties":false,"properties":{"attributes":{"properties":{"actions":{"description":"Состав элементов зависит от типа и состояния ресурса","items":{},"type":["array","null"]},"cancelled_at":{"type":["string","null"]},"confirmed_at":{"type":["string","null"]},"created_at":{"description":"Время создания","type":["string","null"]},"error":{"type":["string","null"]},"executed_at":{"type":["string","null"]},"intent":{"description":"Цель действия","type":["string","null"]},"invocation_source":{"type":["string","null"]},"latest_send_at":{"type":["string","null"]},"operation_type":{"description":"Тип подготавливаемого действия","type":["string","null"]},"preview":{"description":"Состав полей зависит от типа и состояния ресурса","type":["object","null"]},"revision":{"description":"Ревизия для защиты от изменения устаревших данных","type":["integer","null"]},"scheduled_for":{"type":["string","null"]},"scheduled_timezone":{"type":["string","null"]},"status":{"description":"Текущее состояние","type":["string","null"]},"summary":{"description":"Краткое описание действия","type":["string","null"]},"task_id":{"description":"Идентификатор задачи Агента","type":["string","null"]}},"type":"object"},"id":{"description":"Идентификатор ресурса","minLength":1,"type":"string"},"type":{"description":"Тип ресурса","enum":["action_plan"],"type":"string"}},"required":["type","id","attributes"],"type":"object"},"ActionPlansCommandsResponse":{"additionalProperties":false,"properties":{"action_plan":{"additionalProperties":false,"properties":{"id":{"description":"Идентификатор ресурса","format":"uuid","type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","type":"string"},"request_fingerprint":{"description":"Отпечаток подготовленного действия для подтверждения","type":"string"},"revision":{"description":"Ревизия для защиты от изменения устаревших данных","minimum":1,"type":"integer"},"status":{"description":"Текущее состояние","type":"string"}},"required":["id","revision","operation_type","status","request_fingerprint"],"type":"object"},"replayed":{"description":"Возвращен результат ранее принятого запроса","type":"boolean"}},"required":["action_plan","replayed"],"type":"object"},"ActionPlansListResponse":{"additionalProperties":false,"properties":{"page":{"additionalProperties":false,"description":"Страница результатов","properties":{"items":{"description":"Элементы текущей страницы","items":{"$ref":"#/components/schemas/ActionPlan"},"type":"array"},"next_cursor":{"description":"Курсор следующей страницы; отсутствует, если страниц больше нет","type":"string"}},"required":["items"],"type":"object"}},"required":["page"],"type":"object"},"AgentRequest":{"additionalProperties":false,"properties":{"attributes":{"properties":{"created_at":{"description":"Время создания","type":["string","null"]},"error_code":{"type":["string","null"]},"error_summary":{"type":["string","null"]},"finished_at":{"type":["string","null"]},"request_id":{"description":"Идентификатор запроса","type":["string","null"]},"retry_count":{"type":["integer","null"]},"scope_expansion":{"description":"Состав полей зависит от типа и состояния ресурса","type":["object","null"]},"source_refs":{"description":"Состав элементов зависит от типа и состояния ресурса","items":{},"type":["array","null"]},"started_at":{"type":["string","null"]},"status":{"description":"Текущее состояние","type":["string","null"]},"task_id":{"description":"Идентификатор задачи Агента","type":["string","null"]},"usage":{"description":"Состав полей зависит от типа и состояния ресурса","type":["object","null"]}},"type":"object"},"id":{"description":"Идентификатор ресурса","minLength":1,"type":"string"},"type":{"description":"Тип ресурса","enum":["turn"],"type":"string"}},"required":["type","id","attributes"],"type":"object"},"AgentTask":{"additionalProperties":false,"properties":{"attributes":{"properties":{"continued_from_task_id":{"type":["string","null"]},"created_at":{"description":"Время создания","type":["string","null"]},"current":{"description":"Текущая задача Агента","type":["boolean","null"]},"kind":{"description":"Вид задачи или ветки","type":["string","null"]},"last_used_at":{"type":["string","null"]},"limits_snapshot":{"description":"Состав полей зависит от типа и состояния ресурса","type":["object","null"]},"model":{"description":"Модель Агента","type":["string","null"]},"provider":{"description":"Провайдер Агента","type":["string","null"]},"reasoning_level":{"description":"Уровень рассуждений","type":["string","null"]},"settings_revision":{"type":["integer","null"]},"status":{"description":"Текущее состояние","type":["string","null"]},"updated_at":{"description":"Время последнего изменения","type":["string","null"]},"usage":{"description":"Состав полей зависит от типа и состояния ресурса","type":["object","null"]}},"type":"object"},"id":{"description":"Идентификатор ресурса","minLength":1,"type":"string"},"type":{"description":"Тип ресурса","enum":["task"],"type":"string"}},"required":["type","id","attributes"],"type":"object"},"Branch":{"additionalProperties":false,"properties":{"attributes":{"properties":{"available":{"description":"Ресурс доступен","type":["boolean","null"]},"chat_id":{"description":"Идентификатор чата","type":["string","null"]},"first_seen_at":{"description":"Время первого наблюдения","type":["string","null"]},"kind":{"description":"Вид задачи или ветки","type":["string","null"]},"last_seen_at":{"description":"Время последнего наблюдения","type":["string","null"]},"platform":{"description":"Мессенджер","type":["string","null"]},"platform_branch_id":{"type":["string","null"]},"source_id":{"description":"Идентификатор источника","type":["string","null"]},"title":{"description":"Название","type":["string","null"]}},"type":"object"},"id":{"description":"Идентификатор ресурса","minLength":1,"type":"string"},"type":{"description":"Тип ресурса","enum":["branch"],"type":"string"}},"required":["type","id","attributes"],"type":"object"},"CategoriesListResponse":{"additionalProperties":false,"properties":{"page":{"additionalProperties":false,"description":"Страница результатов","properties":{"items":{"description":"Элементы текущей страницы","items":{"$ref":"#/components/schemas/ChatCategory"},"type":"array"},"next_cursor":{"description":"Курсор следующей страницы; отсутствует, если страниц больше нет","type":"string"}},"required":["items"],"type":"object"}},"required":["page"],"type":"object"},"Chat":{"additionalProperties":false,"properties":{"attributes":{"properties":{"archived":{"description":"Ресурс находится в архиве","type":["boolean","null"]},"available":{"description":"Ресурс доступен","type":["boolean","null"]},"category_ids":{"description":"Идентификаторы категорий","items":{"type":"string"},"type":["array","null"]},"first_seen_at":{"description":"Время первого наблюдения","type":["string","null"]},"last_seen_at":{"description":"Время последнего наблюдения","type":["string","null"]},"platform":{"description":"Мессенджер","type":["string","null"]},"platform_chat_id":{"type":["string","null"]},"section_ids":{"description":"Идентификаторы разделов","items":{"type":"string"},"type":["array","null"]},"source_id":{"description":"Идентификатор источника","type":["string","null"]},"title":{"description":"Название","type":["string","null"]},"type":{"description":"Тип чата в мессенджере","type":["string","null"]},"username":{"description":"Имя пользователя в мессенджере","type":["string","null"]}},"type":"object"},"id":{"description":"Идентификатор ресурса","minLength":1,"type":"string"},"type":{"description":"Тип ресурса","enum":["chat"],"type":"string"}},"required":["type","id","attributes"],"type":"object"},"ChatCategory":{"additionalProperties":false,"properties":{"attributes":{"properties":{"aliases":{"description":"Дополнительные названия для поиска","items":{"type":"string"},"type":["array","null"]},"archived":{"description":"Ресурс находится в архиве","type":["boolean","null"]},"created_at":{"description":"Время создания","type":["string","null"]},"name":{"description":"Название","type":["string","null"]},"retention_days":{"description":"Срок хранения в днях; null означает наследование настройки","type":["integer","null"]},"updated_at":{"description":"Время последнего изменения","type":["string","null"]}},"type":"object"},"id":{"description":"Идентификатор ресурса","minLength":1,"type":"string"},"type":{"description":"Тип ресурса","enum":["category"],"type":"string"}},"required":["type","id","attributes"],"type":"object"},"ChatSection":{"additionalProperties":false,"properties":{"attributes":{"properties":{"aliases":{"description":"Дополнительные названия для поиска","items":{"type":"string"},"type":["array","null"]},"archived":{"description":"Ресурс находится в архиве","type":["boolean","null"]},"category_id":{"description":"Идентификатор категории","type":["string","null"]},"category_name":{"type":["string","null"]},"created_at":{"description":"Время создания","type":["string","null"]},"name":{"description":"Название","type":["string","null"]},"retention_days":{"description":"Срок хранения в днях; null означает наследование настройки","type":["integer","null"]},"updated_at":{"description":"Время последнего изменения","type":["string","null"]}},"type":"object"},"id":{"description":"Идентификатор ресурса","minLength":1,"type":"string"},"type":{"description":"Тип ресурса","enum":["section"],"type":"string"}},"required":["type","id","attributes"],"type":"object"},"ChatsListResponse":{"additionalProperties":false,"properties":{"page":{"additionalProperties":false,"description":"Страница результатов","properties":{"items":{"description":"Элементы текущей страницы","items":{"$ref":"#/components/schemas/Chat"},"type":"array"},"next_cursor":{"description":"Курсор следующей страницы; отсутствует, если страниц больше нет","type":"string"}},"required":["items"],"type":"object"}},"required":["page"],"type":"object"},"Contact":{"additionalProperties":false,"properties":{"attributes":{"properties":{"aliases":{"description":"Дополнительные названия для поиска","items":{"type":"string"},"type":["array","null"]},"archived":{"description":"Ресурс находится в архиве","type":["boolean","null"]},"created_at":{"description":"Время создания","type":["string","null"]},"display_name":{"description":"Отображаемое имя","type":["string","null"]},"notes":{"description":"Заметки","type":["string","null"]},"updated_at":{"description":"Время последнего изменения","type":["string","null"]}},"type":"object"},"id":{"description":"Идентификатор ресурса","minLength":1,"type":"string"},"type":{"description":"Тип ресурса","enum":["contact"],"type":"string"}},"required":["type","id","attributes"],"type":"object"},"ContactsListResponse":{"additionalProperties":false,"properties":{"page":{"additionalProperties":false,"description":"Страница результатов","properties":{"items":{"description":"Элементы текущей страницы","items":{"$ref":"#/components/schemas/Contact"},"type":"array"},"next_cursor":{"description":"Курсор следующей страницы; отсутствует, если страниц больше нет","type":"string"}},"required":["items"],"type":"object"}},"required":["page"],"type":"object"},"HealthReadyResponse503":{"additionalProperties":false,"properties":{"status":{"description":"Текущее состояние","enum":["unavailable"],"type":"string"}},"required":["status"],"type":"object"},"Items":{"additionalProperties":false,"properties":{"platform":{"description":"Мессенджер","enum":["telegram","discord","whatsapp","max"],"type":"string"},"projection_id":{"description":"Идентификатор проекции сообщения внутри платформы","minimum":1,"type":"integer"}},"required":["platform","projection_id"],"type":"object"},"Message":{"additionalProperties":false,"properties":{"attributes":{"properties":{"actor_account_id":{"type":["string","null"]},"attachments":{"description":"Структурированные данные, состав зависит от типа и состояния ресурса"},"author_name":{"description":"Имя автора","type":["string","null"]},"available":{"description":"Ресурс доступен","type":["boolean","null"]},"branch_id":{"description":"Идентификатор ветки","type":["string","null"]},"branch_title":{"description":"Название ветки","type":["string","null"]},"chat_id":{"description":"Идентификатор чата","type":["string","null"]},"chat_title":{"description":"Название чата","type":["string","null"]},"content":{"description":"Сохраненный текст сообщения","type":["string","null"]},"content_status":{"description":"Состояние доступности текста","type":["string","null"]},"content_unavailable_reason":{"description":"Причина недоступности текста","type":["string","null"]},"deleted_at":{"description":"Время удаления сообщения","type":["string","null"]},"echo_card_payload":{"type":["string","null"]},"echo_message_ref":{"description":"Состав полей зависит от типа и состояния ресурса","type":["object","null"]},"edited_at":{"description":"Время редактирования сообщения","type":["string","null"]},"platform":{"description":"Мессенджер","type":["string","null"]},"platform_details":{"description":"Данные платформы. Для MAX reactions_availability=available только у принятого полного снимка счетчиков, иначе unknown; авторы из счетчиков не выводятся. reactions_observed_at — локальное время наблюдения, снимок после scenario cutoff скрыт. Связи разрешаются только на сохраненную цель в том же source и допустимой области; sender_id не подменяет actor_account_id","type":["object","null"]},"platform_link":{"description":"Native permalink при наличии доказанной ссылки; для MAX пустая строка, доступна внутренняя карточка Echo","type":["string","null"]},"projection_id":{"description":"Идентификатор проекции сообщения внутри платформы","type":["integer","null"]},"searchable":{"description":"Текст доступен для поиска","type":["boolean","null"]},"sent_at":{"description":"Время отправки сообщения","type":["string","null"]},"server_name":{"description":"Название сервера","type":["string","null"]},"source_id":{"description":"Идентификатор источника","type":["string","null"]},"source_ref":{"description":"Состав полей зависит от типа и состояния ресурса","type":["object","null"]},"username":{"description":"Имя пользователя в мессенджере","type":["string","null"]}},"type":"object"},"id":{"description":"Идентификатор ресурса","minLength":1,"type":"string"},"type":{"description":"Тип ресурса","enum":["message"],"type":"string"}},"required":["type","id","attributes"],"type":"object"},"MessagesListResponse":{"additionalProperties":false,"properties":{"page":{"additionalProperties":false,"description":"Страница результатов","properties":{"content_subset":{"description":"Набор проекций: все или доступные для текстового поиска","enum":["all_projections","searchable"],"type":"string"},"items":{"description":"Элементы текущей страницы","items":{"$ref":"#/components/schemas/Message"},"type":"array"},"next_cursor":{"description":"Курсор следующей страницы; отсутствует, если страниц больше нет","type":"string"}},"required":["items"],"type":"object"}},"required":["page"],"type":"object"},"Problem":{"additionalProperties":false,"properties":{"code":{"description":"Стабильный код ошибки","type":"string"},"detail":{"description":"Пояснение ошибки","type":"string"},"field_errors":{"description":"Ошибки отдельных полей","items":{"additionalProperties":false,"properties":{"detail":{"description":"Пояснение ошибки","type":"string"},"field":{"description":"Имя поля с ошибкой","type":"string"}},"required":["field","detail"],"type":"object"},"type":"array"},"request_id":{"description":"Идентификатор запроса","format":"uuid","type":"string"},"retry_after":{"description":"Задержка перед повтором в секундах","minimum":1,"type":"integer"},"retryable":{"description":"Возможна повторная попытка","type":"boolean"},"status":{"description":"HTTP-код ответа","maximum":599,"minimum":400,"type":"integer"},"title":{"description":"Название HTTP-ошибки","type":"string"},"type":{"description":"URI типа ошибки; about:blank для стандартной HTTP-ошибки","type":"string"}},"required":["type","title","status","code","detail","request_id","retryable"],"type":"object"},"Relations":{"additionalProperties":false,"description":"Фильтры по связанным ресурсам","properties":{"source_ids":{"description":"Идентификаторы источников","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true}},"type":"object"},"Schedule":{"additionalProperties":false,"description":"Параметры отложенной отправки","properties":{"scheduled_for":{"format":"date-time","type":"string"},"timezone":{"minLength":1,"type":"string"}},"required":["scheduled_for","timezone"],"type":"object"},"Scope":{"additionalProperties":false,"description":"Выбранные чаты и ветки","properties":{"branch_ids":{"description":"Идентификаторы веток","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"category_ids":{"description":"Идентификаторы категорий","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"chat_ids":{"description":"Идентификаторы чатов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"platforms":{"description":"Мессенджеры","items":{"enum":["telegram","discord","whatsapp"],"type":"string"},"type":"array","uniqueItems":true},"section_ids":{"description":"Идентификаторы разделов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"ungrouped":{"description":"Отбор ресурсов без соответствующих связей","type":"boolean"}},"type":"object"},"SectionsListResponse":{"additionalProperties":false,"properties":{"page":{"additionalProperties":false,"description":"Страница результатов","properties":{"items":{"description":"Элементы текущей страницы","items":{"$ref":"#/components/schemas/ChatSection"},"type":"array"},"next_cursor":{"description":"Курсор следующей страницы; отсутствует, если страниц больше нет","type":"string"}},"required":["items"],"type":"object"}},"required":["page"],"type":"object"},"Source":{"additionalProperties":false,"properties":{"attributes":{"properties":{"created_at":{"description":"Время создания","type":["string","null"]},"display_name":{"description":"Отображаемое имя","type":["string","null"]},"enabled":{"description":"Источник включен","type":["boolean","null"]},"external_instance_id":{"type":["string","null"]},"last_connected_at":{"description":"Время последнего подключения","type":["string","null"]},"last_event_at":{"description":"Время последнего события","type":["string","null"]},"platform":{"description":"Мессенджер","type":["string","null"]},"status":{"description":"Текущее состояние","type":["string","null"]},"updated_at":{"description":"Время последнего изменения","type":["string","null"]}},"type":"object"},"id":{"description":"Идентификатор ресурса","minLength":1,"type":"string"},"type":{"description":"Тип ресурса","enum":["source"],"type":"string"}},"required":["type","id","attributes"],"type":"object"},"TasksCommandsResponse":{"additionalProperties":false,"properties":{"accepted":{"description":"Запрос принят","type":"boolean"},"expired":{"description":"При replay после удаления содержания: true, исходные task_id/turn_id сохранены, task/turn не выдаются","type":"boolean"},"operation_id":{"description":"Идентификатор доменной операции","type":"string"},"replayed":{"description":"Возвращен результат ранее принятого запроса","type":"boolean"},"task":{"additionalProperties":false,"properties":{"id":{"description":"Идентификатор ресурса","format":"uuid","type":"string"},"is_current":{"description":"Текущая задача Агента","type":"boolean"},"kind":{"description":"Вид задачи или ветки","type":"string"},"status":{"description":"Текущее состояние","type":"string"},"usage":{"additionalProperties":true,"type":"object"}},"required":["id","kind","status","is_current","usage"],"type":"object"},"task_id":{"description":"Идентификатор задачи Агента","format":"uuid","type":"string"},"turn":{"additionalProperties":false,"properties":{"error_code":{"type":"string"},"error_summary":{"type":"string"},"id":{"description":"Идентификатор ресурса","format":"uuid","type":"string"},"status":{"description":"Текущее состояние","type":"string"},"task_id":{"description":"Идентификатор задачи Агента","format":"uuid","type":"string"},"usage":{"additionalProperties":true,"type":"object"}},"required":["id","task_id","status"],"type":"object"},"turn_id":{"format":"uuid","type":"string"}},"required":["operation_id","accepted","replayed"],"type":"object"},"TasksListResponse":{"additionalProperties":false,"properties":{"page":{"additionalProperties":false,"description":"Страница результатов","properties":{"items":{"description":"Элементы текущей страницы","items":{"$ref":"#/components/schemas/AgentTask"},"type":"array"},"next_cursor":{"description":"Курсор следующей страницы; отсутствует, если страниц больше нет","type":"string"}},"required":["items"],"type":"object"}},"required":["page"],"type":"object"},"TurnsGetResponse":{"additionalProperties":false,"properties":{"item":{"$ref":"#/components/schemas/AgentRequest"}},"required":["item"],"type":"object"}},"securitySchemes":{"bearerAuth":{"bearerFormat":"echo_v1_","scheme":"bearer","type":"http"}}},"info":{"description":"Уровни доступа:\n\n1. **Read** — чтение данных;\n2. **Write** — работа с Агентом и отправка;\n3. **Full** — управление данными и подтверждение действий;\n\nКаждый уровень включает возможности предыдущего.","title":"DSN Echo API","version":"0.39.7 (build 337)","x-echo-build":337},"openapi":"3.1.0","paths":{"/accounts":{"get":{"operationId":"accounts.list","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"$ref":"#/components/parameters/QueryContactIds"},{"$ref":"#/components/parameters/QueryCursor"},{"$ref":"#/components/parameters/QueryFrom"},{"$ref":"#/components/parameters/QueryIds"},{"$ref":"#/components/parameters/QueryPageSize"},{"$ref":"#/components/parameters/QueryPlatforms"},{"$ref":"#/components/parameters/QueryResultLimit"},{"$ref":"#/components/parameters/QuerySourceIds"},{"$ref":"#/components/parameters/QueryUngrouped"},{"$ref":"#/components/parameters/QueryUntil"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountsListResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить список аккаунтов","tags":["Авторы"],"x-echo-access":"read","x-echo-order":50}},"/accounts/query":{"post":{"operationId":"accounts.query","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"contact_ids":{"description":"Идентификаторы контактов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"cursor":{"description":"Непрозрачный курсор следующей страницы","type":"string"},"from":{"description":"Начало периода включительно","format":"date-time","type":"string"},"ids":{"description":"Идентификаторы ресурсов для отбора","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"page_size":{"default":50,"description":"Размер страницы; значение 0 использует значение по умолчанию","maximum":200,"minimum":0,"type":"integer"},"platforms":{"description":"Мессенджеры","items":{"enum":["telegram","discord","whatsapp","max"],"type":"string"},"type":"array","uniqueItems":true},"relations":{"$ref":"#/components/schemas/Relations"},"result_limit":{"default":500,"description":"Общий предел результатов; значение 0 использует значение по умолчанию","maximum":500,"minimum":0,"type":"integer"},"ungrouped":{"description":"Отбор ресурсов без соответствующих связей","type":"boolean"},"until":{"description":"Конец периода исключительно","format":"date-time","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountsListResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Найти аккаунты по расширенным фильтрам","tags":["Авторы"],"x-echo-access":"read","x-echo-order":60}},"/accounts/{account_id}":{"get":{"operationId":"accounts.get","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"description":"Идентификатор аккаунта","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"item":{"$ref":"#/components/schemas/Account"}},"required":["item"],"type":"object"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить карточку аккаунта","tags":["Авторы"],"x-echo-access":"read","x-echo-order":70}},"/action-plans":{"get":{"operationId":"action_plans.list","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"$ref":"#/components/parameters/QueryCursor"},{"$ref":"#/components/parameters/QueryFrom"},{"$ref":"#/components/parameters/QueryIds"},{"$ref":"#/components/parameters/QueryPageSize"},{"$ref":"#/components/parameters/QueryResultLimit"},{"description":"Идентификаторы задач Агента","in":"query","name":"task_ids","required":false,"schema":{"items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true}},{"$ref":"#/components/parameters/QueryUntil"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionPlansListResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить список действий","tags":["Действия"],"x-echo-access":"read","x-echo-order":10},"post":{"operationId":"action_plans.prepare","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"$ref":"#/components/parameters/HeaderIdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"discriminator":{"propertyName":"operation_type"},"oneOf":[{"additionalProperties":false,"properties":{"aliases":{"description":"Дополнительные названия для поиска","items":{"minLength":1,"type":"string"},"type":"array","uniqueItems":true},"display_name":{"description":"Отображаемое имя","minLength":1,"type":"string"},"notes":{"description":"Заметки","type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["contact_create"],"type":"string"}},"required":["operation_type","display_name"],"title":"contact_create","type":"object"},{"additionalProperties":false,"properties":{"aliases":{"description":"Дополнительные названия для поиска","items":{"minLength":1,"type":"string"},"type":"array","uniqueItems":true},"contact_id":{"description":"Идентификатор контакта","format":"uuid","type":"string"},"display_name":{"description":"Отображаемое имя","minLength":1,"type":"string"},"notes":{"description":"Заметки","type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["contact_update"],"type":"string"}},"required":["operation_type","contact_id","display_name"],"title":"contact_update","type":"object"},{"additionalProperties":false,"properties":{"archived":{"description":"Ресурс находится в архиве","type":"boolean"},"contact_id":{"description":"Идентификатор контакта","format":"uuid","type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["contact_archive"],"type":"string"}},"required":["operation_type","contact_id","archived"],"title":"contact_archive","type":"object"},{"additionalProperties":false,"properties":{"account_id":{"description":"Идентификатор аккаунта","format":"uuid","type":"string"},"contact_id":{"description":"Идентификатор контакта","format":"uuid","type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["account_contact_link"],"type":"string"}},"required":["operation_type","account_id","contact_id"],"title":"account_contact_link","type":"object"},{"additionalProperties":false,"properties":{"account_id":{"description":"Идентификатор аккаунта","format":"uuid","type":"string"},"contact_id":{"description":"Идентификатор контакта","format":"uuid","type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["account_contact_unlink"],"type":"string"}},"required":["operation_type","account_id","contact_id"],"title":"account_contact_unlink","type":"object"},{"additionalProperties":false,"properties":{"account_id":{"description":"Идентификатор аккаунта","format":"uuid","type":"string"},"from_contact_id":{"format":"uuid","type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["account_contact_reassign"],"type":"string"},"to_contact_id":{"format":"uuid","type":"string"}},"required":["operation_type","account_id","from_contact_id","to_contact_id"],"title":"account_contact_reassign","type":"object"},{"additionalProperties":false,"properties":{"aliases":{"description":"Дополнительные названия для поиска","items":{"minLength":1,"type":"string"},"type":"array","uniqueItems":true},"name":{"description":"Название","minLength":1,"type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["category_create"],"type":"string"}},"required":["operation_type","name"],"title":"category_create","type":"object"},{"additionalProperties":false,"properties":{"aliases":{"description":"Дополнительные названия для поиска","items":{"minLength":1,"type":"string"},"type":"array","uniqueItems":true},"category_id":{"description":"Идентификатор категории","format":"uuid","type":"string"},"name":{"description":"Название","minLength":1,"type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["category_update"],"type":"string"}},"required":["operation_type","category_id","name"],"title":"category_update","type":"object"},{"additionalProperties":false,"properties":{"archived":{"description":"Ресурс находится в архиве","type":"boolean"},"category_id":{"description":"Идентификатор категории","format":"uuid","type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["category_archive"],"type":"string"}},"required":["operation_type","category_id","archived"],"title":"category_archive","type":"object"},{"additionalProperties":false,"properties":{"aliases":{"description":"Дополнительные названия для поиска","items":{"minLength":1,"type":"string"},"type":"array","uniqueItems":true},"category_id":{"description":"Идентификатор категории","format":"uuid","type":["string","null"]},"name":{"description":"Название","minLength":1,"type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["section_create"],"type":"string"}},"required":["operation_type","name"],"title":"section_create","type":"object"},{"additionalProperties":false,"properties":{"aliases":{"description":"Дополнительные названия для поиска","items":{"minLength":1,"type":"string"},"type":"array","uniqueItems":true},"name":{"description":"Название","minLength":1,"type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["section_update"],"type":"string"},"section_id":{"description":"Идентификатор раздела","format":"uuid","type":"string"}},"required":["operation_type","section_id","name"],"title":"section_update","type":"object"},{"additionalProperties":false,"properties":{"archived":{"description":"Ресурс находится в архиве","type":"boolean"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["section_archive"],"type":"string"},"section_id":{"description":"Идентификатор раздела","format":"uuid","type":"string"}},"required":["operation_type","section_id","archived"],"title":"section_archive","type":"object"},{"additionalProperties":false,"properties":{"category_id":{"description":"Идентификатор категории","format":"uuid","type":["string","null"]},"operation_type":{"description":"Тип подготавливаемого действия","enum":["section_move"],"type":"string"},"section_id":{"description":"Идентификатор раздела","format":"uuid","type":"string"}},"required":["operation_type","section_id"],"title":"section_move","type":"object"},{"additionalProperties":false,"properties":{"category_ids":{"description":"Идентификаторы категорий","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"chat_id":{"description":"Идентификатор чата","format":"uuid","type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["chat_classification_replace"],"type":"string"},"section_ids":{"description":"Идентификаторы разделов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true}},"required":["operation_type","chat_id","category_ids","section_ids"],"title":"chat_classification_replace","type":"object"},{"additionalProperties":false,"properties":{"category_ids":{"description":"Идентификаторы категорий","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"chat_ids":{"description":"Идентификаторы чатов","items":{"format":"uuid","type":"string"},"maxItems":100,"minItems":1,"type":"array","uniqueItems":true},"operation_type":{"description":"Тип подготавливаемого действия","enum":["chat_classification_bulk_add"],"type":"string"},"section_ids":{"description":"Идентификаторы разделов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true}},"required":["operation_type","chat_ids","category_ids","section_ids"],"title":"chat_classification_bulk_add","type":"object"},{"additionalProperties":false,"properties":{"chat_ids":{"description":"Идентификаторы чатов","items":{"format":"uuid","type":"string"},"maxItems":100,"minItems":1,"type":"array","uniqueItems":true},"operation_type":{"description":"Тип подготавливаемого действия","enum":["chat_classification_bulk_clear"],"type":"string"}},"required":["operation_type","chat_ids"],"title":"chat_classification_bulk_clear","type":"object"},{"additionalProperties":false,"properties":{"operation_type":{"description":"Тип подготавливаемого действия","enum":["send_text"],"type":"string"},"schedule":{"$ref":"#/components/schemas/Schedule"},"scope":{"$ref":"#/components/schemas/Scope"},"text":{"description":"Complete message text. The server checks every resolved platform: Telegram 4096 Unicode code points, Discord 2000 Unicode code points, WhatsApp 65536 native WAStringz segments. JSON transport has a separate 1 MiB budget. Text is never truncated or split.","minLength":1,"type":"string","x-echo-effective-limit":"every resolved platform counter","x-echo-platform-length-units":{"discord":"unicode_code_points","telegram":"unicode_code_points","whatsapp":"WAStringz_1050744166"},"x-echo-platform-max-lengths":{"discord":2000,"telegram":4096,"whatsapp":65536}}},"required":["operation_type","scope","text"],"title":"send_text","type":"object"}]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionPlansCommandsResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionPlansCommandsResponse"}}},"description":"Mutation accepted","headers":{"Location":{"description":"Canonical URL of the accepted resource","schema":{"format":"uri-reference","type":"string"}},"Retry-After":{"description":"Optional delay in seconds before polling","schema":{"minimum":1,"type":"integer"}},"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Подготовить действие","tags":["Действия"],"x-echo-operation-variants":[{"operation_id":"action_plans.management.prepare","x-echo-access":"full","x-echo-execution-class":"action_plan"},{"operation_id":"action_plans.standard.prepare","x-echo-access":"write","x-echo-execution-class":"action_plan"}],"x-echo-order":40}},"/action-plans/query":{"post":{"operationId":"action_plans.query","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"cursor":{"description":"Непрозрачный курсор следующей страницы","type":"string"},"from":{"description":"Начало периода включительно","format":"date-time","type":"string"},"ids":{"description":"Идентификаторы ресурсов для отбора","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"page_size":{"default":50,"description":"Размер страницы; значение 0 использует значение по умолчанию","maximum":200,"minimum":0,"type":"integer"},"relations":{"additionalProperties":false,"description":"Фильтры по связанным ресурсам","properties":{"task_ids":{"description":"Идентификаторы задач Агента","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true}},"type":"object"},"result_limit":{"default":500,"description":"Общий предел результатов; значение 0 использует значение по умолчанию","maximum":500,"minimum":0,"type":"integer"},"until":{"description":"Конец периода исключительно","format":"date-time","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionPlansListResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Найти действия по расширенным фильтрам","tags":["Действия"],"x-echo-access":"read","x-echo-order":20}},"/action-plans/{action_plan_id}":{"get":{"operationId":"action_plans.get","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"$ref":"#/components/parameters/PathActionPlanId"}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"item":{"$ref":"#/components/schemas/ActionPlan"}},"required":["item"],"type":"object"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить карточку действия","tags":["Действия"],"x-echo-access":"read","x-echo-order":30}},"/action-plans/{action_plan_id}/commands":{"post":{"operationId":"action_plans.commands","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"$ref":"#/components/parameters/HeaderIdempotencyKey"},{"$ref":"#/components/parameters/PathActionPlanId"}],"requestBody":{"content":{"application/json":{"schema":{"discriminator":{"propertyName":"command"},"oneOf":[{"additionalProperties":false,"properties":{"command":{"description":"Команда управления","enum":["cancel"],"type":"string"},"expected_fingerprint":{"minLength":1,"type":"string"},"expected_revision":{"minimum":1,"type":"integer"}},"required":["command","expected_revision","expected_fingerprint"],"title":"cancel","type":"object"},{"additionalProperties":false,"properties":{"command":{"description":"Команда управления","enum":["confirm"],"type":"string"},"expected_fingerprint":{"minLength":1,"type":"string"},"expected_revision":{"minimum":1,"type":"integer"}},"required":["command","expected_revision","expected_fingerprint"],"title":"confirm","type":"object"},{"anyOf":[{"anyOf":[{"additionalProperties":false,"properties":{"aliases":{"description":"Дополнительные названия для поиска","items":{"minLength":1,"type":"string"},"type":"array","uniqueItems":true},"command":{"description":"Команда управления","enum":["revise"],"type":"string"},"display_name":{"description":"Отображаемое имя","minLength":1,"type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"notes":{"description":"Заметки","type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["contact_create"],"type":"string"}},"required":["command","expected_revision","display_name"],"title":"revise","type":"object"},{"additionalProperties":false,"properties":{"aliases":{"description":"Дополнительные названия для поиска","items":{"minLength":1,"type":"string"},"type":"array","uniqueItems":true},"command":{"description":"Команда управления","enum":["revise"],"type":"string"},"contact_id":{"description":"Идентификатор контакта","format":"uuid","type":"string"},"display_name":{"description":"Отображаемое имя","minLength":1,"type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"notes":{"description":"Заметки","type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["contact_update"],"type":"string"}},"required":["command","expected_revision","contact_id","display_name"],"title":"revise","type":"object"},{"additionalProperties":false,"properties":{"archived":{"description":"Ресурс находится в архиве","type":"boolean"},"command":{"description":"Команда управления","enum":["revise"],"type":"string"},"contact_id":{"description":"Идентификатор контакта","format":"uuid","type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["contact_archive"],"type":"string"}},"required":["command","expected_revision","contact_id","archived"],"title":"revise","type":"object"},{"additionalProperties":false,"properties":{"account_id":{"description":"Идентификатор аккаунта","format":"uuid","type":"string"},"command":{"description":"Команда управления","enum":["revise"],"type":"string"},"contact_id":{"description":"Идентификатор контакта","format":"uuid","type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["account_contact_link"],"type":"string"}},"required":["command","expected_revision","account_id","contact_id"],"title":"revise","type":"object"},{"additionalProperties":false,"properties":{"account_id":{"description":"Идентификатор аккаунта","format":"uuid","type":"string"},"command":{"description":"Команда управления","enum":["revise"],"type":"string"},"contact_id":{"description":"Идентификатор контакта","format":"uuid","type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["account_contact_unlink"],"type":"string"}},"required":["command","expected_revision","account_id","contact_id"],"title":"revise","type":"object"},{"additionalProperties":false,"properties":{"account_id":{"description":"Идентификатор аккаунта","format":"uuid","type":"string"},"command":{"description":"Команда управления","enum":["revise"],"type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"from_contact_id":{"format":"uuid","type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["account_contact_reassign"],"type":"string"},"to_contact_id":{"format":"uuid","type":"string"}},"required":["command","expected_revision","account_id","from_contact_id","to_contact_id"],"title":"revise","type":"object"},{"additionalProperties":false,"properties":{"aliases":{"description":"Дополнительные названия для поиска","items":{"minLength":1,"type":"string"},"type":"array","uniqueItems":true},"command":{"description":"Команда управления","enum":["revise"],"type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"name":{"description":"Название","minLength":1,"type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["category_create"],"type":"string"}},"required":["command","expected_revision","name"],"title":"revise","type":"object"},{"additionalProperties":false,"properties":{"aliases":{"description":"Дополнительные названия для поиска","items":{"minLength":1,"type":"string"},"type":"array","uniqueItems":true},"category_id":{"description":"Идентификатор категории","format":"uuid","type":"string"},"command":{"description":"Команда управления","enum":["revise"],"type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"name":{"description":"Название","minLength":1,"type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["category_update"],"type":"string"}},"required":["command","expected_revision","category_id","name"],"title":"revise","type":"object"},{"additionalProperties":false,"properties":{"archived":{"description":"Ресурс находится в архиве","type":"boolean"},"category_id":{"description":"Идентификатор категории","format":"uuid","type":"string"},"command":{"description":"Команда управления","enum":["revise"],"type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["category_archive"],"type":"string"}},"required":["command","expected_revision","category_id","archived"],"title":"revise","type":"object"},{"additionalProperties":false,"properties":{"aliases":{"description":"Дополнительные названия для поиска","items":{"minLength":1,"type":"string"},"type":"array","uniqueItems":true},"category_id":{"description":"Идентификатор категории","format":"uuid","type":["string","null"]},"command":{"description":"Команда управления","enum":["revise"],"type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"name":{"description":"Название","minLength":1,"type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["section_create"],"type":"string"}},"required":["command","expected_revision","name"],"title":"revise","type":"object"},{"additionalProperties":false,"properties":{"aliases":{"description":"Дополнительные названия для поиска","items":{"minLength":1,"type":"string"},"type":"array","uniqueItems":true},"command":{"description":"Команда управления","enum":["revise"],"type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"name":{"description":"Название","minLength":1,"type":"string"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["section_update"],"type":"string"},"section_id":{"description":"Идентификатор раздела","format":"uuid","type":"string"}},"required":["command","expected_revision","section_id","name"],"title":"revise","type":"object"},{"additionalProperties":false,"properties":{"archived":{"description":"Ресурс находится в архиве","type":"boolean"},"command":{"description":"Команда управления","enum":["revise"],"type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["section_archive"],"type":"string"},"section_id":{"description":"Идентификатор раздела","format":"uuid","type":"string"}},"required":["command","expected_revision","section_id","archived"],"title":"revise","type":"object"},{"additionalProperties":false,"properties":{"category_id":{"description":"Идентификатор категории","format":"uuid","type":["string","null"]},"command":{"description":"Команда управления","enum":["revise"],"type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["section_move"],"type":"string"},"section_id":{"description":"Идентификатор раздела","format":"uuid","type":"string"}},"required":["command","expected_revision","section_id"],"title":"revise","type":"object"},{"additionalProperties":false,"properties":{"category_ids":{"description":"Идентификаторы категорий","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"chat_id":{"description":"Идентификатор чата","format":"uuid","type":"string"},"command":{"description":"Команда управления","enum":["revise"],"type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["chat_classification_replace"],"type":"string"},"section_ids":{"description":"Идентификаторы разделов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true}},"required":["command","expected_revision","chat_id","category_ids","section_ids"],"title":"revise","type":"object"},{"additionalProperties":false,"properties":{"category_ids":{"description":"Идентификаторы категорий","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"chat_ids":{"description":"Идентификаторы чатов","items":{"format":"uuid","type":"string"},"maxItems":100,"minItems":1,"type":"array","uniqueItems":true},"command":{"description":"Команда управления","enum":["revise"],"type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["chat_classification_bulk_add"],"type":"string"},"section_ids":{"description":"Идентификаторы разделов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true}},"required":["command","expected_revision","chat_ids","category_ids","section_ids"],"title":"revise","type":"object"},{"additionalProperties":false,"properties":{"chat_ids":{"description":"Идентификаторы чатов","items":{"format":"uuid","type":"string"},"maxItems":100,"minItems":1,"type":"array","uniqueItems":true},"command":{"description":"Команда управления","enum":["revise"],"type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["chat_classification_bulk_clear"],"type":"string"}},"required":["command","expected_revision","chat_ids"],"title":"revise","type":"object"}],"description":"The server selects the management intent schema from the owner-scoped stored action-plan type; operation_type is optional and, when supplied, is an equality assertion","title":"revise","x-echo-stored-type-resolution":true},{"additionalProperties":false,"properties":{"command":{"description":"Команда управления","enum":["revise"],"type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"operation_type":{"description":"Тип подготавливаемого действия","enum":["send_text"],"type":"string"},"schedule":{"$ref":"#/components/schemas/Schedule"},"scope":{"$ref":"#/components/schemas/Scope"},"text":{"description":"Complete message text. The server checks every resolved platform: Telegram 4096 Unicode code points, Discord 2000 Unicode code points, WhatsApp 65536 native WAStringz segments. JSON transport has a separate 1 MiB budget. Text is never truncated or split.","minLength":1,"type":"string","x-echo-effective-limit":"every resolved platform counter","x-echo-platform-length-units":{"discord":"unicode_code_points","telegram":"unicode_code_points","whatsapp":"WAStringz_1050744166"},"x-echo-platform-max-lengths":{"discord":2000,"telegram":4096,"whatsapp":65536}}},"required":["command","expected_revision","scope","text"],"title":"revise","type":"object"}],"description":"The server selects this command variant from the owner-scoped stored action-plan type; operation_type is an optional equality assertion","properties":{"command":{"description":"Команда управления","enum":["revise"],"type":"string"}},"required":["command"],"title":"revise","type":"object","x-echo-discriminator-value":"revise","x-echo-stored-type-resolution":true},{"additionalProperties":false,"properties":{"command":{"description":"Команда управления","enum":["reject"],"type":"string"},"expected_revision":{"minimum":1,"type":"integer"}},"required":["command","expected_revision"],"title":"reject","type":"object"},{"additionalProperties":false,"properties":{"command":{"description":"Команда управления","enum":["reschedule"],"type":"string"},"expected_fingerprint":{"minLength":1,"type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"schedule":{"$ref":"#/components/schemas/Schedule"}},"required":["command","expected_revision","expected_fingerprint","schedule"],"title":"reschedule","type":"object"},{"additionalProperties":false,"properties":{"command":{"description":"Команда управления","enum":["retry"],"type":"string"},"expected_fingerprint":{"minLength":1,"type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"failure_types":{"items":{"enum":["failed","unconfirmed"],"type":"string"},"maxItems":1,"minItems":1,"type":"array","uniqueItems":true},"target_ids":{"items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true}},"required":["command","expected_revision","expected_fingerprint","failure_types"],"title":"retry","type":"object"}]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionPlansCommandsResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionPlansCommandsResponse"}}},"description":"Mutation accepted","headers":{"Location":{"description":"Canonical URL of the accepted resource","schema":{"format":"uri-reference","type":"string"}},"Retry-After":{"description":"Optional delay in seconds before polling","schema":{"minimum":1,"type":"integer"}},"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Управлять действием","tags":["Действия"],"x-echo-operation-variants":[{"operation_id":"action_plans.cancel","x-echo-access":"full","x-echo-execution-class":"action_plan"},{"operation_id":"action_plans.confirm","x-echo-access":"full","x-echo-execution-class":"action_plan"},{"operation_id":"action_plans.management.revise","x-echo-access":"full","x-echo-execution-class":"action_plan"},{"operation_id":"action_plans.reject","x-echo-access":"full","x-echo-execution-class":"action_plan"},{"operation_id":"action_plans.reschedule","x-echo-access":"full","x-echo-execution-class":"action_plan"},{"operation_id":"action_plans.retry","x-echo-access":"full","x-echo-execution-class":"action_plan"},{"operation_id":"action_plans.standard.revise","x-echo-access":"write","x-echo-execution-class":"action_plan"}],"x-echo-order":50}},"/branches":{"get":{"operationId":"branches.list","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"$ref":"#/components/parameters/QueryAvailable"},{"$ref":"#/components/parameters/QueryChatIds"},{"$ref":"#/components/parameters/QueryCursor"},{"$ref":"#/components/parameters/QueryFrom"},{"$ref":"#/components/parameters/QueryIds"},{"$ref":"#/components/parameters/QueryPageSize"},{"$ref":"#/components/parameters/QueryPlatforms"},{"$ref":"#/components/parameters/QueryResultLimit"},{"$ref":"#/components/parameters/QuerySourceIds"},{"$ref":"#/components/parameters/QueryUntil"}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"page":{"additionalProperties":false,"description":"Страница результатов","properties":{"items":{"description":"Элементы текущей страницы","items":{"$ref":"#/components/schemas/Branch"},"type":"array"},"next_cursor":{"description":"Курсор следующей страницы; отсутствует, если страниц больше нет","type":"string"}},"required":["items"],"type":"object"}},"required":["page"],"type":"object"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить список веток","tags":["Чаты"],"x-echo-access":"read","x-echo-order":50}},"/branches/{branch_id}":{"get":{"operationId":"branches.get","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"description":"Идентификатор ветки","in":"path","name":"branch_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"item":{"$ref":"#/components/schemas/Branch"}},"required":["item"],"type":"object"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить ветку","tags":["Чаты"],"x-echo-access":"read","x-echo-order":70}},"/categories":{"get":{"operationId":"categories.list","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"$ref":"#/components/parameters/QueryAvailable"},{"$ref":"#/components/parameters/QueryChatIds"},{"$ref":"#/components/parameters/QueryCursor"},{"$ref":"#/components/parameters/QueryFrom"},{"$ref":"#/components/parameters/QueryIds"},{"$ref":"#/components/parameters/QueryPageSize"},{"$ref":"#/components/parameters/QueryResultLimit"},{"$ref":"#/components/parameters/QueryUntil"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoriesListResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить список категорий","tags":["Классификация"],"x-echo-access":"read","x-echo-order":10}},"/categories/query":{"post":{"operationId":"categories.query","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"available":{"description":"Ресурс доступен","type":"boolean"},"chat_ids":{"description":"Идентификаторы чатов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"cursor":{"description":"Непрозрачный курсор следующей страницы","type":"string"},"from":{"description":"Начало периода включительно","format":"date-time","type":"string"},"ids":{"description":"Идентификаторы ресурсов для отбора","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"page_size":{"default":50,"description":"Размер страницы; значение 0 использует значение по умолчанию","maximum":200,"minimum":0,"type":"integer"},"result_limit":{"default":500,"description":"Общий предел результатов; значение 0 использует значение по умолчанию","maximum":500,"minimum":0,"type":"integer"},"until":{"description":"Конец периода исключительно","format":"date-time","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoriesListResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Найти категории по расширенным фильтрам","tags":["Классификация"],"x-echo-access":"read","x-echo-order":20}},"/categories/{category_id}":{"get":{"operationId":"categories.get","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"description":"Идентификатор категории","in":"path","name":"category_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"item":{"$ref":"#/components/schemas/ChatCategory"}},"required":["item"],"type":"object"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить карточку категории","tags":["Классификация"],"x-echo-access":"read","x-echo-order":30}},"/chats":{"get":{"operationId":"chats.list","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"$ref":"#/components/parameters/QueryAvailable"},{"$ref":"#/components/parameters/QueryCategoryIds"},{"$ref":"#/components/parameters/QueryCursor"},{"$ref":"#/components/parameters/QueryFrom"},{"$ref":"#/components/parameters/QueryIds"},{"$ref":"#/components/parameters/QueryPageSize"},{"$ref":"#/components/parameters/QueryPlatforms"},{"$ref":"#/components/parameters/QueryResultLimit"},{"$ref":"#/components/parameters/QuerySectionIds"},{"$ref":"#/components/parameters/QuerySourceIds"},{"$ref":"#/components/parameters/QueryUngrouped"},{"$ref":"#/components/parameters/QueryUntil"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatsListResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить список чатов","tags":["Чаты"],"x-echo-access":"read","x-echo-order":10}},"/chats/query":{"post":{"operationId":"chats.query","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"available":{"description":"Ресурс доступен","type":"boolean"},"category_ids":{"description":"Идентификаторы категорий","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"cursor":{"description":"Непрозрачный курсор следующей страницы","type":"string"},"from":{"description":"Начало периода включительно","format":"date-time","type":"string"},"ids":{"description":"Идентификаторы ресурсов для отбора","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"page_size":{"default":50,"description":"Размер страницы; значение 0 использует значение по умолчанию","maximum":200,"minimum":0,"type":"integer"},"platforms":{"description":"Мессенджеры","items":{"enum":["telegram","discord","whatsapp","max"],"type":"string"},"type":"array","uniqueItems":true},"relations":{"$ref":"#/components/schemas/Relations"},"result_limit":{"default":500,"description":"Общий предел результатов; значение 0 использует значение по умолчанию","maximum":500,"minimum":0,"type":"integer"},"section_ids":{"description":"Идентификаторы разделов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"ungrouped":{"description":"Отбор ресурсов без соответствующих связей","type":"boolean"},"until":{"description":"Конец периода исключительно","format":"date-time","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatsListResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Найти чаты по расширенным фильтрам","tags":["Чаты"],"x-echo-access":"read","x-echo-order":20}},"/chats/{chat_id}":{"get":{"operationId":"chats.get","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"description":"Идентификатор чата","in":"path","name":"chat_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"item":{"$ref":"#/components/schemas/Chat"}},"required":["item"],"type":"object"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить карточку чата","tags":["Чаты"],"x-echo-access":"read","x-echo-order":30}},"/contacts":{"get":{"operationId":"contacts.list","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"$ref":"#/components/parameters/QueryAvailable"},{"$ref":"#/components/parameters/QueryCursor"},{"$ref":"#/components/parameters/QueryFrom"},{"$ref":"#/components/parameters/QueryIds"},{"$ref":"#/components/parameters/QueryPageSize"},{"$ref":"#/components/parameters/QueryResultLimit"},{"$ref":"#/components/parameters/QueryUntil"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactsListResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить список контактов","tags":["Авторы"],"x-echo-access":"read","x-echo-order":10}},"/contacts/query":{"post":{"operationId":"contacts.query","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"available":{"description":"Ресурс доступен","type":"boolean"},"cursor":{"description":"Непрозрачный курсор следующей страницы","type":"string"},"from":{"description":"Начало периода включительно","format":"date-time","type":"string"},"ids":{"description":"Идентификаторы ресурсов для отбора","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"page_size":{"default":50,"description":"Размер страницы; значение 0 использует значение по умолчанию","maximum":200,"minimum":0,"type":"integer"},"result_limit":{"default":500,"description":"Общий предел результатов; значение 0 использует значение по умолчанию","maximum":500,"minimum":0,"type":"integer"},"until":{"description":"Конец периода исключительно","format":"date-time","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactsListResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Найти контакты по расширенным фильтрам","tags":["Авторы"],"x-echo-access":"read","x-echo-order":20}},"/contacts/{contact_id}":{"get":{"operationId":"contacts.get","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"description":"Идентификатор контакта","in":"path","name":"contact_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"item":{"$ref":"#/components/schemas/Contact"}},"required":["item"],"type":"object"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить карточку контакта","tags":["Авторы"],"x-echo-access":"read","x-echo-order":30}},"/context/coverage":{"post":{"operationId":"context.coverage","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"author_account_ids":{"description":"Аккаунты авторов сообщений","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"available":{"description":"Ресурс доступен","type":"boolean"},"branch_ids":{"description":"Идентификаторы веток","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"category_ids":{"description":"Идентификаторы категорий","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"chat_ids":{"description":"Идентификаторы чатов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"contact_ids":{"description":"Идентификаторы контактов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"from":{"description":"Начало периода включительно","format":"date-time","type":"string"},"platforms":{"description":"Мессенджеры","items":{"enum":["telegram","discord","whatsapp","max"],"type":"string"},"type":"array","uniqueItems":true},"relations":{"$ref":"#/components/schemas/Relations"},"section_ids":{"description":"Идентификаторы разделов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"ungrouped":{"description":"Отбор ресурсов без соответствующих связей","type":"boolean"},"until":{"description":"Конец периода исключительно","format":"date-time","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"coverage":{"additionalProperties":false,"description":"Полнота сохраненной истории","properties":{"earliest":{"format":"date-time","type":"string"},"gaps":{"description":"Зафиксированные пробелы истории","items":{"additionalProperties":false,"properties":{"chat_id":{"description":"Идентификатор чата","format":"uuid","type":"string"},"from":{"description":"Начало периода включительно","format":"date-time","type":"string"},"id":{"description":"Идентификатор ресурса","minimum":1,"type":"integer"},"platform":{"description":"Мессенджер","enum":["telegram","discord","whatsapp","max"],"type":"string"},"reason":{"description":"Причина пробела","type":"string"},"source_id":{"description":"Идентификатор источника","format":"uuid","type":"string"},"status":{"description":"Текущее состояние","type":"string"},"until":{"description":"Конец периода исключительно","format":"date-time","type":"string"}},"required":["id","source_id","platform","status","reason","from"],"type":"object"},"type":"array"},"history_may_be_incomplete":{"description":"История может быть неполной; для MAX в выбранной области полнота неизвестна, пустые gaps и успешный bootstrap ее не доказывают","type":"boolean"},"latest":{"format":"date-time","type":"string"},"message_count":{"description":"Количество сохраненных сообщений","minimum":0,"type":"integer"},"platforms":{"additionalProperties":{"minimum":0,"type":"integer"},"description":"Мессенджеры","type":"object"},"unavailable_message_count":{"description":"Количество сообщений с недоступным содержимым","minimum":0,"type":"integer"}},"required":["message_count","unavailable_message_count","platforms","history_may_be_incomplete","gaps"],"type":"object"}},"required":["coverage"],"type":"object"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Проверить полноту истории","tags":["Поиск"],"x-echo-access":"read","x-echo-order":40}},"/health/live":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"status":{"description":"Текущее состояние","enum":["ok"],"type":"string"}},"required":["status"],"type":"object"}}},"description":"Health check passed"},"405":{"description":"HTTP method is not allowed"}},"summary":"Проверить работу приложения","tags":["Диагностика"],"x-echo-order":10}},"/health/ready":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"status":{"description":"Текущее состояние","enum":["ready"],"type":"string"}},"required":["status"],"type":"object"}}},"description":"Health check passed"},"405":{"description":"HTTP method is not allowed"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthReadyResponse503"}}},"description":"Dependency is unavailable"}},"summary":"Проверить готовность приложения","tags":["Диагностика"],"x-echo-order":20}},"/health/status":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"status":{"description":"Текущее состояние","enum":["ready","degraded"],"type":"string"}},"required":["status"],"type":"object"}}},"description":"Health check passed"},"405":{"description":"HTTP method is not allowed"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthReadyResponse503"}}},"description":"Dependency is unavailable"}},"summary":"Получить общее состояние приложения","tags":["Диагностика"],"x-echo-order":30}},"/instructions":{"get":{"operationId":"instructions.get","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"files":{"items":{"additionalProperties":false,"properties":{"content":{"description":"Сохраненный текст сообщения","type":"string"},"path":{"type":"string"}},"required":["path","content"],"type":"object"},"maxItems":7,"minItems":7,"type":"array"}},"required":["files"],"type":"object"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Скачать инструкции Агента","tags":["Агент"],"x-echo-access":"read","x-echo-order":90}},"/me":{"get":{"operationId":"tokens.current","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"token":{"additionalProperties":false,"properties":{"access_level":{"enum":["read","write","full"],"type":"string"},"activated_at":{"description":"Дата активации токена","format":"date-time","type":["string","null"]},"created_at":{"description":"Время создания","format":"date-time","type":"string"},"id":{"description":"Идентификатор ресурса","format":"uuid","type":"string"},"label":{"description":"Имя токена","type":"string"},"last_used_at":{"description":"Последняя успешная аутентификация, включая текущий запрос","format":"date-time","type":["string","null"]},"prefix":{"description":"Отображаемый префикс для идентификации токена","type":"string"},"revoked_at":{"description":"Дата отзыва; у действующего токена null","format":"date-time","type":["string","null"]},"user_id":{"description":"Идентификатор владельца токена","format":"uuid","type":"string"}},"required":["id","user_id","label","access_level","prefix","created_at","activated_at","last_used_at","revoked_at"],"type":"object"}},"required":["token"],"type":"object"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить сведения о своем токене","tags":["Диагностика"],"x-echo-access":"read","x-echo-order":5}},"/messages":{"get":{"operationId":"messages.list","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"description":"Аккаунты авторов сообщений","in":"query","name":"author_account_ids","required":false,"schema":{"items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true}},{"$ref":"#/components/parameters/QueryAvailable"},{"description":"Идентификаторы веток","in":"query","name":"branch_ids","required":false,"schema":{"items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true}},{"$ref":"#/components/parameters/QueryCategoryIds"},{"$ref":"#/components/parameters/QueryChatIds"},{"$ref":"#/components/parameters/QueryContactIds"},{"$ref":"#/components/parameters/QueryCursor"},{"$ref":"#/components/parameters/QueryFrom"},{"$ref":"#/components/parameters/QueryPageSize"},{"$ref":"#/components/parameters/QueryPlatforms"},{"$ref":"#/components/parameters/QueryResultLimit"},{"in":"query","name":"scope_expansion","required":false,"schema":{"additionalProperties":false,"properties":{"chat_ids":{"items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"data_types":{"items":{"enum":["messages","task_history","action_plans"],"type":"string"},"type":"array","uniqueItems":true},"disclosure":{"maxLength":4000,"minLength":1,"type":"string"},"from":{"format":"date-time","type":"string"},"until":{"format":"date-time","type":"string"}},"required":["disclosure"],"type":"object"}},{"$ref":"#/components/parameters/QuerySectionIds"},{"$ref":"#/components/parameters/QuerySourceIds"},{"$ref":"#/components/parameters/QueryUngrouped"},{"$ref":"#/components/parameters/QueryUntil"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesListResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Найти сообщения","tags":["Поиск"],"x-echo-access":"read","x-echo-order":10}},"/messages/query":{"post":{"operationId":"messages.query","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"author_account_ids":{"description":"Аккаунты авторов сообщений","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"available":{"description":"Ресурс доступен","type":"boolean"},"branch_ids":{"description":"Идентификаторы веток","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"category_ids":{"description":"Идентификаторы категорий","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"chat_ids":{"description":"Идентификаторы чатов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"contact_ids":{"description":"Идентификаторы контактов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"cursor":{"description":"Непрозрачный курсор следующей страницы","type":"string"},"from":{"description":"Начало периода включительно","format":"date-time","type":"string"},"page_size":{"default":50,"description":"Размер страницы; значение 0 использует значение по умолчанию","maximum":200,"minimum":0,"type":"integer"},"platforms":{"description":"Мессенджеры","items":{"enum":["telegram","discord","whatsapp","max"],"type":"string"},"type":"array","uniqueItems":true},"relations":{"$ref":"#/components/schemas/Relations"},"result_limit":{"default":500,"description":"Общий предел результатов; значение 0 использует значение по умолчанию","maximum":500,"minimum":0,"type":"integer"},"scope_expansion":{"additionalProperties":false,"properties":{"chat_ids":{"description":"Идентификаторы чатов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"data_types":{"items":{"enum":["messages","task_history","action_plans"],"type":"string"},"type":"array","uniqueItems":true},"disclosure":{"maxLength":4000,"minLength":1,"type":"string"},"from":{"description":"Начало периода включительно","format":"date-time","type":"string"},"until":{"description":"Конец периода исключительно","format":"date-time","type":"string"}},"required":["disclosure"],"type":"object"},"section_ids":{"description":"Идентификаторы разделов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"ungrouped":{"description":"Отбор ресурсов без соответствующих связей","type":"boolean"},"until":{"description":"Конец периода исключительно","format":"date-time","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesListResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Найти сообщения по расширенным фильтрам","tags":["Поиск"],"x-echo-access":"read","x-echo-order":20}},"/messages/{platform}/{projection_id}":{"get":{"operationId":"messages.get","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"description":"Мессенджер","in":"path","name":"platform","required":true,"schema":{"enum":["telegram","discord","whatsapp","max"],"type":"string"}},{"description":"Идентификатор проекции сообщения внутри платформы","in":"path","name":"projection_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"item":{"$ref":"#/components/schemas/Message"}},"required":["item"],"type":"object"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить карточку сообщения","tags":["Поиск"],"x-echo-access":"read","x-echo-order":30}},"/sections":{"get":{"operationId":"sections.list","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"$ref":"#/components/parameters/QueryAvailable"},{"$ref":"#/components/parameters/QueryCategoryIds"},{"$ref":"#/components/parameters/QueryChatIds"},{"$ref":"#/components/parameters/QueryCursor"},{"$ref":"#/components/parameters/QueryFrom"},{"$ref":"#/components/parameters/QueryIds"},{"$ref":"#/components/parameters/QueryPageSize"},{"$ref":"#/components/parameters/QueryResultLimit"},{"$ref":"#/components/parameters/QueryUngrouped"},{"$ref":"#/components/parameters/QueryUntil"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionsListResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить список разделов","tags":["Классификация"],"x-echo-access":"read","x-echo-order":50}},"/sections/query":{"post":{"operationId":"sections.query","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"available":{"description":"Ресурс доступен","type":"boolean"},"category_ids":{"description":"Идентификаторы категорий","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"chat_ids":{"description":"Идентификаторы чатов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"cursor":{"description":"Непрозрачный курсор следующей страницы","type":"string"},"from":{"description":"Начало периода включительно","format":"date-time","type":"string"},"ids":{"description":"Идентификаторы ресурсов для отбора","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"page_size":{"default":50,"description":"Размер страницы; значение 0 использует значение по умолчанию","maximum":200,"minimum":0,"type":"integer"},"result_limit":{"default":500,"description":"Общий предел результатов; значение 0 использует значение по умолчанию","maximum":500,"minimum":0,"type":"integer"},"ungrouped":{"description":"Отбор ресурсов без соответствующих связей","type":"boolean"},"until":{"description":"Конец периода исключительно","format":"date-time","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionsListResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Найти разделы по расширенным фильтрам","tags":["Классификация"],"x-echo-access":"read","x-echo-order":60}},"/sections/{section_id}":{"get":{"operationId":"sections.get","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"description":"Идентификатор раздела","in":"path","name":"section_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"item":{"$ref":"#/components/schemas/ChatSection"}},"required":["item"],"type":"object"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить карточку раздела","tags":["Классификация"],"x-echo-access":"read","x-echo-order":70}},"/sources":{"get":{"operationId":"sources.list","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"$ref":"#/components/parameters/QueryAvailable"},{"$ref":"#/components/parameters/QueryCursor"},{"$ref":"#/components/parameters/QueryFrom"},{"$ref":"#/components/parameters/QueryIds"},{"$ref":"#/components/parameters/QueryPageSize"},{"$ref":"#/components/parameters/QueryPlatforms"},{"$ref":"#/components/parameters/QueryResultLimit"},{"$ref":"#/components/parameters/QueryUntil"}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"page":{"additionalProperties":false,"description":"Страница результатов","properties":{"items":{"description":"Элементы текущей страницы","items":{"$ref":"#/components/schemas/Source"},"type":"array"},"next_cursor":{"description":"Курсор следующей страницы; отсутствует, если страниц больше нет","type":"string"}},"required":["items"],"type":"object"}},"required":["page"],"type":"object"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить список источников","tags":["Источники"],"x-echo-access":"read","x-echo-order":10}},"/sources/{source_id}":{"get":{"operationId":"sources.get","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"description":"Идентификатор источника","in":"path","name":"source_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"item":{"$ref":"#/components/schemas/Source"}},"required":["item"],"type":"object"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить источник","tags":["Источники"],"x-echo-access":"read","x-echo-order":30}},"/tasks":{"get":{"operationId":"tasks.list","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"$ref":"#/components/parameters/QueryCursor"},{"$ref":"#/components/parameters/QueryFrom"},{"$ref":"#/components/parameters/QueryIds"},{"$ref":"#/components/parameters/QueryPageSize"},{"$ref":"#/components/parameters/QueryResultLimit"},{"$ref":"#/components/parameters/QueryUntil"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TasksListResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить список задач Агента","tags":["Агент"],"x-echo-access":"read","x-echo-order":10},"post":{"operationId":"tasks.create","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"$ref":"#/components/parameters/HeaderIdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"allOf":[{"if":{"properties":{"kind":{"description":"Вид задачи или ветки","enum":["summary"],"type":"string"}}},"then":{"required":["scope"]}},{"if":{"properties":{"kind":{"description":"Вид задачи или ветки","enum":["message_context"],"type":"string"}}},"then":{"required":["scope","source_message_ref"]}}],"properties":{"continued_from_task_id":{"format":"uuid","type":"string"},"focus":{"maxLength":16000,"type":"string"},"kind":{"description":"Вид задачи или ветки","enum":["dialog","summary","message_context"],"type":"string"},"scope":{"additionalProperties":false,"description":"Выбранные чаты и ветки","properties":{"author_account_ids":{"description":"Аккаунты авторов сообщений","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"available":{"description":"Ресурс доступен","type":"boolean"},"branch_ids":{"description":"Идентификаторы веток","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"category_ids":{"description":"Идентификаторы категорий","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"chat_ids":{"description":"Идентификаторы чатов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"contact_ids":{"description":"Идентификаторы контактов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"found_refs":{"items":{"$ref":"#/components/schemas/Items"},"type":"array","uniqueItems":true},"from":{"description":"Начало периода включительно","format":"date-time","type":"string"},"platforms":{"description":"Мессенджеры","items":{"enum":["telegram","discord","whatsapp","max"],"type":"string"},"type":"array","uniqueItems":true},"section_ids":{"description":"Идентификаторы разделов","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"source_ids":{"description":"Идентификаторы источников","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"ungrouped":{"description":"Отбор ресурсов без соответствующих связей","type":"boolean"},"until":{"description":"Конец периода исключительно","format":"date-time","type":"string"}},"type":"object"},"source_message_ref":{"$ref":"#/components/schemas/Items"}},"required":["kind"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TasksCommandsResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TasksCommandsResponse"}}},"description":"Mutation accepted","headers":{"Location":{"description":"Canonical URL of the accepted resource","schema":{"format":"uri-reference","type":"string"}},"Retry-After":{"description":"Optional delay in seconds before polling","schema":{"minimum":1,"type":"integer"}},"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Создать задачу Агента","tags":["Агент"],"x-echo-access":"write","x-echo-order":40}},"/tasks/query":{"post":{"operationId":"tasks.query","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"cursor":{"description":"Непрозрачный курсор следующей страницы","type":"string"},"from":{"description":"Начало периода включительно","format":"date-time","type":"string"},"ids":{"description":"Идентификаторы ресурсов для отбора","items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"page_size":{"default":50,"description":"Размер страницы; значение 0 использует значение по умолчанию","maximum":200,"minimum":0,"type":"integer"},"result_limit":{"default":500,"description":"Общий предел результатов; значение 0 использует значение по умолчанию","maximum":500,"minimum":0,"type":"integer"},"until":{"description":"Конец периода исключительно","format":"date-time","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TasksListResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Найти задачи Агента по расширенным фильтрам","tags":["Агент"],"x-echo-access":"read","x-echo-order":20}},"/tasks/{task_id}":{"get":{"operationId":"tasks.get","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"$ref":"#/components/parameters/PathTaskId"}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"item":{"$ref":"#/components/schemas/AgentTask"}},"required":["item"],"type":"object"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить задачу Агента","tags":["Агент"],"x-echo-access":"read","x-echo-order":30}},"/tasks/{task_id}/commands":{"post":{"operationId":"tasks.commands","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"$ref":"#/components/parameters/HeaderIdempotencyKey"},{"$ref":"#/components/parameters/PathTaskId"}],"requestBody":{"content":{"application/json":{"schema":{"discriminator":{"propertyName":"command"},"oneOf":[{"additionalProperties":false,"properties":{"command":{"description":"Команда управления","enum":["resume"],"type":"string"}},"required":["command"],"title":"resume","type":"object"},{"additionalProperties":false,"properties":{"command":{"description":"Команда управления","enum":["stop"],"type":"string"}},"required":["command"],"title":"stop","type":"object"}]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TasksCommandsResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TasksCommandsResponse"}}},"description":"Mutation accepted","headers":{"Location":{"description":"Canonical URL of the accepted resource","schema":{"format":"uri-reference","type":"string"}},"Retry-After":{"description":"Optional delay in seconds before polling","schema":{"minimum":1,"type":"integer"}},"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Остановить или возобновить задачу Агента","tags":["Агент"],"x-echo-operation-variants":[{"operation_id":"tasks.resume","x-echo-access":"write","x-echo-execution-class":"direct_mutation"},{"operation_id":"tasks.stop","x-echo-access":"write","x-echo-execution-class":"direct_mutation"}],"x-echo-order":50}},"/tasks/{task_id}/turns":{"get":{"operationId":"turns.list","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"$ref":"#/components/parameters/PathTaskId"},{"$ref":"#/components/parameters/QueryCursor"},{"$ref":"#/components/parameters/QueryFrom"},{"$ref":"#/components/parameters/QueryPageSize"},{"$ref":"#/components/parameters/QueryResultLimit"},{"$ref":"#/components/parameters/QueryUntil"}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"page":{"additionalProperties":false,"description":"Страница результатов","properties":{"items":{"description":"Элементы текущей страницы","items":{"$ref":"#/components/schemas/AgentRequest"},"type":"array"},"next_cursor":{"description":"Курсор следующей страницы; отсутствует, если страниц больше нет","type":"string"}},"required":["items"],"type":"object"}},"required":["page"],"type":"object"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить список запросов в задаче","tags":["Агент"],"x-echo-access":"read","x-echo-order":60},"post":{"operationId":"turns.create","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"$ref":"#/components/parameters/HeaderIdempotencyKey"},{"$ref":"#/components/parameters/PathTaskId"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"prompt":{"description":"Запрос Агенту","minLength":1,"type":"string"}},"required":["prompt"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TasksCommandsResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TasksCommandsResponse"}}},"description":"Mutation accepted","headers":{"Location":{"description":"Canonical URL of the accepted resource","schema":{"format":"uri-reference","type":"string"}},"Retry-After":{"description":"Optional delay in seconds before polling","schema":{"minimum":1,"type":"integer"}},"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Отправить запрос Агенту","tags":["Агент"],"x-echo-access":"write","x-echo-order":70}},"/turns/{turn_id}":{"get":{"operationId":"turns.get","parameters":[{"$ref":"#/components/parameters/HeaderXRequestID"},{"in":"path","name":"turn_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnsGetResponse"}}},"description":"Operation completed","headers":{"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnsGetResponse"}}},"description":"Turn is active; poll Location after Retry-After","headers":{"Location":{"description":"Canonical URL of this turn for polling","schema":{"format":"uri-reference","type":"string"}},"Retry-After":{"description":"Delay in seconds before the next poll","schema":{"minimum":1,"type":"integer"}},"X-Request-ID":{"schema":{"format":"uuid","type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Получить состояние и результат запроса","tags":["Агент"],"x-echo-access":"read","x-echo-order":80}}},"tags":[{"name":"Поиск"},{"name":"Действия"},{"name":"Источники"},{"name":"Чаты"},{"name":"Классификация"},{"name":"Авторы"},{"name":"Агент"},{"name":"Диагностика"}],"x-echo-git-sha":"cbaae4d7b2b6ac5016283302232b474b845ebd22","x-echo-max-body-bytes":1048576,"x-echo-rate-limit":{"burst":30,"requests_per_minute":120}}