{
  "product": "Senden API",
  "baseUrl": "https://api-senden.ru/api/v1",
  "authentication": {
    "type": "bearer",
    "environmentVariable": "SENDEN_API_KEY",
    "header": "Authorization: Bearer <NAMED_SENDEN_API_KEY>",
    "keyCreation": "Create a named key in the browser account page. Session-only account/admin endpoints do not accept API keys.",
    "scopes": {
      "read": "GET/HEAD/OPTIONS and native POST operations marked mutation=false",
      "write": "All other POST/PUT/PATCH/DELETE, including notification receive because it leases an event"
    }
  },
  "discovery": [
    "GET /api/v1/integrations/manifest is the primary discovery endpoint: full HTTP commands, safe workspace instances, connectedMessengers, permissions and file links",
    "GET /api/v1/instances can be filtered by state=connected on the client; there is no server state query parameter",
    "GET /api/v1/methods is the native-operation subset, not the full HTTP API",
    "GET /api/v1/instances/{id}/chats"
  ],
  "rules": [
    "Use /api/v1 exclusively. Select only instance IDs belonging to the authenticated workspace.",
    "Send only after an explicit user request. Discovery never sends a message or starts messenger authentication.",
    "Use a chat ID returned by GET /instances/{id}/chats, not a phone number or a contact lookup result.",
    "MAX contacts.lookup currently returns a user ID under chatId. It is not a ready-to-send private chat ID; do not substitute it for to.",
    "Native operations and chats require a connected instance; support differs by messenger. Consult supportedBy and requiresConnection in GET /methods.",
    "Message enqueue can persist while offline. HTTP 202 and queued/submitted are not delivery or read confirmations.",
    "Keep one stable Idempotency-Key (8..128 characters) for the same logical send or native mutation and the same parameters. A changed body with the same key conflicts.",
    "Never automatically retry delivery_unknown/native_command_unknown or create a new key after an ambiguous outcome. Inspect the message/queue and messenger first.",
    "Clients implement no automatic retries or failover. Protect API keys in environment/secret storage; never include them in prompts, logs or browser code.",
    "Upload is a separate explicit action, not an idempotent send. Sending an uploaded file requires its fileId and an explicit Idempotency-Key.",
    "GET /files/{fileId} returns the local upload, not a verified remote messenger copy. Attachment metadata and remote download support vary by messenger.",
    "Notification receive is POST and has side effects (a lease). Acknowledge only after successful processing. Webhooks may repeat; deduplicate by event ID."
  ],
  "limits": {
    "uploadBytes": 20971520,
    "textCharacters": 16000,
    "filenameCharacters": 180,
    "historyPageLimit": 200,
    "messageQueuePageLimit": 100,
    "notificationWaitSeconds": 60,
    "apiRequestsPerMinute": 600,
    "note": "Workspace quotas and live service limits also apply; 429 can represent rate, concurrency or storage backlog limits."
  },
  "errors": {
    "envelope": {
      "error": {
        "code": "<MACHINE_CODE>",
        "message": "<SAFE_DESCRIPTION>"
      }
    },
    "statuses": {
      "400": "Validation or malformed JSON",
      "401": "Missing, expired or revoked credentials",
      "403": "Scope or session/Origin restriction",
      "404": "Unknown route, instance, resource, or another workspace",
      "409": "State/idempotency conflict or uncertain/running native command",
      "413": "Request or file too large",
      "429": "Rate/quota/concurrency/backlog limit",
      "501": "Unsupported operation for this messenger",
      "503": "Transport unavailable or ambiguous native outcome; do not blindly repeat"
    }
  },
  "routes": [
    {
      "path": "/api/v1/config",
      "method": "PUT",
      "summary": "Настройки приложения и сетевых подключений",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/events",
      "method": "GET",
      "summary": "События с курсором",
      "scope": "read",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/files",
      "method": "POST",
      "summary": "Загрузить файл до 20 МБ",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/files/{fileId}",
      "method": "GET",
      "summary": "Скачать ранее загруженный локальный файл",
      "scope": "read",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/health",
      "method": "GET",
      "summary": "Проверка процесса",
      "scope": "read",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances",
      "method": "GET",
      "summary": "Получить активные или архивные подключения",
      "scope": "read",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances",
      "method": "POST",
      "summary": "Создать подключение",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {
        "name": "Новое подключение",
        "messenger": "max"
      }
    },
    {
      "path": "/api/v1/instances/{id}",
      "method": "DELETE",
      "summary": "Остановить и архивировать подключение с сохранением истории и сессии",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}",
      "method": "GET",
      "summary": "Состояние подключения",
      "scope": "read",
      "requiresConnection": false,
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}",
      "method": "PATCH",
      "summary": "Изменить название подключения",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {
        "name": "Название подключения"
      }
    },
    {
      "path": "/api/v1/instances/{id}/auth",
      "method": "POST",
      "summary": "Продолжить текущий шаг входа",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/chats",
      "method": "GET",
      "summary": "Получить чаты",
      "scope": "read",
      "requiresConnection": true,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/connect",
      "method": "POST",
      "summary": "Начать вход",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {
        "mode": "qr"
      }
    },
    {
      "path": "/api/v1/instances/{id}/deliveries",
      "method": "GET",
      "summary": "Результаты доставки webhook",
      "scope": "read",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/deliveries/{jobId}/attempts",
      "method": "GET",
      "summary": "Журнал попыток webhook",
      "scope": "read",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/deliveries/{jobId}/retry",
      "method": "POST",
      "summary": "Повторить webhook из dead-letter",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/deliveries/clear",
      "method": "POST",
      "summary": "Отменить ожидающие, повторяемые и dead-letter webhook",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/deliveries/stats",
      "method": "GET",
      "summary": "Счётчики заданий webhook",
      "scope": "read",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/logout",
      "method": "POST",
      "summary": "Запросить выход",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/messages",
      "method": "GET",
      "summary": "Сохранённая история сообщений",
      "scope": "read",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/messages",
      "method": "POST",
      "summary": "Поставить текст или файл в очередь",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": true,
      "example": {
        "to": "{{chatId}}",
        "text": "Сообщение из вашей интеграции"
      }
    },
    {
      "path": "/api/v1/instances/{id}/messages/from-url",
      "method": "POST",
      "summary": "Безопасно загрузить HTTPS-файл и поставить документ в очередь",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": true,
      "example": {
        "to": "{{chatId}}",
        "urlFile": "https://files.example.org/document.pdf",
        "fileName": "document.pdf",
        "caption": "Документ"
      }
    },
    {
      "path": "/api/v1/instances/{id}/notifications/{receiptId}",
      "method": "DELETE",
      "summary": "Подтвердить обработку текущей квитанции",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/notifications/receive",
      "method": "POST",
      "summary": "Получить уведомление с арендой и ожиданием",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {
        "timeoutSeconds": 0,
        "leaseSeconds": 30
      }
    },
    {
      "path": "/api/v1/instances/{id}/notifications/stats",
      "method": "GET",
      "summary": "Число ожидающих и обработанных уведомлений",
      "scope": "read",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/operations/account.settings.get",
      "method": "POST",
      "summary": "Профиль подключённого аккаунта",
      "scope": "read",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "nativeOperation": "account.settings.get",
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/operations/chats.archive",
      "method": "POST",
      "summary": "Архивировать чат",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram"
      ],
      "nativeOperation": "chats.archive",
      "idempotencyRequired": true,
      "example": {
        "chatId": "{{chatId}}"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/chats.expiration",
      "method": "POST",
      "summary": "Настроить исчезающие сообщения",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram"
      ],
      "nativeOperation": "chats.expiration",
      "idempotencyRequired": true,
      "example": {
        "chatId": "{{chatId}}",
        "ephemeralExpiration": 86400
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/chats.reactions",
      "method": "POST",
      "summary": "Получить доступные реакции",
      "scope": "read",
      "requiresConnection": true,
      "supportedBy": [
        "telegram"
      ],
      "nativeOperation": "chats.reactions",
      "idempotencyRequired": false,
      "example": {
        "chatId": "{{chatId}}"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/chats.typing",
      "method": "POST",
      "summary": "Показать индикатор набора",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram"
      ],
      "nativeOperation": "chats.typing",
      "idempotencyRequired": true,
      "example": {
        "chatId": "{{chatId}}"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/chats.unarchive",
      "method": "POST",
      "summary": "Вернуть чат из архива",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram"
      ],
      "nativeOperation": "chats.unarchive",
      "idempotencyRequired": true,
      "example": {
        "chatId": "{{chatId}}"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/contacts.create",
      "method": "POST",
      "summary": "Добавить контакт",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "telegram",
        "max"
      ],
      "nativeOperation": "contacts.create",
      "idempotencyRequired": true,
      "example": {
        "chatId": "{{chatId}}",
        "firstName": "Имя",
        "phoneNumber": "{{phoneNumber}}"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/contacts.delete",
      "method": "POST",
      "summary": "Удалить контакт",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "telegram",
        "max"
      ],
      "nativeOperation": "contacts.delete",
      "idempotencyRequired": true,
      "example": {
        "chatId": "{{chatId}}"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/contacts.get",
      "method": "POST",
      "summary": "Информация о контакте",
      "scope": "read",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "nativeOperation": "contacts.get",
      "idempotencyRequired": false,
      "example": {
        "chatId": "{{chatId}}"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/contacts.list",
      "method": "POST",
      "summary": "Список контактов",
      "scope": "read",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "nativeOperation": "contacts.list",
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/operations/contacts.lookup",
      "method": "POST",
      "summary": "Проверить наличие аккаунта по телефону или ID",
      "scope": "read",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "nativeOperation": "contacts.lookup",
      "idempotencyRequired": false,
      "example": {
        "phoneNumber": "{{phoneNumber}}"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/contacts.update",
      "method": "POST",
      "summary": "Изменить контакт",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "telegram"
      ],
      "nativeOperation": "contacts.update",
      "idempotencyRequired": true,
      "example": {
        "chatId": "{{chatId}}",
        "firstName": "Новое имя"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/groups.admins.add",
      "method": "POST",
      "summary": "Назначить администратора группы",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp"
      ],
      "nativeOperation": "groups.admins.add",
      "idempotencyRequired": true,
      "example": {
        "groupId": "{{groupId}}",
        "participantChatId": "{{participantChatId}}"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/groups.admins.remove",
      "method": "POST",
      "summary": "Снять администратора группы",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp"
      ],
      "nativeOperation": "groups.admins.remove",
      "idempotencyRequired": true,
      "example": {
        "groupId": "{{groupId}}",
        "participantChatId": "{{participantChatId}}"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/groups.create",
      "method": "POST",
      "summary": "Создать группу",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "nativeOperation": "groups.create",
      "idempotencyRequired": true,
      "example": {
        "groupName": "Моя группа",
        "chatIds": [
          "CHAT_ID"
        ]
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/groups.get",
      "method": "POST",
      "summary": "Информация о группе",
      "scope": "read",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "nativeOperation": "groups.get",
      "idempotencyRequired": false,
      "example": {
        "groupId": "{{groupId}}"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/groups.leave",
      "method": "POST",
      "summary": "Покинуть группу",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "nativeOperation": "groups.leave",
      "idempotencyRequired": true,
      "example": {
        "groupId": "{{groupId}}"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/groups.members.add",
      "method": "POST",
      "summary": "Добавить участника",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "nativeOperation": "groups.members.add",
      "idempotencyRequired": true,
      "example": {
        "groupId": "{{groupId}}",
        "participantChatId": "{{participantChatId}}"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/groups.members.remove",
      "method": "POST",
      "summary": "Удалить участника",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "nativeOperation": "groups.members.remove",
      "idempotencyRequired": true,
      "example": {
        "groupId": "{{groupId}}",
        "participantChatId": "{{participantChatId}}"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/groups.rename",
      "method": "POST",
      "summary": "Изменить название группы",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram"
      ],
      "nativeOperation": "groups.rename",
      "idempotencyRequired": true,
      "example": {
        "groupId": "{{groupId}}",
        "groupName": "Новое название"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/groups.settings",
      "method": "POST",
      "summary": "Изменить одно разрешение группы",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp"
      ],
      "nativeOperation": "groups.settings",
      "idempotencyRequired": true,
      "example": {
        "groupId": "{{groupId}}",
        "announcement": true
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/messages.contact",
      "method": "POST",
      "summary": "Отправить карточку контакта",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram"
      ],
      "nativeOperation": "messages.contact",
      "idempotencyRequired": true,
      "example": {
        "chatId": "{{chatId}}",
        "contact": {
          "phoneContact": "{{phoneNumber}}",
          "firstName": "Имя"
        }
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/messages.delete",
      "method": "POST",
      "summary": "Удалить сообщение",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "nativeOperation": "messages.delete",
      "idempotencyRequired": true,
      "example": {
        "chatId": "{{chatId}}",
        "idMessage": "{{providerMessageId}}",
        "onlySenderDelete": false
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/messages.edit",
      "method": "POST",
      "summary": "Изменить текст сообщения",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "nativeOperation": "messages.edit",
      "idempotencyRequired": true,
      "example": {
        "chatId": "{{chatId}}",
        "idMessage": "{{providerMessageId}}",
        "message": "Новый текст"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/messages.forward",
      "method": "POST",
      "summary": "Переслать выбранные сообщения",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "nativeOperation": "messages.forward",
      "idempotencyRequired": true,
      "example": {
        "chatId": "{{chatId}}",
        "chatIdFrom": "{{chatId}}",
        "messages": [
          "{{providerMessageId}}"
        ]
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/messages.get",
      "method": "POST",
      "summary": "Получить сообщение из мессенджера",
      "scope": "read",
      "requiresConnection": true,
      "supportedBy": [
        "telegram",
        "max"
      ],
      "nativeOperation": "messages.get",
      "idempotencyRequired": false,
      "example": {
        "chatId": "{{chatId}}",
        "idMessage": "{{providerMessageId}}"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/messages.history",
      "method": "POST",
      "summary": "Загрузить историю из мессенджера",
      "scope": "read",
      "requiresConnection": true,
      "supportedBy": [
        "telegram",
        "max"
      ],
      "nativeOperation": "messages.history",
      "idempotencyRequired": false,
      "example": {
        "chatId": "{{chatId}}",
        "count": 50
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/messages.location",
      "method": "POST",
      "summary": "Отправить местоположение",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram"
      ],
      "nativeOperation": "messages.location",
      "idempotencyRequired": true,
      "example": {
        "chatId": "{{chatId}}",
        "latitude": 55.75,
        "longitude": 37.62
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/messages.poll",
      "method": "POST",
      "summary": "Отправить опрос",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram"
      ],
      "nativeOperation": "messages.poll",
      "idempotencyRequired": true,
      "example": {
        "chatId": "{{chatId}}",
        "message": "Ваш выбор?",
        "options": [
          "Первый",
          "Второй"
        ]
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/messages.react",
      "method": "POST",
      "summary": "Изменить реакцию на сообщение",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "nativeOperation": "messages.react",
      "idempotencyRequired": true,
      "example": {
        "chatId": "{{chatId}}",
        "idMessage": "{{providerMessageId}}",
        "reaction": "👍"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/messages.read",
      "method": "POST",
      "summary": "Отметить сообщения прочитанными",
      "scope": "write",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "nativeOperation": "messages.read",
      "idempotencyRequired": true,
      "example": {
        "chatId": "{{chatId}}"
      }
    },
    {
      "path": "/api/v1/instances/{id}/operations/profile.avatar.get",
      "method": "POST",
      "summary": "Получить аватар",
      "scope": "read",
      "requiresConnection": true,
      "supportedBy": [
        "whatsapp"
      ],
      "nativeOperation": "profile.avatar.get",
      "idempotencyRequired": false,
      "example": {
        "chatId": "{{chatId}}"
      }
    },
    {
      "path": "/api/v1/instances/{id}/queue",
      "method": "GET",
      "summary": "Постоянная очередь сообщений",
      "scope": "read",
      "requiresConnection": false,
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/queue/{messageId}/cancel",
      "method": "POST",
      "summary": "Отменить одно queued сообщение",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/queue/{messageId}/retry",
      "method": "POST",
      "summary": "Повторить только подтверждённую ошибку failed",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/queue/clear",
      "method": "POST",
      "summary": "Отменить все queued сообщения",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/restore",
      "method": "POST",
      "summary": "Восстановить из архива в пределах лимитов, без автоматического подключения",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/settings",
      "method": "GET",
      "summary": "Настройки подключения и событий",
      "scope": "read",
      "requiresConnection": false,
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/instances/{id}/settings",
      "method": "PUT",
      "summary": "Изменить настройки",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {
        "sendDelayMs": 1000
      }
    },
    {
      "path": "/api/v1/instances/{id}/stop",
      "method": "POST",
      "summary": "Остановить с сохранением сессии",
      "scope": "write",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/integrations/files/{name}",
      "method": "GET",
      "summary": "Скачать шаблон интеграции или общий ZIP без личных данных",
      "scope": "read",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/integrations/manifest",
      "method": "GET",
      "summary": "Подключения текущего пространства, команды и готовые файлы интеграции без ключей и данных авторизации",
      "scope": "read",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/methods",
      "method": "GET",
      "summary": "Каталог доступных операций",
      "scope": "read",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/status",
      "method": "GET",
      "summary": "Подключения и состояния",
      "scope": "read",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    },
    {
      "path": "/api/v1/stream",
      "method": "GET",
      "summary": "Поток событий SSE",
      "scope": "read",
      "requiresConnection": false,
      "idempotencyRequired": false,
      "example": {}
    }
  ],
  "nativeMethods": [
    {
      "name": "account.settings.get",
      "path": "/api/v1/instances/{id}/operations/account.settings.get",
      "httpMethod": "POST",
      "category": "Аккаунт",
      "description": "Профиль подключённого аккаунта",
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": false,
      "example": {}
    },
    {
      "name": "contacts.list",
      "path": "/api/v1/instances/{id}/operations/contacts.list",
      "httpMethod": "POST",
      "category": "Контакты",
      "description": "Список контактов",
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": false,
      "example": {}
    },
    {
      "name": "contacts.get",
      "path": "/api/v1/instances/{id}/operations/contacts.get",
      "httpMethod": "POST",
      "category": "Контакты",
      "description": "Информация о контакте",
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": false,
      "example": {
        "chatId": "{{chatId}}"
      }
    },
    {
      "name": "contacts.lookup",
      "path": "/api/v1/instances/{id}/operations/contacts.lookup",
      "httpMethod": "POST",
      "category": "Контакты",
      "description": "Проверить наличие аккаунта по телефону или ID",
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": false,
      "example": {
        "phoneNumber": "{{phoneNumber}}"
      }
    },
    {
      "name": "contacts.create",
      "path": "/api/v1/instances/{id}/operations/contacts.create",
      "httpMethod": "POST",
      "category": "Контакты",
      "description": "Добавить контакт",
      "supportedBy": [
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "chatId": "{{chatId}}",
        "firstName": "Имя",
        "phoneNumber": "{{phoneNumber}}"
      }
    },
    {
      "name": "contacts.update",
      "path": "/api/v1/instances/{id}/operations/contacts.update",
      "httpMethod": "POST",
      "category": "Контакты",
      "description": "Изменить контакт",
      "supportedBy": [
        "telegram"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "chatId": "{{chatId}}",
        "firstName": "Новое имя"
      }
    },
    {
      "name": "contacts.delete",
      "path": "/api/v1/instances/{id}/operations/contacts.delete",
      "httpMethod": "POST",
      "category": "Контакты",
      "description": "Удалить контакт",
      "supportedBy": [
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "chatId": "{{chatId}}"
      }
    },
    {
      "name": "profile.avatar.get",
      "path": "/api/v1/instances/{id}/operations/profile.avatar.get",
      "httpMethod": "POST",
      "category": "Аккаунт",
      "description": "Получить аватар",
      "supportedBy": [
        "whatsapp"
      ],
      "requiresConnection": true,
      "mutation": false,
      "example": {
        "chatId": "{{chatId}}"
      }
    },
    {
      "name": "messages.history",
      "path": "/api/v1/instances/{id}/operations/messages.history",
      "httpMethod": "POST",
      "category": "Сообщения",
      "description": "Загрузить историю из мессенджера",
      "supportedBy": [
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": false,
      "example": {
        "chatId": "{{chatId}}",
        "count": 50
      }
    },
    {
      "name": "messages.get",
      "path": "/api/v1/instances/{id}/operations/messages.get",
      "httpMethod": "POST",
      "category": "Сообщения",
      "description": "Получить сообщение из мессенджера",
      "supportedBy": [
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": false,
      "example": {
        "chatId": "{{chatId}}",
        "idMessage": "{{providerMessageId}}"
      }
    },
    {
      "name": "messages.read",
      "path": "/api/v1/instances/{id}/operations/messages.read",
      "httpMethod": "POST",
      "category": "Сообщения",
      "description": "Отметить сообщения прочитанными",
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "chatId": "{{chatId}}"
      }
    },
    {
      "name": "messages.delete",
      "path": "/api/v1/instances/{id}/operations/messages.delete",
      "httpMethod": "POST",
      "category": "Сообщения",
      "description": "Удалить сообщение",
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "chatId": "{{chatId}}",
        "idMessage": "{{providerMessageId}}",
        "onlySenderDelete": false
      }
    },
    {
      "name": "messages.edit",
      "path": "/api/v1/instances/{id}/operations/messages.edit",
      "httpMethod": "POST",
      "category": "Сообщения",
      "description": "Изменить текст сообщения",
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "chatId": "{{chatId}}",
        "idMessage": "{{providerMessageId}}",
        "message": "Новый текст"
      }
    },
    {
      "name": "messages.forward",
      "path": "/api/v1/instances/{id}/operations/messages.forward",
      "httpMethod": "POST",
      "category": "Сообщения",
      "description": "Переслать выбранные сообщения",
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "chatId": "{{chatId}}",
        "chatIdFrom": "{{chatId}}",
        "messages": [
          "{{providerMessageId}}"
        ]
      }
    },
    {
      "name": "messages.react",
      "path": "/api/v1/instances/{id}/operations/messages.react",
      "httpMethod": "POST",
      "category": "Сообщения",
      "description": "Изменить реакцию на сообщение",
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "chatId": "{{chatId}}",
        "idMessage": "{{providerMessageId}}",
        "reaction": "👍"
      }
    },
    {
      "name": "messages.contact",
      "path": "/api/v1/instances/{id}/operations/messages.contact",
      "httpMethod": "POST",
      "category": "Сообщения",
      "description": "Отправить карточку контакта",
      "supportedBy": [
        "whatsapp",
        "telegram"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "chatId": "{{chatId}}",
        "contact": {
          "phoneContact": "{{phoneNumber}}",
          "firstName": "Имя"
        }
      }
    },
    {
      "name": "messages.location",
      "path": "/api/v1/instances/{id}/operations/messages.location",
      "httpMethod": "POST",
      "category": "Сообщения",
      "description": "Отправить местоположение",
      "supportedBy": [
        "whatsapp",
        "telegram"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "chatId": "{{chatId}}",
        "latitude": 55.75,
        "longitude": 37.62
      }
    },
    {
      "name": "messages.poll",
      "path": "/api/v1/instances/{id}/operations/messages.poll",
      "httpMethod": "POST",
      "category": "Сообщения",
      "description": "Отправить опрос",
      "supportedBy": [
        "whatsapp",
        "telegram"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "chatId": "{{chatId}}",
        "message": "Ваш выбор?",
        "options": [
          "Первый",
          "Второй"
        ]
      }
    },
    {
      "name": "chats.typing",
      "path": "/api/v1/instances/{id}/operations/chats.typing",
      "httpMethod": "POST",
      "category": "Чаты",
      "description": "Показать индикатор набора",
      "supportedBy": [
        "whatsapp",
        "telegram"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "chatId": "{{chatId}}"
      }
    },
    {
      "name": "chats.archive",
      "path": "/api/v1/instances/{id}/operations/chats.archive",
      "httpMethod": "POST",
      "category": "Чаты",
      "description": "Архивировать чат",
      "supportedBy": [
        "whatsapp",
        "telegram"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "chatId": "{{chatId}}"
      }
    },
    {
      "name": "chats.unarchive",
      "path": "/api/v1/instances/{id}/operations/chats.unarchive",
      "httpMethod": "POST",
      "category": "Чаты",
      "description": "Вернуть чат из архива",
      "supportedBy": [
        "whatsapp",
        "telegram"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "chatId": "{{chatId}}"
      }
    },
    {
      "name": "chats.expiration",
      "path": "/api/v1/instances/{id}/operations/chats.expiration",
      "httpMethod": "POST",
      "category": "Чаты",
      "description": "Настроить исчезающие сообщения",
      "supportedBy": [
        "whatsapp",
        "telegram"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "chatId": "{{chatId}}",
        "ephemeralExpiration": 86400
      }
    },
    {
      "name": "chats.reactions",
      "path": "/api/v1/instances/{id}/operations/chats.reactions",
      "httpMethod": "POST",
      "category": "Чаты",
      "description": "Получить доступные реакции",
      "supportedBy": [
        "telegram"
      ],
      "requiresConnection": true,
      "mutation": false,
      "example": {
        "chatId": "{{chatId}}"
      }
    },
    {
      "name": "groups.get",
      "path": "/api/v1/instances/{id}/operations/groups.get",
      "httpMethod": "POST",
      "category": "Группы",
      "description": "Информация о группе",
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": false,
      "example": {
        "groupId": "{{groupId}}"
      }
    },
    {
      "name": "groups.create",
      "path": "/api/v1/instances/{id}/operations/groups.create",
      "httpMethod": "POST",
      "category": "Группы",
      "description": "Создать группу",
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "groupName": "Моя группа",
        "chatIds": [
          "CHAT_ID"
        ]
      }
    },
    {
      "name": "groups.rename",
      "path": "/api/v1/instances/{id}/operations/groups.rename",
      "httpMethod": "POST",
      "category": "Группы",
      "description": "Изменить название группы",
      "supportedBy": [
        "whatsapp",
        "telegram"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "groupId": "{{groupId}}",
        "groupName": "Новое название"
      }
    },
    {
      "name": "groups.members.add",
      "path": "/api/v1/instances/{id}/operations/groups.members.add",
      "httpMethod": "POST",
      "category": "Группы",
      "description": "Добавить участника",
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "groupId": "{{groupId}}",
        "participantChatId": "{{participantChatId}}"
      }
    },
    {
      "name": "groups.members.remove",
      "path": "/api/v1/instances/{id}/operations/groups.members.remove",
      "httpMethod": "POST",
      "category": "Группы",
      "description": "Удалить участника",
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "groupId": "{{groupId}}",
        "participantChatId": "{{participantChatId}}"
      }
    },
    {
      "name": "groups.admins.add",
      "path": "/api/v1/instances/{id}/operations/groups.admins.add",
      "httpMethod": "POST",
      "category": "Группы",
      "description": "Назначить администратора группы",
      "supportedBy": [
        "whatsapp"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "groupId": "{{groupId}}",
        "participantChatId": "{{participantChatId}}"
      }
    },
    {
      "name": "groups.admins.remove",
      "path": "/api/v1/instances/{id}/operations/groups.admins.remove",
      "httpMethod": "POST",
      "category": "Группы",
      "description": "Снять администратора группы",
      "supportedBy": [
        "whatsapp"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "groupId": "{{groupId}}",
        "participantChatId": "{{participantChatId}}"
      }
    },
    {
      "name": "groups.leave",
      "path": "/api/v1/instances/{id}/operations/groups.leave",
      "httpMethod": "POST",
      "category": "Группы",
      "description": "Покинуть группу",
      "supportedBy": [
        "whatsapp",
        "telegram",
        "max"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "groupId": "{{groupId}}"
      }
    },
    {
      "name": "groups.settings",
      "path": "/api/v1/instances/{id}/operations/groups.settings",
      "httpMethod": "POST",
      "category": "Группы",
      "description": "Изменить одно разрешение группы",
      "supportedBy": [
        "whatsapp"
      ],
      "requiresConnection": true,
      "mutation": true,
      "example": {
        "groupId": "{{groupId}}",
        "announcement": true
      }
    }
  ],
  "files": [
    "openapi.json",
    "postman.collection.json",
    "senden-node.mjs",
    "senden-python.py",
    "quickstart.http",
    "llms.txt",
    "ai-context.json",
    "README.txt",
    ".env.example",
    "starter.zip"
  ]
}
