{"openapi": "3.0.3", "info": {"title": "Cliento Integration API", "version": "1.0.0", "description": "Ключи выдаёт владелец Cliento. Только HTTPS, ключ в Authorization: Bearer. Не является OAuth-сервером. Управление ключами не доступно внешним ключам. Внутренние заметки и рабочая группа MAX не экспортируются."}, "servers": [{"url": "/api/v1"}], "paths": {"/status": {"get": {"summary": "Статус сервиса", "description": "Требуется право status:read. Доступ ограничен выбранными площадками.", "security": [{"integrationKey": []}], "responses": {"200": {"description": "Успех"}, "401": {"description": "Ключ недействителен"}, "403": {"description": "Недостаточно прав"}, "429": {"description": "Лимит 60 запросов в минуту; Retry-After"}}}}, "/channels": {"get": {"summary": "Статусы разрешённых площадок", "description": "Требуется право channels:read. Доступ ограничен выбранными площадками.", "security": [{"integrationKey": []}], "responses": {"200": {"description": "Успех"}, "401": {"description": "Ключ недействителен"}, "403": {"description": "Недостаточно прав"}, "429": {"description": "Лимит 60 запросов в минуту; Retry-After"}}}}, "/cases": {"get": {"summary": "Список обращений с пагинацией", "description": "Требуется право cases:read. Доступ ограничен выбранными площадками.", "security": [{"integrationKey": []}], "responses": {"200": {"description": "Успех"}, "401": {"description": "Ключ недействителен"}, "403": {"description": "Недостаточно прав"}, "429": {"description": "Лимит 60 запросов в минуту; Retry-After"}}, "parameters": [{"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}, {"name": "channel", "in": "query", "schema": {"type": "string", "enum": ["Wildberries", "Ozon", "Lamoda", "Яндекс Маркет", "Яндекс Карты", "2ГИС", "Авито", "Авито · Подбор персонала", "VK", "ОК", "Telegram", "WhatsApp", "Instagram", "MAX · Клиенты", "YouTube", "VK Видео", "Rutube", "Сайт MILANA", "Электронная почта", "Facebook", "Threads", "Pinterest", "X", "LinkedIn", "Дзен", "TikTok", "TenChat", "Likee", "Snapchat", "Reddit", "WeChat", "Twitch", "Дзен Видео", "Viber", "Discord", "Google Maps", "Apple Maps", "Flamp", "Zoon", "Yell"]}}, {"name": "status", "in": "query", "schema": {"type": "string"}}]}, "post": {"summary": "Создать обращение без дублей", "description": "Требуется право cases:create. Доступ ограничен выбранными площадками.", "security": [{"integrationKey": []}], "responses": {"201": {"description": "Успех"}, "401": {"description": "Ключ недействителен"}, "403": {"description": "Недостаточно прав"}, "429": {"description": "Лимит 60 запросов в минуту; Retry-After"}, "409": {"description": "Конфликт версии, источника или номера запроса"}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NewCase"}}}}, "parameters": [{"name": "Idempotency-Key", "in": "header", "required": true, "schema": {"type": "string", "minLength": 8, "maxLength": 128}}]}}, "/cases/{id}": {"get": {"summary": "Карточка обращения", "description": "Требуется право cases:read. Доступ ограничен выбранными площадками.", "security": [{"integrationKey": []}], "responses": {"200": {"description": "Успех"}, "401": {"description": "Ключ недействителен"}, "403": {"description": "Недостаточно прав"}, "429": {"description": "Лимит 60 запросов в минуту; Retry-After"}}, "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "minimum": 1}}]}}, "/cases/{id}/messages": {"get": {"summary": "Входящая переписка", "description": "Требуется право messages:read. Доступ ограничен выбранными площадками.", "security": [{"integrationKey": []}], "responses": {"200": {"description": "Успех"}, "401": {"description": "Ключ недействителен"}, "403": {"description": "Недостаточно прав"}, "429": {"description": "Лимит 60 запросов в минуту; Retry-After"}}, "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "minimum": 1}}]}}, "/cases/{id}/draft": {"post": {"summary": "Сохранить проект; согласование и отправка недоступны", "description": "Требуется право drafts:write. Доступ ограничен выбранными площадками.", "security": [{"integrationKey": []}], "responses": {"200": {"description": "Успех"}, "401": {"description": "Ключ недействителен"}, "403": {"description": "Недостаточно прав"}, "429": {"description": "Лимит 60 запросов в минуту; Retry-After"}, "409": {"description": "Конфликт версии, источника или номера запроса"}}, "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "minimum": 1}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Draft"}}}}}}}, "components": {"securitySchemes": {"integrationKey": {"type": "http", "scheme": "bearer", "bearerFormat": "Cliento API key"}}, "schemas": {"NewCase": {"type": "object", "additionalProperties": false, "required": ["channel", "source_account", "external_id", "kind", "text"], "properties": {"channel": {"type": "string", "enum": ["Wildberries", "Ozon", "Lamoda", "Яндекс Маркет", "Яндекс Карты", "2ГИС", "Авито", "Авито · Подбор персонала", "VK", "ОК", "Telegram", "WhatsApp", "Instagram", "MAX · Клиенты", "YouTube", "VK Видео", "Rutube", "Сайт MILANA", "Электронная почта", "Facebook", "Threads", "Pinterest", "X", "LinkedIn", "Дзен", "TikTok", "TenChat", "Likee", "Snapchat", "Reddit", "WeChat", "Twitch", "Дзен Видео", "Viber", "Discord", "Google Maps", "Apple Maps", "Flamp", "Zoon", "Yell"]}, "source_account": {"type": "string", "minLength": 1, "maxLength": 100}, "external_id": {"type": "string", "minLength": 1, "maxLength": 200}, "kind": {"type": "string", "enum": ["Вопрос", "Отзыв", "Предложение", "Личное сообщение", "Комментарий", "Чат", "Письмо"]}, "text": {"type": "string", "minLength": 1, "maxLength": 12000}, "sku": {"type": "string", "maxLength": 200}, "source_url": {"type": "string", "format": "uri", "maxLength": 2048, "description": "Необязательная HTTPS-ссылка для Яндекс Карт, 2ГИС и RUTUBE"}}}, "Draft": {"type": "object", "additionalProperties": false, "required": ["version", "draft"], "properties": {"version": {"type": "integer", "minimum": 1}, "draft": {"type": "string", "minLength": 1, "maxLength": 12000}, "analysis": {"type": "object", "additionalProperties": false, "required": ["category", "summary", "facts_used", "missing_facts", "escalation_reason"], "properties": {"category": {"type": "string", "enum": ["Отзыв", "Вопрос", "Чат", "Предложение", "Претензия", "Кандидат"]}, "urgency": {"type": "string", "enum": ["Обычная", "Высокая", "Срочная"]}, "summary": {"type": "string", "maxLength": 1000}, "facts_used": {"type": "array", "maxItems": 10, "items": {"type": "string", "maxLength": 500}}, "missing_facts": {"type": "array", "maxItems": 10, "items": {"type": "string", "maxLength": 500}}, "escalation_reason": {"type": "string", "maxLength": 1000}}}}}}}}