# API и MCP ЗумЗам

API: https://zumzam.ru/api/v1
MCP: https://zumzam.ru/api/v1/mcp
OpenAPI: https://zumzam.ru/developers/openapi.yaml

Доступ только к выбранным собственным профилям. Права и режим записи задаёт владелец.

## Первый запрос

Создайте ключ и проверьте подключение.

1. Откройте «API и подключения» в настройках аккаунта.
2. Создайте ключ, выберите собственный профиль и право profiles:read. Оставьте режим с подтверждением владельца.
3. Сохраните ключ в секретах сервера или переменной окружения ZUMZAM_API_KEY. Полный ключ показывается при выдаче.
4. Выполните запрос capabilities. Ответ покажет среду, права, режим записи и доступные пути.

- [Создать API-ключ](https://zumzam.ru/settings/developer)

### cURL · Bash

```bash
curl "https://zumzam.ru/api/v1/capabilities" \
  --header "Authorization: Bearer $ZUMZAM_API_KEY"
```

### JavaScript · Node.js

```javascript
const response = await fetch("https://zumzam.ru/api/v1/capabilities", {
  headers: { Authorization: "Bearer " + process.env.ZUMZAM_API_KEY },
});
const result = await response.json();
if (!response.ok) throw new Error(result.error?.code || "request_failed");
console.log(result);
```

### Python

```python
import json, os, urllib.request

request = urllib.request.Request(
    "https://zumzam.ru/api/v1/capabilities",
    headers={"Authorization": "Bearer " + os.environ["ZUMZAM_API_KEY"]},
)
with urllib.request.urlopen(request, timeout=30) as response:
    print(json.load(response))
```

### Пример ответа · основные поля

```json
{
  "api_version": "1",
  "environment": "production",
  "scopes": ["profiles:read"],
  "write_mode": "review",
  "policy_version": 1
}
```

Это сокращённый пример ответа. Для следующих запросов получите UUID профиля через GET /api/v1/profiles. Публичный номер вида IDP-000001 не заменяет UUID.

### Выбранные собственные профили

```bash
curl "https://zumzam.ru/api/v1/profiles" \
  --header "Authorization: Bearer $ZUMZAM_API_KEY"
```

## Ключи и права доступа

Ограничьте интеграцию нужными профилями и действиями.

Каждый запрос API и MCP использует Authorization: Bearer <ключ>. Ключ связан с владельцем, выбранными profile_ids и набором scopes. Он не открывает каталог чужих профилей и не даёт административных прав.

| Задача | Права |
| --- | --- |
| Прочитать профиль | profiles:read |
| Изменить содержимое | profiles:write |
| Настроить оформление | design:read, design:write |
| Перенести позицию каталога | profiles:read, catalog:read, sources:read, sources:manage, catalog:write, media:write, imports:write, changes:read |
| Работать со сделками | crm:read, crm:write |
| Публиковать профиль | profiles:publish |
| Команда, документы, калькуляторы и бронирования | Точное право указано у каждой операции в справочнике |

> **Выдавайте минимум прав**
> Для разных CRM и нейросетей создавайте отдельные ключи. Ротация заменяет секрет; отзыв прекращает новые запросы. Новые возможности не добавляются старым ключам автоматически.

Управление ключами, смена режима и подтверждение изменений доступны владельцу в кабинете. API-ключ не может сам расширить свои права. Банковское OAuth-согласие и принятие приглашения другим человеком также остаются отдельными действиями.

- [Все операции и их scopes](https://zumzam.ru/developers/reference)
- [Управление ключами](https://zumzam.ru/settings/developer)

## Запись и подтверждение

Владелец выбирает режим отдельно для каждого ключа.

| Режим | Поведение |
| --- | --- |
| review | Запрос готовит изменение. Владелец открывает preview_url и подтверждает его в кабинете. |
| direct | Разрешённое действие применяется автоматически после серверных проверок. |

Действия отправляются в POST /profiles/{profileId}/actions. В input передаются поля конкретной операции. Ответ содержит change, его статус и сведения о подтверждении. В примере ZUMZAM_PROFILE_ID содержит UUID выбранного профиля.

### Изменить название профиля

```bash
curl "https://zumzam.ru/api/v1/profiles/$ZUMZAM_PROFILE_ID/actions" \
  --header "Authorization: Bearer $ZUMZAM_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "operation": "profile.update",
    "idempotency_key": "crm:profile:title:revision-42",
    "input": { "display_name": "Кондитерская Алиас" }
  }'
```

> **Предпросмотр принадлежит владельцу**
> preview_url открывается в браузере с сессией владельца. Подтверждение относится к показанному digest. Если исходные данные изменились, API вернёт конфликт вместо перезаписи ручной правки.

Публикация — отдельное действие. Добавление услуги или восстановление профиля не означает автоматическую публикацию всего профиля. Операции проверяют те же ограничения и доступ к инструментам, что и кабинет.

## Каталог без дублей

Перенесите позицию с фото, проверьте результат и обновляйте её по внешнему ID.

1. Один раз создайте источник через POST /profiles/{profileId}/sources и сохраните source.id.
2. Передайте source_id, устойчивый external_id и поля позиции в POST /profiles/{profileId}/imports.
3. Откройте preview_url. Сохранение выполняется в соответствии с режимом ключа; нужное подтверждение делает владелец.
4. Для обновления сохраните source_id и external_id, измените данные и передайте новый Idempotency-Key.

### Создать источник · один раз

```bash
curl "https://zumzam.ru/api/v1/profiles/$ZUMZAM_PROFILE_ID/sources" \
  --header "Authorization: Bearer $ZUMZAM_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"name":"Каталог сайта"}'
```

### Импорт одной позиции

```bash
curl "https://zumzam.ru/api/v1/profiles/$ZUMZAM_PROFILE_ID/imports" \
  --header "Authorization: Bearer $ZUMZAM_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: cake-42:revision-1" \
  --data @item.json
```

### item.json · замените source_id и адрес фото

```json
{
  "source_id": "00000000-0000-4000-8000-000000000001",
  "item": {
    "external_id": "cake-42",
    "name": "Шоколадный торт",
    "description": "Шоколадный бисквит с ягодами",
    "price_minor": 180000,
    "currency": "RUB",
    "price_type": "from",
    "price_unit": "kg",
    "photo_url": "https://example.com/catalog/cake-42.jpg"
  }
}
```

В этом запросе 180000 означает 1800 рублей за килограмм. example.com — пример: подставьте собственную доступную HTTPS-фотографию. Сервис проверит и перенесёт фото в управляемое хранилище. Внутренние адреса и произвольные локальные пути не принимаются.

> **Внешний ID и ключ повтора решают разные задачи**
> source_id + external_id находят прежнюю позицию. Idempotency-Key защищает повтор одного запроса. Для новой цены используйте прежний external_id и новый ключ повтора. При потере ответа повторите исходный запрос с прежним ключом.

Пропущенные позиции не удаляются. Неизменившиеся данные источника не должны затереть ручную правку. Если одно поле изменили и в источнике, и в кабинете, импорт получает conflicted и требует согласования.

## Подключение MCP

Те же права и режим записи для нейросетей и MCP-клиентов.

Адрес сервера: https://zumzam.ru/api/v1/mcp. Транспорт — Streamable HTTP с JSON-ответами, авторизация — Bearer-ключ. Выберите клиент, который умеет передавать Authorization. OAuth-авторизация MCP пока не предоставляется.

### Параметры HTTP-подключения

```json
{
  "url": "https://zumzam.ru/api/v1/mcp",
  "headers": { "Authorization": "Bearer <YOUR_API_KEY>" }
}
```

Это параметры соединения, а не универсальный формат конфигурации для всех приложений. Клиент выполняет initialize, принимает согласованную версию, отправляет notifications/initialized, затем tools/list. Пример ниже использует версию 2025-11-25.

### Инициализация · JSON-RPC

```bash
curl "https://zumzam.ru/api/v1/mcp" \
  --header "Authorization: Bearer $ZUMZAM_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json, text/event-stream" \
  --data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"my-integration","version":"1.0.0"}}}'
```

### После initialize · подтверждение и список инструментов

```bash
curl "https://zumzam.ru/api/v1/mcp" \
  --header "Authorization: Bearer $ZUMZAM_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json, text/event-stream" \
  --header "MCP-Protocol-Version: 2025-11-25" \
  --data '{"jsonrpc":"2.0","method":"notifications/initialized"}'

curl "https://zumzam.ru/api/v1/mcp" \
  --header "Authorization: Bearer $ZUMZAM_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json, text/event-stream" \
  --header "MCP-Protocol-Version: 2025-11-25" \
  --data '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
```

Поддержаны версии 2025-03-26, 2025-06-18, 2025-11-25 и stateless discovery 2026-07-28. Для 2026-07-28 используются server/discover, версия в _meta, clientCapabilities и согласованные Mcp-Method / Mcp-Name. Не смешивайте этот lifecycle с initialize. Сервер не выдаёт MCP-сессии; отдельного GET SSE-потока нет.

Имя инструмента записи соответствует операции с заменой точки на подчёркивание: profile.update → profile_update. Аргументы записи: profile_id, input, idempotency_key. У именованного чтения есть собственное имя; точные аргументы возвращает tools/list. structuredContent содержит результат; ошибки инструмента нужно проверять по isError.

> **Клиенты с stdio**
> Скачайте мост и укажите Node.js и абсолютный путь к файлу в настройках MCP-клиента. Мост читает ZUMZAM_API_KEY и необязательный ZUMZAM_MCP_URL из окружения. Ключ не передаётся аргументом командной строки.

### Запуск скачанного моста

```bash
curl --fail --output zumzam-mcp.mjs \
  "https://zumzam.ru/developers/mcp-stdio.mjs"
node /absolute/path/zumzam-mcp.mjs
```

- [Скачать stdio-мост](https://zumzam.ru/developers/mcp-stdio.mjs)
- [Спецификация Streamable HTTP](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports)

## Проверка интеграции

Начните с отдельного профиля и режима подтверждения.

Для первых запросов выберите отдельный собственный неопубликованный профиль, выдайте минимальные права и режим review. Прочитайте данные, подготовьте изменение, изучите предпросмотр и отмените ненужный запрос в кабинете. Direct включайте для ключа после проверки синхронизации.

> **Размещённая песочница**
> Отдельная общедоступная песочница пока не предоставляется. Не направляйте production-ключ на локальный сервер и не считайте обычный неопубликованный профиль изолированной тестовой средой.

Для разработчиков с доступом к исходникам есть локальный изолированный контур. Команды выполняются из корня проекта. setup создаёт отдельные тестовые данные; реальные пароли аккаунтов и ключи провайдеров не нужны.

### Локальная песочница · Node.js 24

```bash
node scripts/developer-api/sandbox.mjs setup
node scripts/developer-api/sandbox.mjs start

# API: http://localhost:4016/api/v1
# MCP: http://localhost:4016/api/v1/mcp
```

Локальные ключи имеют префикс zz_test_, production-ключи — zz_live_. Значение environment возвращает capabilities. Данные и ключи разных сред не взаимозаменяемы.

## Повторы и конфликты

Сохраняйте идентификатор запроса до получения результата.

| Ситуация | Действие интеграции |
| --- | --- |
| Потерян ответ на запись | Повторите тот же запрос с тем же idempotency key. |
| Изменились данные новой редакции | Создайте новый ключ повтора; прежний ключ нельзя использовать с другим телом. |
| 409, конфликт исходного состояния | Прочитайте свежие данные и подготовьте новое изменение. Не перезаписывайте их вслепую. |
| 429 | Учитывайте Retry-After. Не повторяйте запросы непрерывно. |
| Статус отправки unknown | Проверьте результат у провайдера. Не создавайте новую отправку автоматически. |

У actions ключ повтора передаётся в поле idempotency_key. У импорта и бинарных загрузок используется заголовок Idempotency-Key. Не помещайте в ключи повтора пароли, токены или персональные данные.

Отправка письма и действие во внешнем канале могут выполняться после подтверждения через очередь. Проверяйте communication_jobs: pending, processing, succeeded, cancelled, unknown. Отзыв ключа запрещает новые запросы, но уже подтверждённое намерение отменяется отдельно, пока выполнение не началось.

## Файлы и секреты

Передавайте подготовленные ссылки вместо закрытых данных в истории изменений.

capabilities возвращает пути загрузки фотографий, документов, материалов сделки и внешних вложений. Отправляйте байты с нужным Content-Type. Передайте полученный file_ref или asset_id в соответствующее действие без изменения ссылки.

Подготовка вложения не отправляет его клиенту. Приватные файлы доступны только с правами на профиль и конкретный ресурс. MCP читает их ограниченными частями base64; это не открывает общедоступную ссылку.

Пароль почты или секрет подключения передавайте в POST /profiles/{profileId}/secrets. В действие передаётся secret_ref. Ссылка связана с конкретным ключом, профилем и версией политики и имеет срок действия. Не вкладывайте пароль в обычный input или описание задачи.

> **Секретный ключ хранится на вашей стороне**
> Используйте сервер или секреты MCP-клиента. Не размещайте ключ в браузерном JavaScript, публичном репозитории, URL, снимках экрана или сообщениях об ошибках. При раскрытии отзовите его в кабинете.

## Вебхуки калькуляторов

Принимайте события в своём обработчике и проверяйте подпись.

Создавайте и настраивайте подписки через quizzes.create_webhook и связанные операции. URL должен быть доступен по HTTPS и пройти проверку внешнего адреса. Набор событий указан в схеме операции. Универсальной подписки на все события CRM пока нет.

Обработчик получает X-Quiz-Signature: sha256=<HMAC-SHA256>. Подпись вычисляется от исходных байтов тела с секретом вебхука. Сравнивайте её безопасным способом до обработки JSON. X-Quiz-Delivery идентифицирует доставку: сохраняйте его, чтобы повтор не создал дубль.

Секрет подписи приходит в результате создания. Храните его отдельно от API-ключа. Быстро подтверждайте принятый запрос успешным HTTP-ответом, а тяжёлую обработку выполняйте в своей очереди.

- [Операция quizzes.create_webhook](https://zumzam.ru/developers/reference#method-write-quizzes.create_webhook)

## Ошибки

Проверяйте HTTP-статус, код ошибки и идентификатор запроса.

### Формат ошибки API

```json
{
  "error": {
    "code": "insufficient_scope",
    "message": "У ключа недостаточно прав"
  },
  "request_id": "идентификатор-запроса"
}
```

Пример показывает структуру, а не полный список кодов. При ошибке полей ответ может содержать error.fields. Сохраните request_id для обращения в поддержку, не передавая секретный ключ.

| HTTP | Что проверить |
| --- | --- |
| 400 / 422 | JSON, названия и типы полей. Схемы запросов строгие. |
| 401 | Секрет ключа, срок действия, отзыв и соответствие среды. |
| 403 | Scopes, режим доступа и доступность инструмента профиля. |
| 404 | Идентификатор ресурса и права на выбранный собственный профиль. |
| 409 | Повтор с другим телом или конфликт версии исходных данных. |
| 410 | Истёкшее предложение, подготовленный файл или срок действия операции. |
| 413 | Размер тела, число элементов или вложенность JSON. |
| 429 | Лимит запросов. Подождите время из Retry-After. |
| 500 / 503 | Временный отказ. Сохраните request_id и повторяйте запись с прежним ключом повтора. |

У MCP есть два уровня ошибок: HTTP-ошибка подключения и JSON-RPC error либо result.isError. HTTP 200 сам по себе не означает успешное выполнение инструмента.

## Лимиты и версии

Проверяйте действующие возможности перед синхронизацией.

| Ограничение | Значение |
| --- | --- |
| Обычные запросы | 60 в минуту; учитываются IP, ключ и владелец. |
| Ресурсоёмкие операции | Дополнительный лимит 6 в минуту. |
| Тело JSON | 64 КиБ, в том числе без Content-Length. |
| Сложность JSON | 1000 элементов массива, 2000 ключей объекта, 10000 узлов суммарно, глубина 32. |
| Незавершённые импорты каталога | До 5 у владельца; предпросмотр действует 24 часа. |

Превышение сложности возвращает 413 request_too_complex до проверки схемы, включая MCP. Разделяйте большие пакеты на запросы. У файлов свои ограничения: используйте capability конкретной загрузки и схему операции.

Версия REST API указана в пути /api/v1. Читайте нужные поля ответа и сохраняйте неизвестные поля совместимыми с клиентом. Там, где список возвращает next_cursor, передайте его следующим параметром cursor; не все списки поддерживают пагинацию.

GET /profiles/{profileId}/actions возвращает актуальные операции и схемы, tools/list — инструменты для текущего ключа. Проверяйте discovery после смены прав, подключения нового профиля или обновления интеграции. В справочнике показан контракт платформы; текущий ключ может видеть только его часть.

## Справочник

Возможности текущего ключа уточняйте через capabilities, actions и tools/list.

### callMcp

Подключиться через MCP Streamable HTTP

POST /api/v1/mcp

```json
{
  "type": "object",
  "required": [
    "jsonrpc",
    "method"
  ],
  "properties": {
    "jsonrpc": {
      "const": "2.0"
    },
    "id": {
      "type": [
        "string",
        "integer"
      ]
    },
    "method": {
      "type": "string"
    },
    "params": {
      "type": "object"
    }
  }
}
```

### getCapabilities

Получить возможности и ограничения API

GET /api/v1/capabilities

### listProfiles

Получить разрешённые собственные профили

GET /api/v1/profiles

### listSources

Получить источники, доступные ключу

GET /api/v1/profiles/{profileId}/sources

Параметры:
- profileId (path, обязательно)

### createSource

Создать источник и привязать его к ключу

POST /api/v1/profiles/{profileId}/sources

Параметры:
- profileId (path, обязательно)

```json
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    }
  }
}
```

### setSourceActive

Отключить или включить свой источник

PATCH /api/v1/profiles/{profileId}/sources/{sourceId}

Параметры:
- profileId (path, обязательно)
- sourceId (path, обязательно)

```json
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "is_active"
  ],
  "properties": {
    "is_active": {
      "type": "boolean"
    }
  }
}
```

### stageCatalogItem

Подготовить одну позицию и фотографию

POST /api/v1/profiles/{profileId}/imports

Параметры:
- profileId (path, обязательно)
- Idempotency-Key (header, обязательно)

```json
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "source_id",
    "item"
  ],
  "properties": {
    "source_id": {
      "type": "string",
      "format": "uuid"
    },
    "item": {
      "$ref": "#/components/schemas/CatalogItem"
    }
  }
}
```

### getCatalogImport

Получить состояние и предпросмотр переноса

GET /api/v1/profiles/{profileId}/imports/{importId}

Параметры:
- profileId (path, обязательно)
- importId (path, обязательно)

### getOwnProfile

Прочитать собственный профиль

GET /api/v1/profiles/{profileId}

Scopes: profiles:read

Параметры:
- profileId (path, обязательно)

### getOwnDesign

Прочитать оформление и допустимые шаблоны

GET /api/v1/profiles/{profileId}/design

Scopes: design:read

Параметры:
- profileId (path, обязательно)

### listOwnDesignVersions

Прочитать историю оформления

GET /api/v1/profiles/{profileId}/design/versions

Scopes: design:read

Параметры:
- profileId (path, обязательно)

### listOwnCatalogServices

Прочитать услуги выбранного профиля

GET /api/v1/profiles/{profileId}/catalog/services

Scopes: catalog:read

Параметры:
- profileId (path, обязательно)
- cursor (query)

### listOwnCatalogRooms

Прочитать залы выбранного профиля

GET /api/v1/profiles/{profileId}/catalog/rooms

Scopes: catalog:read

Параметры:
- profileId (path, обязательно)
- cursor (query)

### listOwnProfileStories

Прочитать истории выбранного профиля

GET /api/v1/profiles/{profileId}/stories

Scopes: profiles:read

Параметры:
- profileId (path, обязательно)
- cursor (query)

### getOwnCrmWorkspace

Прочитать конфигурацию CRM

GET /api/v1/profiles/{profileId}/crm/workspace

Scopes: crm:read

Параметры:
- profileId (path, обязательно)

### listOwnCrmContacts

Прочитать клиентов с проверкой раскрытия телефонов

GET /api/v1/profiles/{profileId}/crm/contacts

Scopes: crm:read

Параметры:
- profileId (path, обязательно)
- cursor (query)
- search (query)

### listOwnCrmTasks

Прочитать задачи открытых сделок выбранного профиля

GET /api/v1/profiles/{profileId}/crm/tasks

Scopes: crm:read

Параметры:
- profileId (path, обязательно)
- cursor (query)
- deal_id (query)

### getOwnCrmBanks

Прочитать банки без токенов и полных номеров счетов

GET /api/v1/profiles/{profileId}/crm/banks

Scopes: crm:banks:read

Параметры:
- profileId (path, обязательно)
- cursor (query)

### discoverOwnerOperations

Получить разрешённые действия и их серверные схемы

GET /api/v1/profiles/{profileId}/actions

Параметры:
- profileId (path, обязательно)

### submitOwnerOperation

Подготовить или выполнить действие собственного профиля

POST /api/v1/profiles/{profileId}/actions

Параметры:
- profileId (path, обязательно)

```json
{
  "$ref": "#/components/schemas/OwnerAction"
}
```

### getOwnerOperationChange

Получить статус изменения этого ключа

GET /api/v1/profiles/{profileId}/changes/{changeId}

Scopes: changes:read

Параметры:
- profileId (path, обязательно)
- changeId (path, обязательно)

### listOwnCrmPipelines

Прочитать воронки и этапы выбранного профиля

GET /api/v1/profiles/{profileId}/crm/pipelines

Scopes: crm:read

Параметры:
- profileId (path, обязательно)
- cursor (query)

### listOwnCrmDeals

Прочитать сделки выбранного профиля с проверкой раскрытия телефонов

GET /api/v1/profiles/{profileId}/crm/deals

Scopes: crm:read

Параметры:
- profileId (path, обязательно)
- cursor (query)
- pipeline_id (query)
- search (query)
- include_archived (query)

### listOwnCatalogPrograms

Прочитать шоу, персонажей, мастер-классы или квесты выбранного профиля

GET /api/v1/profiles/{profileId}/catalog/programs

Scopes: catalog:read

Параметры:
- profileId (path, обязательно)
- cursor (query)
- kind (query, обязательно)

### get_profile_publication

Проверить готовность и согласие на публикацию профиля

GET /api/v1/profiles/{profileId}/resources/publication

Scopes: profiles:read

Параметры:
- profileId (path, обязательно)

### list_profile_team

Прочитать участников, приглашения и права команды

GET /api/v1/profiles/{profileId}/resources/team

Scopes: team:read

Параметры:
- profileId (path, обязательно)

### review_profile_document_faq

Сверить документ с вопросами профиля

GET /api/v1/profiles/{profileId}/resources/document_faq_review

Scopes: documents:read

Параметры:
- profileId (path, обязательно)
- document_id (query, обязательно)

### list_profile_document_files

Прочитать файлы документов профиля

GET /api/v1/profiles/{profileId}/resources/document_files

Scopes: documents:read

Параметры:
- profileId (path, обязательно)
- cursor (query)

### list_profile_documents

Прочитать документы профиля, черновики и архив

GET /api/v1/profiles/{profileId}/resources/documents

Scopes: documents:read

Параметры:
- profileId (path, обязательно)
- cursor (query)

### list_profile_document_versions

Прочитать опубликованные версии собственного документа

GET /api/v1/profiles/{profileId}/resources/document_versions

Scopes: documents:read

Параметры:
- profileId (path, обязательно)
- document_id (query, обязательно)
- cursor (query)

### list_profile_quizzes

Прочитать калькуляторы и размещения выбранного профиля

GET /api/v1/profiles/{profileId}/resources/quizzes

Scopes: quizzes:read

Параметры:
- profileId (path, обязательно)
- cursor (query)

### list_profile_quiz_leads

Прочитать заявки калькулятора выбранного размещения

GET /api/v1/profiles/{profileId}/resources/quiz_leads

Scopes: quizzes:read

Параметры:
- profileId (path, обязательно)
- quiz_id (query, обязательно)
- placement_id (query, обязательно)
- cursor (query)

### get_profile_quiz_statistics

Прочитать статистику калькулятора выбранного размещения

GET /api/v1/profiles/{profileId}/resources/quiz_statistics

Scopes: quizzes:read

Параметры:
- profileId (path, обязательно)
- quiz_id (query, обязательно)
- placement_id (query, обязательно)
- period (query)

### get_profile_booking_settings

Прочитать настройки бронирования профиля

GET /api/v1/profiles/{profileId}/resources/booking_settings

Scopes: bookings:read

Параметры:
- profileId (path, обязательно)

### list_profile_bookings

Прочитать бронирования выбранного профиля

GET /api/v1/profiles/{profileId}/resources/bookings

Scopes: bookings:read

Параметры:
- profileId (path, обязательно)
- cursor (query)
- from (query)
- to (query)

### list_profile_calendar

Прочитать календарь выбранного профиля

GET /api/v1/profiles/{profileId}/resources/calendar

Scopes: bookings:read

Параметры:
- profileId (path, обязательно)
- cursor (query)
- from (query, обязательно)
- to (query, обязательно)

### get_profile_booking_slots

Проверить доступные слоты бронирования

GET /api/v1/profiles/{profileId}/resources/booking_slots

Scopes: bookings:read

Параметры:
- profileId (path, обязательно)
- date (query, обязательно)
- service_id (query)
- room_id (query)

### get_profile_order_resolution

Прочитать согласование результата заказа

GET /api/v1/profiles/{profileId}/resources/order_resolution

Scopes: crm:read

Параметры:
- profileId (path, обязательно)
- order_id (query, обязательно)

### get_profile_booking_resolution

Прочитать согласование результата заказа

GET /api/v1/profiles/{profileId}/resources/booking_resolution

Scopes: bookings:read

Параметры:
- profileId (path, обязательно)
- order_id (query, обязательно)

### list_profile_contact_children

Прочитать сведения о детях клиента

GET /api/v1/profiles/{profileId}/resources/contact_children

Scopes: crm:read

Параметры:
- profileId (path, обязательно)
- contact_id (query, обязательно)

### list_profile_crm_automations

Прочитать автоматизации CRM

GET /api/v1/profiles/{profileId}/resources/automations

Scopes: crm:read

Параметры:
- profileId (path, обязательно)
- pipeline_id (query, обязательно)

### get_profile_crm_sales_target

Прочитать план и факт продаж

GET /api/v1/profiles/{profileId}/resources/sales_target

Scopes: crm:read

Параметры:
- profileId (path, обязательно)
- period (query, обязательно)

### get_profile_crm_analytics

Прочитать аналитику CRM

GET /api/v1/profiles/{profileId}/resources/crm_analytics

Scopes: crm:read

Параметры:
- profileId (path, обязательно)
- pipeline_id (query)

### get_profile_deal_finance

Прочитать финансы сделки

GET /api/v1/profiles/{profileId}/resources/deal_finance

Scopes: crm:finance:read

Параметры:
- profileId (path, обязательно)
- deal_id (query, обязательно)

### get_profile_finance_report

Прочитать финансовый отчёт

GET /api/v1/profiles/{profileId}/resources/finance_report

Scopes: crm:finance:read

Параметры:
- profileId (path, обязательно)
- from (query, обязательно)
- to (query, обязательно)

### list_profile_inventory

Прочитать костюмерную и бронирования

GET /api/v1/profiles/{profileId}/resources/inventory

Scopes: crm:inventory:read

Параметры:
- profileId (path, обязательно)
- deal_id (query)

### get_profile_deal_preparation

Прочитать подготовку сделки

GET /api/v1/profiles/{profileId}/resources/preparation

Scopes: crm:read

Параметры:
- profileId (path, обязательно)
- deal_id (query, обязательно)

### list_profile_custom_blocks

Прочитать разделы профиля

GET /api/v1/profiles/{profileId}/resources/custom_blocks

Scopes: profiles:read

Параметры:
- profileId (path, обязательно)

### get_profile_custom_block_design

Прочитать оформление раздела профиля

GET /api/v1/profiles/{profileId}/resources/custom_block_design

Scopes: design:read

Параметры:
- profileId (path, обязательно)
- block_id (query, обязательно)

### list_profile_quiz_promo_codes

Прочитать промокоды калькулятора

GET /api/v1/profiles/{profileId}/resources/quiz_promo_codes

Scopes: quizzes:read

Параметры:
- profileId (path, обязательно)
- quiz_id (query, обязательно)

### get_profile_quiz_product_settings

Прочитать уведомления и CRM калькулятора

GET /api/v1/profiles/{profileId}/resources/quiz_product_settings

Scopes: quizzes:read

Параметры:
- profileId (path, обязательно)
- quiz_id (query, обязательно)

### list_profile_booking_widgets

Прочитать виджеты бронирования

GET /api/v1/profiles/{profileId}/resources/booking_widgets

Scopes: bookings:read

Параметры:
- profileId (path, обязательно)

### list_profile_booking_automations

Прочитать сценарии бронирования

GET /api/v1/profiles/{profileId}/resources/booking_automations

Scopes: bookings:read

Параметры:
- profileId (path, обязательно)

### get_profile_booking_inventory_settings

Прочитать ресурсы бронирования

GET /api/v1/profiles/{profileId}/resources/booking_inventory_settings

Scopes: bookings:read

Параметры:
- profileId (path, обязательно)

### list_profile_booking_waitlist

Прочитать лист ожидания

GET /api/v1/profiles/{profileId}/resources/booking_waitlist

Scopes: bookings:read

Параметры:
- profileId (path, обязательно)
- cursor (query)
- status (query)

### get_profile_payment_provider

Прочитать настройки кассы

GET /api/v1/profiles/{profileId}/resources/payment_provider

Scopes: payments:read

Параметры:
- profileId (path, обязательно)

### get_deal_crew

Прочитать назначения, роли и готовность команды

GET /api/v1/profiles/{profileId}/resources/deal_crew

Scopes: crm:read

Параметры:
- profileId (path, обязательно)
- deal_id (query, обязательно)

### list_deal_activities

Прочитать журнал собственной сделки

GET /api/v1/profiles/{profileId}/resources/deal_activities

Scopes: crm:read

Параметры:
- profileId (path, обязательно)
- deal_id (query, обязательно)
- cursor (query)

### search_bank_reconciliation_deals

Найти собственную сделку для сверки платежа

GET /api/v1/profiles/{profileId}/resources/bank_deal_search

Scopes: crm:banks:read

Параметры:
- profileId (path, обязательно)
- search (query)

### list_deal_subcontracts

Прочитать субподряды собственной сделки

GET /api/v1/profiles/{profileId}/resources/deal_subcontracts

Scopes: crm:read

Параметры:
- profileId (path, обязательно)
- deal_id (query, обязательно)
- cursor (query)

### list_subcontract_responses

Прочитать отклики на собственный субподряд

GET /api/v1/profiles/{profileId}/resources/subcontract_responses

Scopes: crm:read

Параметры:
- profileId (path, обязательно)
- deal_id (query, обязательно)
- subcontract_id (query, обязательно)
- cursor (query)

### get_deal_invoices

Прочитать счета и остаток оплаты собственной сделки

GET /api/v1/profiles/{profileId}/resources/deal_invoices

Scopes: payments:read

Параметры:
- profileId (path, обязательно)
- deal_id (query, обязательно)

### get_deal_materials

Прочитать материалы собственной сделки

GET /api/v1/profiles/{profileId}/resources/deal_materials

Scopes: crm:read

Параметры:
- profileId (path, обязательно)
- deal_id (query, обязательно)

### list_prepared_deal_materials

Прочитать собственные подготовленные файлы

GET /api/v1/profiles/{profileId}/resources/prepared_materials

Scopes: crm:write

Параметры:
- profileId (path, обязательно)
- deal_id (query)

### get_deal_channels

Прочитать переписку собственной сделки

GET /api/v1/profiles/{profileId}/resources/deal_channels

Scopes: crm:messages:read

Параметры:
- profileId (path, обязательно)
- deal_id (query, обязательно)
- conversation_id (query)
- before (query)

### list_profile_conversations

Прочитать клиентские диалоги своего профиля

GET /api/v1/profiles/{profileId}/resources/conversations

Scopes: crm:messages:read

Параметры:
- profileId (path, обязательно)
- limit (query)
- before (query)

### get_profile_conversation_messages

Прочитать сообщения клиентского диалога своего профиля

GET /api/v1/profiles/{profileId}/resources/conversation_messages

Scopes: crm:messages:read

Параметры:
- profileId (path, обязательно)
- limit (query)
- before (query)
- conversation_id (query, обязательно)

### get_booking_credit_codes

Прочитать промокоды и остатки сертификатов профиля

GET /api/v1/profiles/{profileId}/resources/booking_credit_codes

Scopes: bookings:read

Параметры:
- profileId (path, обязательно)

### get_profile_draft

Прочитать содержимое черновика своего профиля

GET /api/v1/profiles/{profileId}/resources/draft

Scopes: profiles:read

Параметры:
- profileId (path, обязательно)

### get_profile_publish_history

Прочитать историю публикаций своего профиля

GET /api/v1/profiles/{profileId}/resources/publish_history

Scopes: profiles:read

Параметры:
- profileId (path, обязательно)
- limit (query)

### get_quiz_webhooks

Прочитать вебхуки собственного калькулятора

GET /api/v1/profiles/{profileId}/resources/quiz_webhooks

Scopes: quizzes:read

Параметры:
- profileId (path, обязательно)
- quiz_id (query, обязательно)

### get_profile_connections

Прочитать подключения каналов и почты своего профиля

GET /api/v1/profiles/{profileId}/resources/connections

Scopes: crm:read

Параметры:
- profileId (path, обязательно)

### get_profile_connection_setup

Получить ссылку на подтверждение подключения владельцем

GET /api/v1/profiles/{profileId}/resources/connection_setup

Scopes: crm:settings:write

Параметры:
- profileId (path, обязательно)
- provider (query, обязательно)

### export_owned_quiz_template

Выгрузить шаблон собственного калькулятора

GET /api/v1/profiles/{profileId}/resources/quiz_template

Scopes: quizzes:read

Параметры:
- profileId (path, обязательно)
- quiz_id (query, обязательно)

### get_client_invites

Прочитать состояние приглашений собственного клиента

GET /api/v1/profiles/{profileId}/resources/client_invites

Scopes: crm:read

Параметры:
- profileId (path, обязательно)
- contact_id (query, обязательно)

### list_own_profile_media

Прочитать медиатеку собственного профиля

GET /api/v1/profiles/{profileId}/resources/profile_media

Scopes: profiles:read

Параметры:
- profileId (path, обязательно)
- cursor (query)

### get_own_profile_lifecycle

Проверить состояние и срок восстановления своего профиля

GET /api/v1/profiles/{profileId}/resources/lifecycle

Scopes: profiles:manage

Параметры:
- profileId (path, обязательно)

### get_profile_message_reactions

Прочитать реакции в клиентском диалоге профиля

GET /api/v1/profiles/{profileId}/resources/message_reactions

Scopes: crm:messages:read

Параметры:
- profileId (path, обязательно)
- message_id (query, обязательно)

### list_own_profile_reviews

Прочитать отзывы своего профиля

GET /api/v1/profiles/{profileId}/resources/reviews

Scopes: profiles:read

Параметры:
- profileId (path, обязательно)
- cursor (query)

### get_profile_communication_jobs

Проверить выполнение отправок и действий профиля

GET /api/v1/profiles/{profileId}/resources/communication_jobs

Scopes: crm:messages:write

Параметры:
- profileId (path, обязательно)
- job_id (query)
- cursor (query)

### get_deal_emails

Прочитать страницу писем собственной сделки

GET /api/v1/profiles/{profileId}/resources/deal_emails

Scopes: crm:messages:read

Параметры:
- profileId (path, обязательно)
- deal_id (query, обязательно)
- cursor (query)
- limit (query)

### get_external_media_status

Проверить подготовку вложения внешнего чата

GET /api/v1/profiles/{profileId}/resources/external_media

Scopes: crm:messages:write

Параметры:
- profileId (path, обязательно)
- deal_id (query, обязательно)
- media_id (query, обязательно)

### list_profile_external_conversations

Прочитать входящие диалоги собственного профиля

GET /api/v1/profiles/{profileId}/resources/external_conversations

Scopes: crm:messages:read

Параметры:
- profileId (path, обязательно)
- cursor (query)
- unassigned_only (query)

### get_profile_external_conversation

Прочитать сообщения до распределения по сделкам

GET /api/v1/profiles/{profileId}/resources/external_conversation

Scopes: crm:messages:read

Параметры:
- profileId (path, обязательно)
- conversation_id (query, обязательно)
- before (query)

### downloadOwnDocument

Скачать приватный файл своего профиля

GET /api/v1/profiles/{profileId}/document-files/{assetId}

Scopes: documents:read

Параметры:
- profileId (path, обязательно)
- assetId (path, обязательно)

### downloadPreparedProfileImage

Скачать приватный файл своего профиля

GET /api/v1/profiles/{profileId}/image-files/{fileRef}

Scopes: media:write

Параметры:
- profileId (path, обязательно)
- fileRef (path, обязательно)

### discardPreparedProfileImage

Удалить подготовленную загрузку

DELETE /api/v1/profiles/{profileId}/image-files/{fileRef}

Scopes: media:write

Параметры:
- profileId (path, обязательно)
- fileRef (path, обязательно)

### downloadPreparedDealMaterial

Скачать приватный файл своего профиля

GET /api/v1/profiles/{profileId}/crm/deals/{dealId}/uploads/{fileRef}

Scopes: crm:write

Параметры:
- profileId (path, обязательно)
- dealId (path, обязательно)
- fileRef (path, обязательно)

### discardPreparedDealMaterial

Удалить подготовленную загрузку

DELETE /api/v1/profiles/{profileId}/crm/deals/{dealId}/uploads/{fileRef}

Scopes: crm:write, media:write

Параметры:
- profileId (path, обязательно)
- dealId (path, обязательно)
- fileRef (path, обязательно)

### downloadOwnDealMaterial

Скачать приватный файл своего профиля

GET /api/v1/profiles/{profileId}/crm/deals/{dealId}/materials/{materialId}

Scopes: crm:read

Параметры:
- profileId (path, обязательно)
- dealId (path, обязательно)
- materialId (path, обязательно)

### downloadOwnExternalAttachment

Скачать приватный файл своего профиля

GET /api/v1/profiles/{profileId}/crm/deals/{dealId}/external-media/{mediaId}

Scopes: crm:messages:read

Параметры:
- profileId (path, обязательно)
- dealId (path, обязательно)
- mediaId (path, обязательно)

### prepareOwnDocumentFile

Подготовить файл для своего профиля

POST /api/v1/profiles/{profileId}/document-files

Scopes: documents:write, media:write

Параметры:
- profileId (path, обязательно)
- filename (query, обязательно)
- Idempotency-Key (header, обязательно)

```json
{
  "type": "string",
  "format": "binary"
}
```

### prepareOwnProfileImage

Подготовить файл для своего профиля

POST /api/v1/profiles/{profileId}/image-files

Scopes: media:write

Параметры:
- profileId (path, обязательно)
- filename (query, обязательно)
- Idempotency-Key (header, обязательно)

```json
{
  "type": "string",
  "format": "binary"
}
```

### prepareOwnBankStatement

Подготовить файл для своего профиля

POST /api/v1/profiles/{profileId}/bank-statements

Scopes: crm:banks:write

Параметры:
- profileId (path, обязательно)
- filename (query, обязательно)
- provider (query, обязательно)
- Idempotency-Key (header, обязательно)

```json
{
  "type": "string",
  "format": "binary"
}
```

### prepareOwnDealMaterial

Подготовить файл для своего профиля

POST /api/v1/profiles/{profileId}/crm/deals/{dealId}/uploads

Scopes: crm:write, media:write

Параметры:
- profileId (path, обязательно)
- dealId (path, обязательно)
- filename (query, обязательно)
- Idempotency-Key (header, обязательно)

```json
{
  "type": "string",
  "format": "binary"
}
```

### prepareOwnExternalAttachment

Подготовить файл для своего профиля

POST /api/v1/profiles/{profileId}/crm/deals/{dealId}/external-media

Scopes: crm:messages:write, media:write

Параметры:
- profileId (path, обязательно)
- dealId (path, обязательно)
- filename (query, обязательно)
- conversation_id (query, обязательно)

```json
{
  "type": "string",
  "format": "binary"
}
```

### importOwnExternalAttachment

Подготовить вложение из своих документов и медиатеки

POST /api/v1/profiles/{profileId}/crm/deals/{dealId}/external-media/import

Scopes: crm:messages:write, media:write

Параметры:
- profileId (path, обязательно)
- dealId (path, обязательно)

```json
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "conversation_id",
    "source"
  ],
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid"
    },
    "source": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "id"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "media_asset",
            "profile_document",
            "message_template"
          ]
        },
        "id": {
          "type": "string",
          "format": "uuid"
        }
      }
    }
  }
}
```

### prepareOwnConnectionSecret

Сохранить секрет подключения в зашифрованную временную загрузку

POST /api/v1/profiles/{profileId}/secrets

Параметры:
- profileId (path, обязательно)

```json
{
  "type": "object",
  "required": [
    "purpose",
    "value",
    "idempotency_key"
  ],
  "properties": {
    "purpose": {
      "type": "string",
      "enum": [
        "payment_provider",
        "crm_connection"
      ]
    },
    "value": {
      "type": "object"
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128
    }
  }
}
```

### profile.set_publication

Изменить публикацию профиля

POST /api/v1/profiles/{profileId}/actions

Scopes: profiles:publish

MCP: profile_set_publication

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "published": {
      "type": "boolean"
    }
  },
  "required": [
    "published"
  ],
  "additionalProperties": false
}
```

### team.invite_member

Пригласить участника команды

POST /api/v1/profiles/{profileId}/actions

Scopes: team:write

MCP: team_invite_member

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "phone": {
      "type": "string",
      "minLength": 1
    },
    "role": {
      "type": "string",
      "enum": [
        "manager",
        "viewer",
        "staff"
      ]
    }
  },
  "required": [
    "phone"
  ],
  "additionalProperties": false
}
```

### team.set_member_role

Изменить роль участника команды

POST /api/v1/profiles/{profileId}/actions

Scopes: team:write

MCP: team_set_member_role

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "member_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "manager",
            "viewer",
            "staff"
          ]
        }
      },
      "required": [
        "role"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "member_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### team.set_member_permissions

Изменить права участника команды

POST /api/v1/profiles/{profileId}/actions

Scopes: team:write

MCP: team_set_member_permissions

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "member_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "permissions": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "enum": [
              "edit_profile",
              "manage_services",
              "manage_orders",
              "manage_messages",
              "respond_requests",
              "manage_bookings",
              "view_calendar",
              "manage_assigned_events",
              "manage_documents",
              "manage_reviews",
              "view_analytics",
              "manage_promotions",
              "manage_deal_assignments",
              "manage_finances",
              "manage_inventory"
            ]
          },
          "additionalProperties": {
            "type": "boolean"
          }
        }
      },
      "required": [
        "permissions"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "member_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### team.remove_member

Удалить участника команды

POST /api/v1/profiles/{profileId}/actions

Scopes: team:write

MCP: team_remove_member

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "member_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "member_id"
  ],
  "additionalProperties": false
}
```

### documents.save_batch

Сохранить несколько документов

POST /api/v1/profiles/{profileId}/actions

Scopes: documents:write

MCP: documents_save_batch

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "legal_form": {
      "type": "string",
      "enum": [
        "private",
        "self_employed",
        "ip",
        "ooo"
      ]
    },
    "documents": {
      "minItems": 1,
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "doc_type": {
            "type": "string",
            "enum": [
              "generated",
              "custom",
              "uploaded"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "legal",
              "booking_rules",
              "instruction",
              "checklist",
              "other"
            ]
          },
          "content_html": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "content_data": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "file_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "file_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "file_size": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 20971520
              },
              {
                "type": "null"
              }
            ]
          },
          "file_mime_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "application/pdf",
                  "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "require_acceptance": {
            "type": "boolean"
          },
          "is_ai_source": {
            "type": "boolean"
          },
          "extracted_text": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "extraction_status": {
            "type": "string",
            "enum": [
              "not_needed",
              "pending",
              "ready",
              "empty",
              "error"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "expected_revision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "action": {
            "default": "save_draft",
            "type": "string",
            "enum": [
              "save_draft",
              "publish"
            ]
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "documents"
  ],
  "additionalProperties": false
}
```

### documents.extract_text

Извлечь текст из файла документа

POST /api/v1/profiles/{profileId}/actions

Scopes: documents:write

MCP: documents_extract_text

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "document_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "expected_revision": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "document_id",
    "expected_revision"
  ],
  "additionalProperties": false
}
```

### documents.create

Создать документ профиля

POST /api/v1/profiles/{profileId}/actions

Scopes: documents:write

MCP: documents_create

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "doc_type": {
      "type": "string",
      "enum": [
        "generated",
        "custom",
        "uploaded"
      ]
    },
    "category": {
      "type": "string",
      "enum": [
        "legal",
        "booking_rules",
        "instruction",
        "checklist",
        "other"
      ]
    },
    "content_html": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100000
        },
        {
          "type": "null"
        }
      ]
    },
    "content_data": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    },
    "file_url": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2048
        },
        {
          "type": "null"
        }
      ]
    },
    "file_name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ]
    },
    "file_size": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 20971520
        },
        {
          "type": "null"
        }
      ]
    },
    "file_mime_type": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "application/pdf",
            "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "require_acceptance": {
      "type": "boolean"
    },
    "is_ai_source": {
      "type": "boolean"
    },
    "extracted_text": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100000
        },
        {
          "type": "null"
        }
      ]
    },
    "extraction_status": {
      "type": "string",
      "enum": [
        "not_needed",
        "pending",
        "ready",
        "empty",
        "error"
      ]
    },
    "action": {
      "default": "save_draft",
      "type": "string",
      "enum": [
        "save_draft",
        "publish"
      ]
    },
    "is_active": {
      "type": "boolean"
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
```

### documents.update

Сохранить, опубликовать или архивировать документ

POST /api/v1/profiles/{profileId}/actions

Scopes: documents:write

MCP: documents_update

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "document_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "doc_type": {
          "type": "string",
          "enum": [
            "generated",
            "custom",
            "uploaded"
          ]
        },
        "category": {
          "type": "string",
          "enum": [
            "legal",
            "booking_rules",
            "instruction",
            "checklist",
            "other"
          ]
        },
        "content_html": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 100000
            },
            {
              "type": "null"
            }
          ]
        },
        "content_data": {
          "anyOf": [
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            {
              "type": "null"
            }
          ]
        },
        "file_url": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2048
            },
            {
              "type": "null"
            }
          ]
        },
        "file_name": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ]
        },
        "file_size": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 20971520
            },
            {
              "type": "null"
            }
          ]
        },
        "file_mime_type": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "application/pdf",
                "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "require_acceptance": {
          "type": "boolean"
        },
        "is_ai_source": {
          "type": "boolean"
        },
        "extracted_text": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 100000
            },
            {
              "type": "null"
            }
          ]
        },
        "extraction_status": {
          "type": "string",
          "enum": [
            "not_needed",
            "pending",
            "ready",
            "empty",
            "error"
          ]
        },
        "action": {
          "default": "save_draft",
          "type": "string",
          "enum": [
            "save_draft",
            "publish",
            "archive",
            "restore",
            "discard_draft"
          ]
        },
        "expected_revision": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "is_active": {
          "type": "boolean"
        },
        "sort_order": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "expected_revision"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "document_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### quizzes.create

Создать калькулятор профиля

POST /api/v1/profiles/{profileId}/actions

Scopes: quizzes:write

MCP: quizzes_create

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "description": {
      "type": "string",
      "maxLength": 500
    },
    "cta_label": {
      "type": "string",
      "maxLength": 100
    },
    "submit_label": {
      "type": "string",
      "maxLength": 100
    },
    "start_price": {
      "type": "number",
      "minimum": 0
    },
    "currency": {
      "type": "string",
      "maxLength": 10
    },
    "schema": {
      "type": "object",
      "properties": {
        "version": {
          "type": "number",
          "const": 1
        },
        "steps": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "title": {
                "type": "string",
                "maxLength": 300
              },
              "description": {
                "type": "string",
                "maxLength": 800
              },
              "image": {
                "type": "string",
                "maxLength": 1000
              },
              "showIf": {
                "$ref": "#/$defs/__schema0"
              },
              "fields": {
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "code": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "radio",
                        "checkbox",
                        "slider",
                        "image-choice",
                        "image",
                        "name",
                        "phone",
                        "email",
                        "text",
                        "textarea",
                        "number",
                        "date",
                        "consent",
                        "formula",
                        "file",
                        "info"
                      ]
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 300
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 800
                    },
                    "placeholder": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "help": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "required": {
                      "type": "boolean"
                    },
                    "hidden": {
                      "type": "boolean"
                    },
                    "showLabel": {
                      "type": "boolean"
                    },
                    "showDescription": {
                      "type": "boolean"
                    },
                    "layout": {
                      "type": "object",
                      "properties": {
                        "column": {
                          "type": "string",
                          "enum": [
                            "full",
                            "left",
                            "right"
                          ]
                        }
                      },
                      "additionalProperties": {}
                    },
                    "columns": {
                      "anyOf": [
                        {
                          "type": "number",
                          "const": 1
                        },
                        {
                          "type": "number",
                          "const": 2
                        },
                        {
                          "type": "number",
                          "const": 3
                        },
                        {
                          "type": "number",
                          "const": 4
                        }
                      ]
                    },
                    "mobileColumns": {
                      "anyOf": [
                        {
                          "type": "number",
                          "const": 1
                        },
                        {
                          "type": "number",
                          "const": 2
                        },
                        {
                          "type": "number",
                          "const": 3
                        },
                        {
                          "type": "number",
                          "const": 4
                        }
                      ]
                    },
                    "showIf": {
                      "$ref": "#/$defs/__schema0"
                    },
                    "options": {
                      "maxItems": 50,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 60
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "labelHtml": {
                            "type": "string",
                            "maxLength": 2000
                          },
                          "description": {
                            "type": "string",
                            "maxLength": 500
                          },
                          "image": {
                            "type": "string",
                            "maxLength": 1000
                          },
                          "price": {
                            "type": "number"
                          },
                          "priceOff": {
                            "type": "number"
                          },
                          "goToStep": {
                            "type": "string"
                          },
                          "group": {
                            "type": "string",
                            "maxLength": 60
                          },
                          "isDefault": {
                            "type": "boolean"
                          },
                          "isOther": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "label"
                        ],
                        "additionalProperties": {}
                      }
                    },
                    "multi": {
                      "type": "boolean"
                    },
                    "withTime": {
                      "type": "boolean"
                    },
                    "slider": {
                      "type": "object",
                      "properties": {
                        "min": {
                          "type": "number"
                        },
                        "max": {
                          "type": "number"
                        },
                        "step": {
                          "type": "number",
                          "exclusiveMinimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "maxLength": 30
                        },
                        "default": {
                          "type": "number"
                        },
                        "includedUntil": {
                          "type": "number"
                        },
                        "pricePerUnit": {
                          "type": "number"
                        },
                        "priceFrom": {
                          "type": "number"
                        },
                        "priceTo": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "min",
                        "max"
                      ],
                      "additionalProperties": {}
                    },
                    "info": {
                      "type": "object",
                      "properties": {
                        "text": {
                          "type": "string",
                          "maxLength": 2000
                        },
                        "textHtml": {
                          "type": "string",
                          "maxLength": 20000
                        },
                        "image": {
                          "type": "string",
                          "maxLength": 1000
                        },
                        "fontSize": {
                          "type": "integer",
                          "minimum": 10,
                          "maximum": 72
                        },
                        "lineHeight": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 2.5
                        },
                        "align": {
                          "type": "string",
                          "enum": [
                            "left",
                            "center",
                            "right"
                          ]
                        },
                        "fontFamily": {
                          "type": "string",
                          "enum": [
                            "sans",
                            "serif",
                            "mono"
                          ]
                        },
                        "paddingX": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 80
                        },
                        "paddingY": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 80
                        },
                        "marginTop": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 120
                        },
                        "marginBottom": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 120
                        },
                        "background": {
                          "type": "string",
                          "enum": [
                            "none",
                            "accent",
                            "card"
                          ]
                        }
                      },
                      "additionalProperties": {}
                    },
                    "image": {
                      "type": "string",
                      "maxLength": 1000
                    },
                    "imageAspect": {
                      "type": "string",
                      "enum": [
                        "1:1",
                        "4:3",
                        "16:9",
                        "3:4"
                      ]
                    },
                    "maxLength": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "minLength": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "consent": {
                      "type": "object",
                      "properties": {
                        "text": {
                          "type": "string",
                          "maxLength": 1000
                        },
                        "textHtml": {
                          "type": "string",
                          "maxLength": 5000
                        },
                        "linkUrl": {
                          "type": "string",
                          "maxLength": 1000
                        },
                        "linkLabel": {
                          "type": "string",
                          "maxLength": 160
                        }
                      },
                      "additionalProperties": {}
                    },
                    "formula": {
                      "type": "object",
                      "properties": {
                        "expression": {
                          "type": "string",
                          "maxLength": 2000
                        },
                        "rounding": {
                          "type": "string",
                          "enum": [
                            "none",
                            "integer",
                            "decimal"
                          ]
                        },
                        "format": {
                          "type": "object",
                          "properties": {
                            "prefix": {
                              "type": "string",
                              "maxLength": 30
                            },
                            "suffix": {
                              "type": "string",
                              "maxLength": 30
                            },
                            "thousandsSep": {
                              "type": "string",
                              "maxLength": 2
                            },
                            "decimalsVisibility": {
                              "type": "string",
                              "enum": [
                                "always",
                                "hideForWhole",
                                "never"
                              ]
                            },
                            "decimalSep": {
                              "type": "string",
                              "maxLength": 2
                            },
                            "decimalsPosition": {
                              "type": "string",
                              "enum": [
                                "top",
                                "normal",
                                "bottom"
                              ]
                            },
                            "roundingMode": {
                              "type": "string",
                              "enum": [
                                "math",
                                "down",
                                "up"
                              ]
                            },
                            "roundingDigits": {
                              "type": "integer",
                              "minimum": -6,
                              "maximum": 6
                            },
                            "align": {
                              "type": "string",
                              "enum": [
                                "left",
                                "center",
                                "right"
                              ]
                            }
                          },
                          "additionalProperties": {}
                        }
                      },
                      "additionalProperties": {}
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "label"
                  ],
                  "additionalProperties": {}
                }
              },
              "hideTitle": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "title",
              "fields"
            ],
            "additionalProperties": {}
          }
        },
        "logic": {
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "when": {
                "$ref": "#/$defs/__schema0"
              },
              "then": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "show",
                        "hide",
                        "goToStep",
                        "skipStep"
                      ]
                    },
                    "target": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "required": [
                    "kind",
                    "target"
                  ],
                  "additionalProperties": {}
                }
              }
            },
            "required": [
              "id",
              "when",
              "then"
            ],
            "additionalProperties": {}
          }
        }
      },
      "required": [
        "version",
        "steps"
      ],
      "additionalProperties": {}
    },
    "settings": {
      "type": "object",
      "properties": {
        "teaserLabel": {
          "type": "string",
          "maxLength": 60
        },
        "teaserLabelHtml": {
          "type": "string",
          "maxLength": 5000
        },
        "teaserTitleHtml": {
          "type": "string",
          "maxLength": 5000
        },
        "teaserDescriptionHtml": {
          "type": "string",
          "maxLength": 5000
        },
        "successText": {
          "type": "string",
          "maxLength": 1000
        },
        "priceSuffix": {
          "type": "string",
          "maxLength": 50
        },
        "createDealOnSubmit": {
          "type": "boolean"
        },
        "crmEnabled": {
          "type": "boolean"
        },
        "zumzamMapping": {
          "type": "object",
          "properties": {
            "order": {
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "sourceLabel": {
                    "type": "string",
                    "maxLength": 240
                  },
                  "target": {
                    "type": "string",
                    "enum": [
                      "deal_title",
                      "client_message",
                      "event_date",
                      "event_time",
                      "event_address",
                      "children_count",
                      "child_age",
                      "service_name",
                      "notes"
                    ]
                  }
                },
                "required": [
                  "source",
                  "sourceLabel",
                  "target"
                ],
                "additionalProperties": {}
              }
            },
            "crm": {
              "maxItems": 80,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "sourceLabel": {
                    "type": "string",
                    "maxLength": 240
                  },
                  "targetKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "targetLabel": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "targetType": {
                    "type": "string",
                    "enum": [
                      "text",
                      "number",
                      "date",
                      "checkbox"
                    ]
                  }
                },
                "required": [
                  "source",
                  "sourceLabel",
                  "targetKey",
                  "targetLabel"
                ],
                "additionalProperties": {}
              }
            }
          },
          "additionalProperties": {}
        },
        "contactForm": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "maxLength": 120
            },
            "description": {
              "type": "string",
              "maxLength": 300
            },
            "name": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "required": {
                  "type": "boolean"
                },
                "label": {
                  "type": "string",
                  "maxLength": 80
                },
                "placeholder": {
                  "type": "string",
                  "maxLength": 120
                }
              },
              "additionalProperties": {}
            },
            "phone": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "required": {
                  "type": "boolean"
                },
                "label": {
                  "type": "string",
                  "maxLength": 80
                },
                "placeholder": {
                  "type": "string",
                  "maxLength": 120
                }
              },
              "additionalProperties": {}
            },
            "email": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "required": {
                  "type": "boolean"
                },
                "label": {
                  "type": "string",
                  "maxLength": 80
                },
                "placeholder": {
                  "type": "string",
                  "maxLength": 120
                }
              },
              "additionalProperties": {}
            }
          },
          "additionalProperties": {}
        },
        "appearance": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string",
              "enum": [
                "glass",
                "flat"
              ]
            },
            "primaryColor": {
              "type": "string",
              "maxLength": 9
            },
            "background": {
              "type": "object",
              "properties": {
                "colors": {
                  "maxItems": 6,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "maxLength": 9
                  }
                },
                "opacity": {
                  "type": "number",
                  "minimum": 10,
                  "maximum": 100
                },
                "blur": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 80
                },
                "size": {
                  "type": "number",
                  "minimum": 80,
                  "maximum": 300
                },
                "seed": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "blobCount": {
                  "type": "integer",
                  "minimum": 3,
                  "maximum": 40
                }
              },
              "required": [
                "colors",
                "opacity",
                "blur",
                "size",
                "seed",
                "blobCount"
              ],
              "additionalProperties": {}
            },
            "surfaceOpacity": {
              "type": "integer",
              "minimum": 45,
              "maximum": 95
            },
            "cornerRadius": {
              "type": "string",
              "enum": [
                "sharp",
                "soft",
                "round"
              ]
            },
            "contentWidth": {
              "type": "string",
              "enum": [
                "narrow",
                "regular",
                "wide"
              ]
            },
            "cardTheme": {
              "type": "string",
              "enum": [
                "light",
                "dark"
              ]
            },
            "density": {
              "type": "number",
              "minimum": 0,
              "maximum": 100
            },
            "titleSize": {
              "type": "number",
              "minimum": 16,
              "maximum": 48
            },
            "titleWeight": {
              "type": "number",
              "minimum": 400,
              "maximum": 800
            },
            "titleAlign": {
              "type": "string",
              "enum": [
                "left",
                "center"
              ]
            },
            "descSize": {
              "type": "number",
              "minimum": 12,
              "maximum": 24
            },
            "descWeight": {
              "type": "number",
              "minimum": 400,
              "maximum": 700
            },
            "descAlign": {
              "type": "string",
              "enum": [
                "left",
                "center"
              ]
            },
            "buttonBg": {
              "type": "string",
              "maxLength": 9
            },
            "buttonText": {
              "type": "string",
              "maxLength": 9
            },
            "buttonFontSize": {
              "type": "number",
              "minimum": 13,
              "maximum": 24
            },
            "buttonWeight": {
              "type": "number",
              "minimum": 400,
              "maximum": 800
            },
            "buttonSize": {
              "type": "string",
              "enum": [
                "s",
                "m",
                "l"
              ]
            },
            "mobileOptionColumns": {
              "type": "string",
              "enum": [
                "single",
                "configured"
              ]
            }
          },
          "additionalProperties": {}
        },
        "appearanceMobile": {
          "type": "object",
          "properties": {
            "surface": {
              "type": "string",
              "enum": [
                "glass",
                "flat"
              ]
            },
            "primaryColor": {
              "type": "string",
              "maxLength": 9
            },
            "background": {
              "type": "object",
              "properties": {
                "colors": {
                  "maxItems": 6,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "maxLength": 9
                  }
                },
                "opacity": {
                  "type": "number",
                  "minimum": 10,
                  "maximum": 100
                },
                "blur": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 80
                },
                "size": {
                  "type": "number",
                  "minimum": 80,
                  "maximum": 300
                },
                "seed": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "blobCount": {
                  "type": "integer",
                  "minimum": 3,
                  "maximum": 40
                }
              },
              "required": [
                "colors",
                "opacity",
                "blur",
                "size",
                "seed",
                "blobCount"
              ],
              "additionalProperties": {}
            },
            "surfaceOpacity": {
              "type": "integer",
              "minimum": 45,
              "maximum": 95
            },
            "cornerRadius": {
              "type": "string",
              "enum": [
                "sharp",
                "soft",
                "round"
              ]
            },
            "contentWidth": {
              "type": "string",
              "enum": [
                "narrow",
                "regular",
                "wide"
              ]
            },
            "cardTheme": {
              "type": "string",
              "enum": [
                "light",
                "dark"
              ]
            },
            "density": {
              "type": "number",
              "minimum": 0,
              "maximum": 100
            },
            "titleSize": {
              "type": "number",
              "minimum": 16,
              "maximum": 48
            },
            "titleWeight": {
              "type": "number",
              "minimum": 400,
              "maximum": 800
            },
            "titleAlign": {
              "type": "string",
              "enum": [
                "left",
                "center"
              ]
            },
            "descSize": {
              "type": "number",
              "minimum": 12,
              "maximum": 24
            },
            "descWeight": {
              "type": "number",
              "minimum": 400,
              "maximum": 700
            },
            "descAlign": {
              "type": "string",
              "enum": [
                "left",
                "center"
              ]
            },
            "buttonBg": {
              "type": "string",
              "maxLength": 9
            },
            "buttonText": {
              "type": "string",
              "maxLength": 9
            },
            "buttonFontSize": {
              "type": "number",
              "minimum": 13,
              "maximum": 24
            },
            "buttonWeight": {
              "type": "number",
              "minimum": 400,
              "maximum": 800
            },
            "buttonSize": {
              "type": "string",
              "enum": [
                "s",
                "m",
                "l"
              ]
            },
            "mobileOptionColumns": {
              "type": "string",
              "enum": [
                "single",
                "configured"
              ]
            }
          },
          "additionalProperties": {}
        },
        "appearanceHistory": {
          "maxItems": 12,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "maxLength": 64
              },
              "label": {
                "type": "string",
                "maxLength": 80
              },
              "savedAt": {
                "type": "string",
                "maxLength": 40
              },
              "appearance": {
                "type": "object",
                "properties": {
                  "surface": {
                    "type": "string",
                    "enum": [
                      "glass",
                      "flat"
                    ]
                  },
                  "primaryColor": {
                    "type": "string",
                    "maxLength": 9
                  },
                  "background": {
                    "type": "object",
                    "properties": {
                      "colors": {
                        "maxItems": 6,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 9
                        }
                      },
                      "opacity": {
                        "type": "number",
                        "minimum": 10,
                        "maximum": 100
                      },
                      "blur": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 80
                      },
                      "size": {
                        "type": "number",
                        "minimum": 80,
                        "maximum": 300
                      },
                      "seed": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "blobCount": {
                        "type": "integer",
                        "minimum": 3,
                        "maximum": 40
                      }
                    },
                    "required": [
                      "colors",
                      "opacity",
                      "blur",
                      "size",
                      "seed",
                      "blobCount"
                    ],
                    "additionalProperties": {}
                  },
                  "surfaceOpacity": {
                    "type": "integer",
                    "minimum": 45,
                    "maximum": 95
                  },
                  "cornerRadius": {
                    "type": "string",
                    "enum": [
                      "sharp",
                      "soft",
                      "round"
                    ]
                  },
                  "contentWidth": {
                    "type": "string",
                    "enum": [
                      "narrow",
                      "regular",
                      "wide"
                    ]
                  },
                  "cardTheme": {
                    "type": "string",
                    "enum": [
                      "light",
                      "dark"
                    ]
                  },
                  "density": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "titleSize": {
                    "type": "number",
                    "minimum": 16,
                    "maximum": 48
                  },
                  "titleWeight": {
                    "type": "number",
                    "minimum": 400,
                    "maximum": 800
                  },
                  "titleAlign": {
                    "type": "string",
                    "enum": [
                      "left",
                      "center"
                    ]
                  },
                  "descSize": {
                    "type": "number",
                    "minimum": 12,
                    "maximum": 24
                  },
                  "descWeight": {
                    "type": "number",
                    "minimum": 400,
                    "maximum": 700
                  },
                  "descAlign": {
                    "type": "string",
                    "enum": [
                      "left",
                      "center"
                    ]
                  },
                  "buttonBg": {
                    "type": "string",
                    "maxLength": 9
                  },
                  "buttonText": {
                    "type": "string",
                    "maxLength": 9
                  },
                  "buttonFontSize": {
                    "type": "number",
                    "minimum": 13,
                    "maximum": 24
                  },
                  "buttonWeight": {
                    "type": "number",
                    "minimum": 400,
                    "maximum": 800
                  },
                  "buttonSize": {
                    "type": "string",
                    "enum": [
                      "s",
                      "m",
                      "l"
                    ]
                  },
                  "mobileOptionColumns": {
                    "type": "string",
                    "enum": [
                      "single",
                      "configured"
                    ]
                  }
                },
                "additionalProperties": {}
              },
              "appearanceMobile": {
                "type": "object",
                "properties": {
                  "surface": {
                    "type": "string",
                    "enum": [
                      "glass",
                      "flat"
                    ]
                  },
                  "primaryColor": {
                    "type": "string",
                    "maxLength": 9
                  },
                  "background": {
                    "type": "object",
                    "properties": {
                      "colors": {
                        "maxItems": 6,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 9
                        }
                      },
                      "opacity": {
                        "type": "number",
                        "minimum": 10,
                        "maximum": 100
                      },
                      "blur": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 80
                      },
                      "size": {
                        "type": "number",
                        "minimum": 80,
                        "maximum": 300
                      },
                      "seed": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "blobCount": {
                        "type": "integer",
                        "minimum": 3,
                        "maximum": 40
                      }
                    },
                    "required": [
                      "colors",
                      "opacity",
                      "blur",
                      "size",
                      "seed",
                      "blobCount"
                    ],
                    "additionalProperties": {}
                  },
                  "surfaceOpacity": {
                    "type": "integer",
                    "minimum": 45,
                    "maximum": 95
                  },
                  "cornerRadius": {
                    "type": "string",
                    "enum": [
                      "sharp",
                      "soft",
                      "round"
                    ]
                  },
                  "contentWidth": {
                    "type": "string",
                    "enum": [
                      "narrow",
                      "regular",
                      "wide"
                    ]
                  },
                  "cardTheme": {
                    "type": "string",
                    "enum": [
                      "light",
                      "dark"
                    ]
                  },
                  "density": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "titleSize": {
                    "type": "number",
                    "minimum": 16,
                    "maximum": 48
                  },
                  "titleWeight": {
                    "type": "number",
                    "minimum": 400,
                    "maximum": 800
                  },
                  "titleAlign": {
                    "type": "string",
                    "enum": [
                      "left",
                      "center"
                    ]
                  },
                  "descSize": {
                    "type": "number",
                    "minimum": 12,
                    "maximum": 24
                  },
                  "descWeight": {
                    "type": "number",
                    "minimum": 400,
                    "maximum": 700
                  },
                  "descAlign": {
                    "type": "string",
                    "enum": [
                      "left",
                      "center"
                    ]
                  },
                  "buttonBg": {
                    "type": "string",
                    "maxLength": 9
                  },
                  "buttonText": {
                    "type": "string",
                    "maxLength": 9
                  },
                  "buttonFontSize": {
                    "type": "number",
                    "minimum": 13,
                    "maximum": 24
                  },
                  "buttonWeight": {
                    "type": "number",
                    "minimum": 400,
                    "maximum": 800
                  },
                  "buttonSize": {
                    "type": "string",
                    "enum": [
                      "s",
                      "m",
                      "l"
                    ]
                  },
                  "mobileOptionColumns": {
                    "type": "string",
                    "enum": [
                      "single",
                      "configured"
                    ]
                  }
                },
                "additionalProperties": {}
              }
            },
            "required": [
              "id",
              "label",
              "savedAt",
              "appearance"
            ],
            "additionalProperties": {}
          }
        },
        "amoCrm": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "pipelineId": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 40
                },
                {
                  "type": "null"
                }
              ]
            },
            "statusId": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 40
                },
                {
                  "type": "null"
                }
              ]
            },
            "leadTitleTemplate": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 240
                },
                {
                  "type": "null"
                }
              ]
            },
            "tags": {
              "maxItems": 10,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              }
            },
            "noteIncludeContact": {
              "type": "boolean"
            },
            "noteIncludeAnswers": {
              "type": "boolean"
            },
            "noteIncludeFormulas": {
              "type": "boolean"
            },
            "noteIncludeUtm": {
              "type": "boolean"
            },
            "noteStepTitleMode": {
              "type": "string",
              "enum": [
                "auto",
                "always",
                "never"
              ]
            },
            "taskEnabled": {
              "type": "boolean"
            },
            "taskTextTemplate": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500
                },
                {
                  "type": "null"
                }
              ]
            },
            "taskDueMinutes": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 5,
                  "maximum": 10080
                },
                {
                  "type": "null"
                }
              ]
            },
            "fieldMapping": {
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "sourceLabel": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "targetEntity": {
                    "type": "string",
                    "enum": [
                      "lead",
                      "contact"
                    ]
                  },
                  "targetFieldId": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "targetFieldCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "targetFieldName": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "targetFieldType": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "valueTargetMode": {
                    "type": "string",
                    "enum": [
                      "single",
                      "perOption"
                    ]
                  },
                  "valueMap": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "sourceValue": {
                          "type": "string",
                          "maxLength": 300
                        },
                        "targetValue": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 500
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "enumId": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "targetEntity": {
                          "type": "string",
                          "enum": [
                            "lead",
                            "contact"
                          ]
                        },
                        "targetFieldId": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "targetFieldCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 40
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "targetFieldName": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "targetFieldType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 40
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "sourceValue"
                      ],
                      "additionalProperties": {}
                    }
                  }
                },
                "required": [
                  "source",
                  "sourceLabel",
                  "targetEntity",
                  "targetFieldName"
                ],
                "additionalProperties": {}
              }
            }
          },
          "additionalProperties": {}
        },
        "hideStepProgress": {
          "type": "boolean"
        },
        "hideOptionPrices": {
          "type": "boolean"
        },
        "hideResultUntilComplete": {
          "type": "boolean"
        },
        "showFinalPriceSummary": {
          "type": "boolean"
        }
      },
      "additionalProperties": {}
    },
    "is_active": {
      "type": "boolean"
    }
  },
  "required": [
    "title"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "field": {
          "type": "string",
          "minLength": 1
        },
        "op": {
          "type": "string",
          "enum": [
            "eq",
            "neq",
            "in",
            "notIn",
            "gt",
            "gte",
            "lt",
            "lte",
            "contains",
            "containsAll",
            "notEmpty",
            "empty"
          ]
        },
        "value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            {
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          ]
        },
        "and": {
          "maxItems": 20,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        "or": {
          "maxItems": 20,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        }
      },
      "required": [
        "field",
        "op"
      ],
      "additionalProperties": {}
    }
  }
}
```

### quizzes.update

Изменить вопросы, расчёт и настройки калькулятора

POST /api/v1/profiles/{profileId}/actions

Scopes: quizzes:write

MCP: quizzes_update

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "description": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 500
            },
            {
              "type": "null"
            }
          ]
        },
        "cta_label": {
          "type": "string",
          "maxLength": 100
        },
        "submit_label": {
          "type": "string",
          "maxLength": 100
        },
        "start_price": {
          "type": "number",
          "minimum": 0
        },
        "currency": {
          "type": "string",
          "maxLength": 10
        },
        "schema": {
          "type": "object",
          "properties": {
            "version": {
              "type": "number",
              "const": 1
            },
            "steps": {
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 800
                  },
                  "image": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "showIf": {
                    "$ref": "#/$defs/__schema0"
                  },
                  "fields": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 60
                        },
                        "code": {
                          "type": "string",
                          "maxLength": 20
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "radio",
                            "checkbox",
                            "slider",
                            "image-choice",
                            "image",
                            "name",
                            "phone",
                            "email",
                            "text",
                            "textarea",
                            "number",
                            "date",
                            "consent",
                            "formula",
                            "file",
                            "info"
                          ]
                        },
                        "label": {
                          "type": "string",
                          "maxLength": 300
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 800
                        },
                        "placeholder": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "help": {
                          "type": "string",
                          "maxLength": 500
                        },
                        "required": {
                          "type": "boolean"
                        },
                        "hidden": {
                          "type": "boolean"
                        },
                        "showLabel": {
                          "type": "boolean"
                        },
                        "showDescription": {
                          "type": "boolean"
                        },
                        "layout": {
                          "type": "object",
                          "properties": {
                            "column": {
                              "type": "string",
                              "enum": [
                                "full",
                                "left",
                                "right"
                              ]
                            }
                          },
                          "additionalProperties": {}
                        },
                        "columns": {
                          "anyOf": [
                            {
                              "type": "number",
                              "const": 1
                            },
                            {
                              "type": "number",
                              "const": 2
                            },
                            {
                              "type": "number",
                              "const": 3
                            },
                            {
                              "type": "number",
                              "const": 4
                            }
                          ]
                        },
                        "mobileColumns": {
                          "anyOf": [
                            {
                              "type": "number",
                              "const": 1
                            },
                            {
                              "type": "number",
                              "const": 2
                            },
                            {
                              "type": "number",
                              "const": 3
                            },
                            {
                              "type": "number",
                              "const": 4
                            }
                          ]
                        },
                        "showIf": {
                          "$ref": "#/$defs/__schema0"
                        },
                        "options": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 60
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "labelHtml": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "description": {
                                "type": "string",
                                "maxLength": 500
                              },
                              "image": {
                                "type": "string",
                                "maxLength": 1000
                              },
                              "price": {
                                "type": "number"
                              },
                              "priceOff": {
                                "type": "number"
                              },
                              "goToStep": {
                                "type": "string"
                              },
                              "group": {
                                "type": "string",
                                "maxLength": 60
                              },
                              "isDefault": {
                                "type": "boolean"
                              },
                              "isOther": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "id",
                              "label"
                            ],
                            "additionalProperties": {}
                          }
                        },
                        "multi": {
                          "type": "boolean"
                        },
                        "withTime": {
                          "type": "boolean"
                        },
                        "slider": {
                          "type": "object",
                          "properties": {
                            "min": {
                              "type": "number"
                            },
                            "max": {
                              "type": "number"
                            },
                            "step": {
                              "type": "number",
                              "exclusiveMinimum": 0
                            },
                            "unit": {
                              "type": "string",
                              "maxLength": 30
                            },
                            "default": {
                              "type": "number"
                            },
                            "includedUntil": {
                              "type": "number"
                            },
                            "pricePerUnit": {
                              "type": "number"
                            },
                            "priceFrom": {
                              "type": "number"
                            },
                            "priceTo": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "min",
                            "max"
                          ],
                          "additionalProperties": {}
                        },
                        "info": {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string",
                              "maxLength": 2000
                            },
                            "textHtml": {
                              "type": "string",
                              "maxLength": 20000
                            },
                            "image": {
                              "type": "string",
                              "maxLength": 1000
                            },
                            "fontSize": {
                              "type": "integer",
                              "minimum": 10,
                              "maximum": 72
                            },
                            "lineHeight": {
                              "type": "number",
                              "minimum": 1,
                              "maximum": 2.5
                            },
                            "align": {
                              "type": "string",
                              "enum": [
                                "left",
                                "center",
                                "right"
                              ]
                            },
                            "fontFamily": {
                              "type": "string",
                              "enum": [
                                "sans",
                                "serif",
                                "mono"
                              ]
                            },
                            "paddingX": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 80
                            },
                            "paddingY": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 80
                            },
                            "marginTop": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 120
                            },
                            "marginBottom": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 120
                            },
                            "background": {
                              "type": "string",
                              "enum": [
                                "none",
                                "accent",
                                "card"
                              ]
                            }
                          },
                          "additionalProperties": {}
                        },
                        "image": {
                          "type": "string",
                          "maxLength": 1000
                        },
                        "imageAspect": {
                          "type": "string",
                          "enum": [
                            "1:1",
                            "4:3",
                            "16:9",
                            "3:4"
                          ]
                        },
                        "maxLength": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "minLength": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "consent": {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string",
                              "maxLength": 1000
                            },
                            "textHtml": {
                              "type": "string",
                              "maxLength": 5000
                            },
                            "linkUrl": {
                              "type": "string",
                              "maxLength": 1000
                            },
                            "linkLabel": {
                              "type": "string",
                              "maxLength": 160
                            }
                          },
                          "additionalProperties": {}
                        },
                        "formula": {
                          "type": "object",
                          "properties": {
                            "expression": {
                              "type": "string",
                              "maxLength": 2000
                            },
                            "rounding": {
                              "type": "string",
                              "enum": [
                                "none",
                                "integer",
                                "decimal"
                              ]
                            },
                            "format": {
                              "type": "object",
                              "properties": {
                                "prefix": {
                                  "type": "string",
                                  "maxLength": 30
                                },
                                "suffix": {
                                  "type": "string",
                                  "maxLength": 30
                                },
                                "thousandsSep": {
                                  "type": "string",
                                  "maxLength": 2
                                },
                                "decimalsVisibility": {
                                  "type": "string",
                                  "enum": [
                                    "always",
                                    "hideForWhole",
                                    "never"
                                  ]
                                },
                                "decimalSep": {
                                  "type": "string",
                                  "maxLength": 2
                                },
                                "decimalsPosition": {
                                  "type": "string",
                                  "enum": [
                                    "top",
                                    "normal",
                                    "bottom"
                                  ]
                                },
                                "roundingMode": {
                                  "type": "string",
                                  "enum": [
                                    "math",
                                    "down",
                                    "up"
                                  ]
                                },
                                "roundingDigits": {
                                  "type": "integer",
                                  "minimum": -6,
                                  "maximum": 6
                                },
                                "align": {
                                  "type": "string",
                                  "enum": [
                                    "left",
                                    "center",
                                    "right"
                                  ]
                                }
                              },
                              "additionalProperties": {}
                            }
                          },
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "label"
                      ],
                      "additionalProperties": {}
                    }
                  },
                  "hideTitle": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "title",
                  "fields"
                ],
                "additionalProperties": {}
              }
            },
            "logic": {
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "when": {
                    "$ref": "#/$defs/__schema0"
                  },
                  "then": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "show",
                            "hide",
                            "goToStep",
                            "skipStep"
                          ]
                        },
                        "target": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        }
                      },
                      "required": [
                        "kind",
                        "target"
                      ],
                      "additionalProperties": {}
                    }
                  }
                },
                "required": [
                  "id",
                  "when",
                  "then"
                ],
                "additionalProperties": {}
              }
            }
          },
          "required": [
            "version",
            "steps"
          ],
          "additionalProperties": {}
        },
        "settings": {
          "type": "object",
          "properties": {
            "teaserLabel": {
              "type": "string",
              "maxLength": 60
            },
            "teaserLabelHtml": {
              "type": "string",
              "maxLength": 5000
            },
            "teaserTitleHtml": {
              "type": "string",
              "maxLength": 5000
            },
            "teaserDescriptionHtml": {
              "type": "string",
              "maxLength": 5000
            },
            "successText": {
              "type": "string",
              "maxLength": 1000
            },
            "priceSuffix": {
              "type": "string",
              "maxLength": 50
            },
            "createDealOnSubmit": {
              "type": "boolean"
            },
            "crmEnabled": {
              "type": "boolean"
            },
            "zumzamMapping": {
              "type": "object",
              "properties": {
                "order": {
                  "maxItems": 50,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "maxLength": 160
                      },
                      "sourceLabel": {
                        "type": "string",
                        "maxLength": 240
                      },
                      "target": {
                        "type": "string",
                        "enum": [
                          "deal_title",
                          "client_message",
                          "event_date",
                          "event_time",
                          "event_address",
                          "children_count",
                          "child_age",
                          "service_name",
                          "notes"
                        ]
                      }
                    },
                    "required": [
                      "source",
                      "sourceLabel",
                      "target"
                    ],
                    "additionalProperties": {}
                  }
                },
                "crm": {
                  "maxItems": 80,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "maxLength": 160
                      },
                      "sourceLabel": {
                        "type": "string",
                        "maxLength": 240
                      },
                      "targetKey": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "targetLabel": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "targetType": {
                        "type": "string",
                        "enum": [
                          "text",
                          "number",
                          "date",
                          "checkbox"
                        ]
                      }
                    },
                    "required": [
                      "source",
                      "sourceLabel",
                      "targetKey",
                      "targetLabel"
                    ],
                    "additionalProperties": {}
                  }
                }
              },
              "additionalProperties": {}
            },
            "contactForm": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "maxLength": 120
                },
                "description": {
                  "type": "string",
                  "maxLength": 300
                },
                "name": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean"
                    },
                    "required": {
                      "type": "boolean"
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "placeholder": {
                      "type": "string",
                      "maxLength": 120
                    }
                  },
                  "additionalProperties": {}
                },
                "phone": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean"
                    },
                    "required": {
                      "type": "boolean"
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "placeholder": {
                      "type": "string",
                      "maxLength": 120
                    }
                  },
                  "additionalProperties": {}
                },
                "email": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean"
                    },
                    "required": {
                      "type": "boolean"
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "placeholder": {
                      "type": "string",
                      "maxLength": 120
                    }
                  },
                  "additionalProperties": {}
                }
              },
              "additionalProperties": {}
            },
            "appearance": {
              "type": "object",
              "properties": {
                "surface": {
                  "type": "string",
                  "enum": [
                    "glass",
                    "flat"
                  ]
                },
                "primaryColor": {
                  "type": "string",
                  "maxLength": 9
                },
                "background": {
                  "type": "object",
                  "properties": {
                    "colors": {
                      "maxItems": 6,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "maxLength": 9
                      }
                    },
                    "opacity": {
                      "type": "number",
                      "minimum": 10,
                      "maximum": 100
                    },
                    "blur": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 80
                    },
                    "size": {
                      "type": "number",
                      "minimum": 80,
                      "maximum": 300
                    },
                    "seed": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "blobCount": {
                      "type": "integer",
                      "minimum": 3,
                      "maximum": 40
                    }
                  },
                  "required": [
                    "colors",
                    "opacity",
                    "blur",
                    "size",
                    "seed",
                    "blobCount"
                  ],
                  "additionalProperties": {}
                },
                "surfaceOpacity": {
                  "type": "integer",
                  "minimum": 45,
                  "maximum": 95
                },
                "cornerRadius": {
                  "type": "string",
                  "enum": [
                    "sharp",
                    "soft",
                    "round"
                  ]
                },
                "contentWidth": {
                  "type": "string",
                  "enum": [
                    "narrow",
                    "regular",
                    "wide"
                  ]
                },
                "cardTheme": {
                  "type": "string",
                  "enum": [
                    "light",
                    "dark"
                  ]
                },
                "density": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "titleSize": {
                  "type": "number",
                  "minimum": 16,
                  "maximum": 48
                },
                "titleWeight": {
                  "type": "number",
                  "minimum": 400,
                  "maximum": 800
                },
                "titleAlign": {
                  "type": "string",
                  "enum": [
                    "left",
                    "center"
                  ]
                },
                "descSize": {
                  "type": "number",
                  "minimum": 12,
                  "maximum": 24
                },
                "descWeight": {
                  "type": "number",
                  "minimum": 400,
                  "maximum": 700
                },
                "descAlign": {
                  "type": "string",
                  "enum": [
                    "left",
                    "center"
                  ]
                },
                "buttonBg": {
                  "type": "string",
                  "maxLength": 9
                },
                "buttonText": {
                  "type": "string",
                  "maxLength": 9
                },
                "buttonFontSize": {
                  "type": "number",
                  "minimum": 13,
                  "maximum": 24
                },
                "buttonWeight": {
                  "type": "number",
                  "minimum": 400,
                  "maximum": 800
                },
                "buttonSize": {
                  "type": "string",
                  "enum": [
                    "s",
                    "m",
                    "l"
                  ]
                },
                "mobileOptionColumns": {
                  "type": "string",
                  "enum": [
                    "single",
                    "configured"
                  ]
                }
              },
              "additionalProperties": {}
            },
            "appearanceMobile": {
              "type": "object",
              "properties": {
                "surface": {
                  "type": "string",
                  "enum": [
                    "glass",
                    "flat"
                  ]
                },
                "primaryColor": {
                  "type": "string",
                  "maxLength": 9
                },
                "background": {
                  "type": "object",
                  "properties": {
                    "colors": {
                      "maxItems": 6,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "maxLength": 9
                      }
                    },
                    "opacity": {
                      "type": "number",
                      "minimum": 10,
                      "maximum": 100
                    },
                    "blur": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 80
                    },
                    "size": {
                      "type": "number",
                      "minimum": 80,
                      "maximum": 300
                    },
                    "seed": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "blobCount": {
                      "type": "integer",
                      "minimum": 3,
                      "maximum": 40
                    }
                  },
                  "required": [
                    "colors",
                    "opacity",
                    "blur",
                    "size",
                    "seed",
                    "blobCount"
                  ],
                  "additionalProperties": {}
                },
                "surfaceOpacity": {
                  "type": "integer",
                  "minimum": 45,
                  "maximum": 95
                },
                "cornerRadius": {
                  "type": "string",
                  "enum": [
                    "sharp",
                    "soft",
                    "round"
                  ]
                },
                "contentWidth": {
                  "type": "string",
                  "enum": [
                    "narrow",
                    "regular",
                    "wide"
                  ]
                },
                "cardTheme": {
                  "type": "string",
                  "enum": [
                    "light",
                    "dark"
                  ]
                },
                "density": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "titleSize": {
                  "type": "number",
                  "minimum": 16,
                  "maximum": 48
                },
                "titleWeight": {
                  "type": "number",
                  "minimum": 400,
                  "maximum": 800
                },
                "titleAlign": {
                  "type": "string",
                  "enum": [
                    "left",
                    "center"
                  ]
                },
                "descSize": {
                  "type": "number",
                  "minimum": 12,
                  "maximum": 24
                },
                "descWeight": {
                  "type": "number",
                  "minimum": 400,
                  "maximum": 700
                },
                "descAlign": {
                  "type": "string",
                  "enum": [
                    "left",
                    "center"
                  ]
                },
                "buttonBg": {
                  "type": "string",
                  "maxLength": 9
                },
                "buttonText": {
                  "type": "string",
                  "maxLength": 9
                },
                "buttonFontSize": {
                  "type": "number",
                  "minimum": 13,
                  "maximum": 24
                },
                "buttonWeight": {
                  "type": "number",
                  "minimum": 400,
                  "maximum": 800
                },
                "buttonSize": {
                  "type": "string",
                  "enum": [
                    "s",
                    "m",
                    "l"
                  ]
                },
                "mobileOptionColumns": {
                  "type": "string",
                  "enum": [
                    "single",
                    "configured"
                  ]
                }
              },
              "additionalProperties": {}
            },
            "appearanceHistory": {
              "maxItems": 12,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "savedAt": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "appearance": {
                    "type": "object",
                    "properties": {
                      "surface": {
                        "type": "string",
                        "enum": [
                          "glass",
                          "flat"
                        ]
                      },
                      "primaryColor": {
                        "type": "string",
                        "maxLength": 9
                      },
                      "background": {
                        "type": "object",
                        "properties": {
                          "colors": {
                            "maxItems": 6,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "maxLength": 9
                            }
                          },
                          "opacity": {
                            "type": "number",
                            "minimum": 10,
                            "maximum": 100
                          },
                          "blur": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 80
                          },
                          "size": {
                            "type": "number",
                            "minimum": 80,
                            "maximum": 300
                          },
                          "seed": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "blobCount": {
                            "type": "integer",
                            "minimum": 3,
                            "maximum": 40
                          }
                        },
                        "required": [
                          "colors",
                          "opacity",
                          "blur",
                          "size",
                          "seed",
                          "blobCount"
                        ],
                        "additionalProperties": {}
                      },
                      "surfaceOpacity": {
                        "type": "integer",
                        "minimum": 45,
                        "maximum": 95
                      },
                      "cornerRadius": {
                        "type": "string",
                        "enum": [
                          "sharp",
                          "soft",
                          "round"
                        ]
                      },
                      "contentWidth": {
                        "type": "string",
                        "enum": [
                          "narrow",
                          "regular",
                          "wide"
                        ]
                      },
                      "cardTheme": {
                        "type": "string",
                        "enum": [
                          "light",
                          "dark"
                        ]
                      },
                      "density": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "titleSize": {
                        "type": "number",
                        "minimum": 16,
                        "maximum": 48
                      },
                      "titleWeight": {
                        "type": "number",
                        "minimum": 400,
                        "maximum": 800
                      },
                      "titleAlign": {
                        "type": "string",
                        "enum": [
                          "left",
                          "center"
                        ]
                      },
                      "descSize": {
                        "type": "number",
                        "minimum": 12,
                        "maximum": 24
                      },
                      "descWeight": {
                        "type": "number",
                        "minimum": 400,
                        "maximum": 700
                      },
                      "descAlign": {
                        "type": "string",
                        "enum": [
                          "left",
                          "center"
                        ]
                      },
                      "buttonBg": {
                        "type": "string",
                        "maxLength": 9
                      },
                      "buttonText": {
                        "type": "string",
                        "maxLength": 9
                      },
                      "buttonFontSize": {
                        "type": "number",
                        "minimum": 13,
                        "maximum": 24
                      },
                      "buttonWeight": {
                        "type": "number",
                        "minimum": 400,
                        "maximum": 800
                      },
                      "buttonSize": {
                        "type": "string",
                        "enum": [
                          "s",
                          "m",
                          "l"
                        ]
                      },
                      "mobileOptionColumns": {
                        "type": "string",
                        "enum": [
                          "single",
                          "configured"
                        ]
                      }
                    },
                    "additionalProperties": {}
                  },
                  "appearanceMobile": {
                    "type": "object",
                    "properties": {
                      "surface": {
                        "type": "string",
                        "enum": [
                          "glass",
                          "flat"
                        ]
                      },
                      "primaryColor": {
                        "type": "string",
                        "maxLength": 9
                      },
                      "background": {
                        "type": "object",
                        "properties": {
                          "colors": {
                            "maxItems": 6,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "maxLength": 9
                            }
                          },
                          "opacity": {
                            "type": "number",
                            "minimum": 10,
                            "maximum": 100
                          },
                          "blur": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 80
                          },
                          "size": {
                            "type": "number",
                            "minimum": 80,
                            "maximum": 300
                          },
                          "seed": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "blobCount": {
                            "type": "integer",
                            "minimum": 3,
                            "maximum": 40
                          }
                        },
                        "required": [
                          "colors",
                          "opacity",
                          "blur",
                          "size",
                          "seed",
                          "blobCount"
                        ],
                        "additionalProperties": {}
                      },
                      "surfaceOpacity": {
                        "type": "integer",
                        "minimum": 45,
                        "maximum": 95
                      },
                      "cornerRadius": {
                        "type": "string",
                        "enum": [
                          "sharp",
                          "soft",
                          "round"
                        ]
                      },
                      "contentWidth": {
                        "type": "string",
                        "enum": [
                          "narrow",
                          "regular",
                          "wide"
                        ]
                      },
                      "cardTheme": {
                        "type": "string",
                        "enum": [
                          "light",
                          "dark"
                        ]
                      },
                      "density": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "titleSize": {
                        "type": "number",
                        "minimum": 16,
                        "maximum": 48
                      },
                      "titleWeight": {
                        "type": "number",
                        "minimum": 400,
                        "maximum": 800
                      },
                      "titleAlign": {
                        "type": "string",
                        "enum": [
                          "left",
                          "center"
                        ]
                      },
                      "descSize": {
                        "type": "number",
                        "minimum": 12,
                        "maximum": 24
                      },
                      "descWeight": {
                        "type": "number",
                        "minimum": 400,
                        "maximum": 700
                      },
                      "descAlign": {
                        "type": "string",
                        "enum": [
                          "left",
                          "center"
                        ]
                      },
                      "buttonBg": {
                        "type": "string",
                        "maxLength": 9
                      },
                      "buttonText": {
                        "type": "string",
                        "maxLength": 9
                      },
                      "buttonFontSize": {
                        "type": "number",
                        "minimum": 13,
                        "maximum": 24
                      },
                      "buttonWeight": {
                        "type": "number",
                        "minimum": 400,
                        "maximum": 800
                      },
                      "buttonSize": {
                        "type": "string",
                        "enum": [
                          "s",
                          "m",
                          "l"
                        ]
                      },
                      "mobileOptionColumns": {
                        "type": "string",
                        "enum": [
                          "single",
                          "configured"
                        ]
                      }
                    },
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "id",
                  "label",
                  "savedAt",
                  "appearance"
                ],
                "additionalProperties": {}
              }
            },
            "amoCrm": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "pipelineId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 40
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "statusId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 40
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "leadTitleTemplate": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 240
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tags": {
                  "maxItems": 10,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  }
                },
                "noteIncludeContact": {
                  "type": "boolean"
                },
                "noteIncludeAnswers": {
                  "type": "boolean"
                },
                "noteIncludeFormulas": {
                  "type": "boolean"
                },
                "noteIncludeUtm": {
                  "type": "boolean"
                },
                "noteStepTitleMode": {
                  "type": "string",
                  "enum": [
                    "auto",
                    "always",
                    "never"
                  ]
                },
                "taskEnabled": {
                  "type": "boolean"
                },
                "taskTextTemplate": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 500
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "taskDueMinutes": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 5,
                      "maximum": 10080
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "fieldMapping": {
                  "maxItems": 100,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "maxLength": 160
                      },
                      "sourceLabel": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "targetEntity": {
                        "type": "string",
                        "enum": [
                          "lead",
                          "contact"
                        ]
                      },
                      "targetFieldId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "targetFieldCode": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 40
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "targetFieldName": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "targetFieldType": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 40
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "valueTargetMode": {
                        "type": "string",
                        "enum": [
                          "single",
                          "perOption"
                        ]
                      },
                      "valueMap": {
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "sourceValue": {
                              "type": "string",
                              "maxLength": 300
                            },
                            "targetValue": {
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "enumId": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "targetEntity": {
                              "type": "string",
                              "enum": [
                                "lead",
                                "contact"
                              ]
                            },
                            "targetFieldId": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "targetFieldCode": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 40
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "targetFieldName": {
                              "type": "string",
                              "maxLength": 200
                            },
                            "targetFieldType": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 40
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "sourceValue"
                          ],
                          "additionalProperties": {}
                        }
                      }
                    },
                    "required": [
                      "source",
                      "sourceLabel",
                      "targetEntity",
                      "targetFieldName"
                    ],
                    "additionalProperties": {}
                  }
                }
              },
              "additionalProperties": {}
            },
            "hideStepProgress": {
              "type": "boolean"
            },
            "hideOptionPrices": {
              "type": "boolean"
            },
            "hideResultUntilComplete": {
              "type": "boolean"
            },
            "showFinalPriceSummary": {
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        },
        "is_active": {
          "type": "boolean"
        },
        "is_default": {
          "type": "boolean"
        },
        "show_in_header": {
          "type": "boolean"
        },
        "section_heading": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200
            },
            {
              "type": "null"
            }
          ]
        },
        "section_description": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 500
            },
            {
              "type": "null"
            }
          ]
        },
        "show_section_heading": {
          "type": "boolean"
        },
        "display_style": {
          "type": "string",
          "enum": [
            "banner",
            "card",
            "button",
            "inline"
          ]
        },
        "icon_url": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 1000
            },
            {
              "type": "null"
            }
          ]
        },
        "cover_url": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 1000
            },
            {
              "type": "null"
            }
          ]
        },
        "sort_order": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "quiz_id",
    "fields"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "field": {
          "type": "string",
          "minLength": 1
        },
        "op": {
          "type": "string",
          "enum": [
            "eq",
            "neq",
            "in",
            "notIn",
            "gt",
            "gte",
            "lt",
            "lte",
            "contains",
            "containsAll",
            "notEmpty",
            "empty"
          ]
        },
        "value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            {
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          ]
        },
        "and": {
          "maxItems": 20,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        "or": {
          "maxItems": 20,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        }
      },
      "required": [
        "field",
        "op"
      ],
      "additionalProperties": {}
    }
  }
}
```

### quizzes.delete

Удалить калькулятор или сохранить его архив с заявками

POST /api/v1/profiles/{profileId}/actions

Scopes: quizzes:write

MCP: quizzes_delete

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "quiz_id"
  ],
  "additionalProperties": false
}
```

### quizzes.create_placement

Подключить калькулятор к профилю, сайту или ссылке

POST /api/v1/profiles/{profileId}/actions

Scopes: quizzes:write

MCP: quizzes_create_placement

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        "channel": {
          "type": "string",
          "enum": [
            "profile",
            "website",
            "link"
          ]
        },
        "destination": {
          "type": "string",
          "enum": [
            "inbox",
            "zumzam"
          ]
        },
        "crm_enabled": {
          "default": true,
          "type": "boolean"
        },
        "is_active": {
          "type": "boolean"
        }
      },
      "required": [
        "name",
        "channel",
        "destination"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "quiz_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### quizzes.update_placement

Изменить размещение калькулятора

POST /api/v1/profiles/{profileId}/actions

Scopes: quizzes:write

MCP: quizzes_update_placement

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "placement_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        "destination": {
          "type": "string",
          "enum": [
            "inbox",
            "zumzam"
          ]
        },
        "crm_enabled": {
          "default": true,
          "type": "boolean"
        },
        "is_active": {
          "type": "boolean"
        },
        "display": {
          "type": "object",
          "properties": {
            "show_in_header": {
              "type": "boolean"
            },
            "section_heading": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ]
            },
            "section_description": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500
                },
                {
                  "type": "null"
                }
              ]
            },
            "show_section_heading": {
              "type": "boolean"
            },
            "display_style": {
              "type": "string",
              "enum": [
                "banner",
                "card",
                "button",
                "inline"
              ]
            },
            "icon_url": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 1000
                },
                {
                  "type": "null"
                }
              ]
            },
            "cover_url": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 1000
                },
                {
                  "type": "null"
                }
              ]
            },
            "sort_order": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "cta_label": {
              "type": "string",
              "maxLength": 100
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "quiz_id",
    "placement_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### quizzes.unlink_placement

Отключить размещение калькулятора

POST /api/v1/profiles/{profileId}/actions

Scopes: quizzes:write

MCP: quizzes_unlink_placement

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "placement_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "quiz_id",
    "placement_id"
  ],
  "additionalProperties": false
}
```

### bookings.update_settings

Настроить онлайн-бронирование

POST /api/v1/profiles/{profileId}/actions

Scopes: bookings:write

MCP: bookings_update_settings

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "accept_bookings": {
      "type": "boolean"
    },
    "booking_settings": {
      "type": "object",
      "properties": {
        "slot_duration_minutes": {
          "default": 60,
          "type": "integer",
          "minimum": 15,
          "maximum": 480
        },
        "min_advance_hours": {
          "default": 24,
          "type": "integer",
          "minimum": 0,
          "maximum": 720
        },
        "max_advance_days": {
          "default": 90,
          "type": "integer",
          "minimum": 1,
          "maximum": 365
        },
        "auto_confirm": {
          "default": false,
          "type": "boolean"
        },
        "require_address": {
          "default": false,
          "type": "boolean"
        },
        "require_child_age": {
          "default": true,
          "type": "boolean"
        },
        "require_children_count": {
          "default": true,
          "type": "boolean"
        },
        "booking_hours": {
          "type": "object",
          "properties": {
            "monday": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "open": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    },
                    "close": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    }
                  },
                  "required": [
                    "open",
                    "close"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "tuesday": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "open": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    },
                    "close": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    }
                  },
                  "required": [
                    "open",
                    "close"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "wednesday": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "open": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    },
                    "close": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    }
                  },
                  "required": [
                    "open",
                    "close"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "thursday": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "open": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    },
                    "close": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    }
                  },
                  "required": [
                    "open",
                    "close"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "friday": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "open": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    },
                    "close": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    }
                  },
                  "required": [
                    "open",
                    "close"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "saturday": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "open": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    },
                    "close": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    }
                  },
                  "required": [
                    "open",
                    "close"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "sunday": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "open": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    },
                    "close": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    }
                  },
                  "required": [
                    "open",
                    "close"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "buffer_before_minutes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 120
        },
        "buffer_after_minutes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 120
        },
        "category_slot_label": {
          "type": "string",
          "maxLength": 100
        },
        "category_range_label": {
          "type": "string",
          "maxLength": 100
        },
        "show_in_header": {
          "type": "boolean"
        },
        "header_cta_action": {
          "type": "string",
          "enum": [
            "widget",
            "scroll"
          ]
        },
        "header_cta_label": {
          "type": "string",
          "maxLength": 32
        }
      },
      "additionalProperties": {}
    }
  },
  "additionalProperties": false
}
```

### bookings.create_manual

Создать ручное бронирование

POST /api/v1/profiles/{profileId}/actions

Scopes: bookings:write

MCP: bookings_create_manual

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "event_date": {
      "type": "string"
    },
    "event_time": {
      "type": "string",
      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
    },
    "duration_minutes": {
      "type": "integer",
      "minimum": 15,
      "maximum": 1440
    },
    "service_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "selection": {
      "type": "object",
      "properties": {
        "variant_id": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9_-]{1,64}$"
        },
        "answers": {
          "default": {},
          "type": "object",
          "propertyNames": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_-]{1,64}$"
          },
          "additionalProperties": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1000
              },
              {
                "type": "string",
                "maxLength": 1000
              }
            ]
          }
        }
      },
      "additionalProperties": false
    },
    "child_age": {
      "type": "integer",
      "minimum": 0,
      "maximum": 120
    },
    "room_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "waitlist_entry_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "client_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "client_phone": {
      "type": "string",
      "pattern": "^\\+?[0-9\\s\\-()]{10,}$"
    },
    "client_message": {
      "type": "string",
      "maxLength": 2000
    },
    "children_count": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200
    },
    "total_amount": {
      "type": "number",
      "minimum": 0,
      "maximum": 10000000
    }
  },
  "required": [
    "event_date",
    "event_time",
    "client_name",
    "client_phone"
  ],
  "additionalProperties": false
}
```

### bookings.reschedule

Перенести бронирование

POST /api/v1/profiles/{profileId}/actions

Scopes: bookings:write

MCP: bookings_reschedule

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "booking_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "event_date": {
          "type": "string"
        },
        "event_time": {
          "type": "string",
          "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
        },
        "duration_minutes": {
          "type": "integer",
          "minimum": 15,
          "maximum": 1440
        },
        "room_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "price_policy": {
          "type": "string",
          "const": "keep"
        }
      },
      "required": [
        "event_date",
        "event_time"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "booking_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### bookings.set_attendance

Отметить посещение бронирования

POST /api/v1/profiles/{profileId}/actions

Scopes: bookings:write

MCP: bookings_set_attendance

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "booking_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "expected",
            "arrived",
            "departed",
            "no_show"
          ]
        }
      },
      "required": [
        "status"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "booking_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### calendar.create_event

Создать событие календаря

POST /api/v1/profiles/{profileId}/actions

Scopes: bookings:write

MCP: calendar_create_event

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "description": {
      "type": "string",
      "maxLength": 2000
    },
    "event_type": {
      "type": "string",
      "enum": [
        "booking",
        "blocked",
        "personal",
        "master_class",
        "show",
        "other"
      ]
    },
    "event_date": {
      "type": "string",
      "minLength": 1
    },
    "start_time": {
      "type": "string",
      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
    },
    "end_time": {
      "type": "string",
      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
    },
    "all_day": {
      "default": false,
      "type": "boolean"
    },
    "duration_minutes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1440
    },
    "timezone": {
      "type": "string",
      "maxLength": 64
    },
    "color": {
      "type": "string",
      "maxLength": 20
    },
    "location": {
      "type": "string",
      "maxLength": 500
    },
    "notes": {
      "type": "string",
      "maxLength": 2000
    },
    "client_type": {
      "type": "string",
      "enum": [
        "internal",
        "external"
      ]
    },
    "client_user_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "client_name": {
      "type": "string",
      "maxLength": 200
    },
    "client_phone": {
      "type": "string",
      "maxLength": 30
    },
    "client_email": {
      "anyOf": [
        {
          "type": "string",
          "format": "email",
          "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
        },
        {
          "type": "string",
          "const": ""
        }
      ]
    },
    "client_address": {
      "type": "string",
      "maxLength": 500
    },
    "amount": {
      "type": "number",
      "minimum": 0,
      "maximum": 10000000
    },
    "payment_status": {
      "type": "string",
      "enum": [
        "none",
        "unpaid",
        "partial",
        "paid",
        "refunded"
      ]
    },
    "payment_notes": {
      "type": "string",
      "maxLength": 500
    },
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "assignee_user_ids": {
      "maxItems": 30,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    "is_public": {
      "type": "boolean"
    },
    "show_on_afisha": {
      "type": "boolean"
    },
    "show_on_profile": {
      "type": "boolean"
    },
    "afisha_public": {
      "type": "object",
      "properties": {
        "public_title": {
          "type": "string",
          "maxLength": 200
        },
        "public_description": {
          "type": "string",
          "maxLength": 2000
        },
        "category": {
          "type": "string",
          "maxLength": 40
        },
        "age_from": {
          "type": "integer",
          "minimum": 0,
          "maximum": 18
        },
        "age_to": {
          "type": "integer",
          "minimum": 0,
          "maximum": 18
        },
        "price_from": {
          "type": "number",
          "minimum": 0,
          "maximum": 10000000
        },
        "price_type": {
          "type": "string",
          "maxLength": 20
        },
        "is_free": {
          "type": "boolean"
        },
        "cover_photo": {
          "type": "string",
          "maxLength": 2000
        },
        "photos": {
          "maxItems": 20,
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 2000
          }
        }
      }
    }
  },
  "required": [
    "title",
    "event_type",
    "event_date"
  ],
  "additionalProperties": false
}
```

### calendar.update_event

Изменить событие или серию календаря

POST /api/v1/profiles/{profileId}/actions

Scopes: bookings:write

MCP: calendar_update_event

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "event_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "description": {
          "type": "string",
          "maxLength": 2000
        },
        "event_type": {
          "type": "string",
          "enum": [
            "booking",
            "blocked",
            "personal",
            "master_class",
            "show",
            "other"
          ]
        },
        "event_date": {
          "type": "string",
          "minLength": 1
        },
        "start_time": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "end_time": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "all_day": {
          "type": "boolean"
        },
        "duration_minutes": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1440
        },
        "timezone": {
          "type": "string",
          "maxLength": 64
        },
        "color": {
          "type": "string",
          "maxLength": 20
        },
        "location": {
          "type": "string",
          "maxLength": 500
        },
        "notes": {
          "type": "string",
          "maxLength": 2000
        },
        "client_type": {
          "type": "string",
          "enum": [
            "internal",
            "external"
          ]
        },
        "client_user_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "client_name": {
          "type": "string",
          "maxLength": 200
        },
        "client_phone": {
          "type": "string",
          "maxLength": 30
        },
        "client_email": {
          "anyOf": [
            {
              "type": "string",
              "format": "email",
              "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        "client_address": {
          "type": "string",
          "maxLength": 500
        },
        "amount": {
          "type": "number",
          "minimum": 0,
          "maximum": 10000000
        },
        "payment_status": {
          "type": "string",
          "enum": [
            "none",
            "unpaid",
            "partial",
            "paid",
            "refunded"
          ]
        },
        "payment_notes": {
          "type": "string",
          "maxLength": 500
        },
        "deal_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "assignee_user_ids": {
          "maxItems": 30,
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "is_public": {
          "type": "boolean"
        },
        "show_on_afisha": {
          "type": "boolean"
        },
        "show_on_profile": {
          "type": "boolean"
        },
        "afisha_public": {
          "type": "object",
          "properties": {
            "public_title": {
              "type": "string",
              "maxLength": 200
            },
            "public_description": {
              "type": "string",
              "maxLength": 2000
            },
            "category": {
              "type": "string",
              "maxLength": 40
            },
            "age_from": {
              "type": "integer",
              "minimum": 0,
              "maximum": 18
            },
            "age_to": {
              "type": "integer",
              "minimum": 0,
              "maximum": 18
            },
            "price_from": {
              "type": "number",
              "minimum": 0,
              "maximum": 10000000
            },
            "price_type": {
              "type": "string",
              "maxLength": 20
            },
            "is_free": {
              "type": "boolean"
            },
            "cover_photo": {
              "type": "string",
              "maxLength": 2000
            },
            "photos": {
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 2000
              }
            }
          }
        },
        "status": {
          "type": "string",
          "enum": [
            "scheduled",
            "confirmed",
            "completed",
            "cancelled"
          ]
        },
        "edit_mode": {
          "type": "string",
          "enum": [
            "this",
            "this_and_future",
            "all"
          ]
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "event_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### calendar.delete_event

Удалить событие или серию календаря

POST /api/v1/profiles/{profileId}/actions

Scopes: bookings:write

MCP: calendar_delete_event

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "event_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "default": {},
      "type": "object",
      "properties": {
        "delete_mode": {
          "type": "string",
          "enum": [
            "this",
            "this_and_future",
            "all"
          ]
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "event_id"
  ],
  "additionalProperties": false
}
```

### catalog.create_show_program

Создать шоу-программу

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_create_show_program

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "photos": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "video_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "duration_minutes": {
      "type": [
        "number",
        "null"
      ]
    },
    "performers_count": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "age_min": {
      "type": [
        "number",
        "null"
      ]
    },
    "age_max": {
      "type": [
        "number",
        "null"
      ]
    },
    "min_participants": {
      "type": [
        "number",
        "null"
      ]
    },
    "max_participants": {
      "type": [
        "number",
        "null"
      ]
    },
    "age_ranges": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "price": {
      "type": [
        "number",
        "null"
      ]
    },
    "price_type": {
      "type": "string",
      "enum": [
        "fixed",
        "from",
        "hourly",
        "per_person",
        "negotiable"
      ]
    },
    "requires_sound": {
      "type": "boolean"
    },
    "requires_light": {
      "type": "boolean"
    },
    "stage_requirements": {
      "type": [
        "string",
        "null"
      ]
    },
    "additional_requirements": {
      "type": [
        "string",
        "null"
      ]
    },
    "materials_included": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "materials_list": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "certificate": {
      "type": "boolean"
    },
    "active": {
      "type": "boolean"
    },
    "sort_order": {
      "type": "number"
    },
    "details": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
```

### catalog.update_show_program

Изменить шоу-программу

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_update_show_program

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "program_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "photos": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "video_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "categories": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "duration_minutes": {
          "type": [
            "number",
            "null"
          ]
        },
        "performers_count": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "age_min": {
          "type": [
            "number",
            "null"
          ]
        },
        "age_max": {
          "type": [
            "number",
            "null"
          ]
        },
        "min_participants": {
          "type": [
            "number",
            "null"
          ]
        },
        "max_participants": {
          "type": [
            "number",
            "null"
          ]
        },
        "age_ranges": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "price": {
          "type": [
            "number",
            "null"
          ]
        },
        "price_type": {
          "type": "string",
          "enum": [
            "fixed",
            "from",
            "hourly",
            "per_person",
            "negotiable"
          ]
        },
        "requires_sound": {
          "type": "boolean"
        },
        "requires_light": {
          "type": "boolean"
        },
        "stage_requirements": {
          "type": [
            "string",
            "null"
          ]
        },
        "additional_requirements": {
          "type": [
            "string",
            "null"
          ]
        },
        "materials_included": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "materials_list": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "certificate": {
          "type": "boolean"
        },
        "active": {
          "type": "boolean"
        },
        "sort_order": {
          "type": "number"
        },
        "details": {
          "anyOf": [
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "program_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### catalog.delete_show_program

Удалить шоу-программу

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_delete_show_program

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "program_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "program_id"
  ],
  "additionalProperties": false
}
```

### catalog.create_character

Создать персонажа

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_create_character

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 3,
      "maxLength": 60
    },
    "description": {
      "type": "string",
      "minLength": 20,
      "maxLength": 1000
    },
    "photos": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 500
      }
    },
    "video_url": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ]
    },
    "age_ranges": {
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 30
      }
    },
    "program_types": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 60
      }
    },
    "price": {
      "type": [
        "number",
        "null"
      ]
    },
    "price_type": {
      "type": "string",
      "maxLength": 30
    },
    "duration_minutes": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 1440
        },
        {
          "type": "null"
        }
      ]
    },
    "details": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "is_active": {
      "type": "boolean"
    },
    "type": {
      "default": "character",
      "type": "string",
      "enum": [
        "character",
        "show",
        "service"
      ]
    }
  },
  "required": [
    "name",
    "description",
    "photos"
  ],
  "additionalProperties": false
}
```

### catalog.update_character

Изменить персонажа

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_update_character

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "program_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 60
        },
        "description": {
          "type": "string",
          "minLength": 20,
          "maxLength": 1000
        },
        "photos": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 500
          }
        },
        "video_url": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000
            },
            {
              "type": "null"
            }
          ]
        },
        "age_ranges": {
          "anyOf": [
            {
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 100
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "program_types": {
          "anyOf": [
            {
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 150
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "price": {
          "type": [
            "number",
            "null"
          ]
        },
        "price_type": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 30
            },
            {
              "type": "null"
            }
          ]
        },
        "duration_minutes": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 1440
            },
            {
              "type": "null"
            }
          ]
        },
        "details": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "is_active": {
          "type": "boolean"
        },
        "type": {
          "type": "string",
          "enum": [
            "character",
            "show",
            "service"
          ]
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "program_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### catalog.delete_character

Удалить персонажа

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_delete_character

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "program_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "program_id"
  ],
  "additionalProperties": false
}
```

### catalog.create_master_class

Создать мастер-класс

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_create_master_class

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "price": {
      "type": [
        "number",
        "null"
      ]
    },
    "duration_minutes": {
      "type": [
        "number",
        "null"
      ]
    },
    "age_min": {
      "type": [
        "number",
        "null"
      ]
    },
    "age_max": {
      "type": [
        "number",
        "null"
      ]
    },
    "min_participants": {
      "type": [
        "number",
        "null"
      ]
    },
    "max_participants": {
      "type": [
        "number",
        "null"
      ]
    },
    "photo": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "photos": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 2000
      }
    },
    "details": {
      "type": "object",
      "properties": {
        "crop_params": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "group": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 80
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "video_url": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "categories": {
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100
      }
    },
    "materials_included": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "materials_list": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 200
      }
    },
    "take_home": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "certificate": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "difficulty_level": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 60
        },
        {
          "type": "null"
        }
      ]
    },
    "formats": {
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100
      }
    },
    "venue_requirements": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 1000
        },
        {
          "type": "null"
        }
      ]
    },
    "result_item": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ]
    },
    "includes_list": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 200
      }
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
```

### catalog.update_master_class

Изменить мастер-класс

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_update_master_class

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "program_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "price": {
          "type": [
            "number",
            "null"
          ]
        },
        "duration_minutes": {
          "type": [
            "number",
            "null"
          ]
        },
        "age_min": {
          "type": [
            "number",
            "null"
          ]
        },
        "age_max": {
          "type": [
            "number",
            "null"
          ]
        },
        "photo": {
          "type": [
            "string",
            "null"
          ]
        },
        "details": {
          "type": "object",
          "properties": {
            "crop_params": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "group": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 80
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "photos": {
          "anyOf": [
            {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "string"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "video_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "categories": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "is_active": {
          "type": "boolean"
        },
        "min_participants": {
          "type": [
            "number",
            "null"
          ]
        },
        "max_participants": {
          "type": [
            "number",
            "null"
          ]
        },
        "materials_included": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "materials_list": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "take_home": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "certificate": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "difficulty_level": {
          "type": [
            "string",
            "null"
          ]
        },
        "formats": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "venue_requirements": {
          "type": [
            "string",
            "null"
          ]
        },
        "result_item": {
          "type": [
            "string",
            "null"
          ]
        },
        "includes_list": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "program_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### catalog.delete_master_class

Удалить мастер-класс

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_delete_master_class

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "program_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "program_id"
  ],
  "additionalProperties": false
}
```

### catalog.create_quest_program

Создать квест

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_create_quest_program

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "duration_minutes": {
      "type": [
        "number",
        "null"
      ]
    },
    "themes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "difficulty": {
      "type": [
        "string",
        "null"
      ]
    },
    "min_players": {
      "type": [
        "number",
        "null"
      ]
    },
    "max_players": {
      "type": [
        "number",
        "null"
      ]
    },
    "age_ranges": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "activity_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "props_included": {
      "type": "boolean"
    },
    "actor_included": {
      "type": "boolean"
    },
    "venue_requirements": {
      "type": [
        "string",
        "null"
      ]
    },
    "price": {
      "type": [
        "number",
        "null"
      ]
    },
    "price_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "video_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "photos": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "active": {
      "type": "boolean"
    },
    "details": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
```

### catalog.update_quest_program

Изменить квест

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_update_quest_program

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "program_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "duration_minutes": {
          "type": [
            "number",
            "null"
          ]
        },
        "themes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "difficulty": {
          "type": [
            "string",
            "null"
          ]
        },
        "min_players": {
          "type": [
            "number",
            "null"
          ]
        },
        "max_players": {
          "type": [
            "number",
            "null"
          ]
        },
        "age_ranges": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "activity_type": {
          "type": [
            "string",
            "null"
          ]
        },
        "props_included": {
          "type": "boolean"
        },
        "actor_included": {
          "type": "boolean"
        },
        "venue_requirements": {
          "type": [
            "string",
            "null"
          ]
        },
        "price": {
          "type": [
            "number",
            "null"
          ]
        },
        "price_type": {
          "type": [
            "string",
            "null"
          ]
        },
        "video_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "photos": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "active": {
          "type": "boolean"
        },
        "details": {
          "anyOf": [
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "program_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### catalog.delete_quest_program

Удалить квест

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_delete_quest_program

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "program_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "program_id"
  ],
  "additionalProperties": false
}
```

### crm.configure_workspace

Настроить рабочее пространство CRM

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_configure_workspace

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "business_type": {
      "type": "string",
      "enum": [
        "venue",
        "animator",
        "show",
        "agency",
        "quest",
        "master_class",
        "photographer",
        "catering",
        "confectionery",
        "decorator",
        "dj_musician",
        "host",
        "transport",
        "attraction_rental"
      ]
    },
    "modules": {
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "tasks",
          "calendar",
          "bookings",
          "team",
          "preparation",
          "inventory",
          "finance",
          "analytics",
          "automations",
          "mail"
        ]
      }
    },
    "industry_fields": {
      "type": "boolean"
    },
    "expected_revision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "business_type",
    "modules",
    "industry_fields",
    "expected_revision"
  ],
  "additionalProperties": false
}
```

### crm.create_contact

Создать клиента CRM

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_create_contact

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "phone": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 30
        },
        {
          "type": "null"
        }
      ]
    },
    "email": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200,
              "format": "email",
              "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "notes": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
```

### crm.update_contact

Изменить клиента CRM

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_update_contact

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "phone": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 30
            },
            {
              "type": "null"
            }
          ]
        },
        "email": {
          "anyOf": [
            {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200,
                  "format": "email",
                  "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                },
                {
                  "type": "string",
                  "const": ""
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "notes": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "contact_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.delete_contact

Удалить клиента CRM

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_delete_contact

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "contact_id"
  ],
  "additionalProperties": false
}
```

### crm.select_bank_accounts

Выбрать банковские счета

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:banks:write

MCP: crm_select_bank_accounts

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "connection_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "account_ids": {
      "minItems": 1,
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      }
    }
  },
  "required": [
    "connection_id",
    "account_ids"
  ],
  "additionalProperties": false
}
```

### crm.create_task

Создать задачу CRM

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_create_task

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "due_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "task_type": {
      "type": "string",
      "enum": [
        "call",
        "message",
        "prep",
        "custom"
      ]
    },
    "assignee_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "notes": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "title",
    "due_at",
    "deal_id"
  ],
  "additionalProperties": false
}
```

### crm.update_task

Изменить задачу CRM

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_update_task

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "task_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "due_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        "task_type": {
          "type": "string",
          "enum": [
            "call",
            "message",
            "prep",
            "custom"
          ]
        },
        "assignee_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "notes": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "task_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.complete_task

Завершить задачу CRM

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_complete_task

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "task_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "task_id"
  ],
  "additionalProperties": false
}
```

### crm.cancel_task

Отменить задачу CRM

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_cancel_task

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "task_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "task_id"
  ],
  "additionalProperties": false
}
```

### crm.snooze_task

Перенести срок задачи CRM

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_snooze_task

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "task_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "due_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    }
  },
  "required": [
    "task_id",
    "due_at"
  ],
  "additionalProperties": false
}
```

### crm.delete_task

Удалить задачу CRM

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_delete_task

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "task_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "task_id"
  ],
  "additionalProperties": false
}
```

### crm.create_pipeline

Создать воронку CRM

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_create_pipeline

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
```

### crm.create_deal

Создать сделку CRM

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_create_deal

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "pipeline_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "stage_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "order_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "value": {
      "type": "number",
      "minimum": 0,
      "maximum": 99999999.99
    },
    "notes": {
      "type": "string",
      "maxLength": 2000
    },
    "contact_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "client_name": {
      "type": "string",
      "maxLength": 200
    },
    "client_phone": {
      "type": "string",
      "maxLength": 30
    },
    "client_email": {
      "type": "string",
      "maxLength": 200
    }
  },
  "required": [
    "pipeline_id",
    "stage_id",
    "title"
  ],
  "additionalProperties": false
}
```

### crm.update_deal

Изменить сделку CRM

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_update_deal

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "expected_updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "value": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0,
              "maximum": 99999999.99
            },
            {
              "type": "null"
            }
          ]
        },
        "probability": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0,
              "maximum": 100
            },
            {
              "type": "null"
            }
          ]
        },
        "notes": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000
            },
            {
              "type": "null"
            }
          ]
        },
        "resolve_amocrm_pending": {
          "maxItems": 2,
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "price",
              "event_datetime"
            ]
          }
        },
        "client_name": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200
            },
            {
              "type": "null"
            }
          ]
        },
        "client_phone": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 30
            },
            {
              "type": "null"
            }
          ]
        },
        "client_email": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200,
              "format": "email",
              "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "custom_fields": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "contact_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "deal_id",
    "expected_updated_at",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.move_deal

Изменить этап сделки

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_move_deal

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "expected_updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "stage_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id",
    "expected_updated_at",
    "stage_id"
  ],
  "additionalProperties": false
}
```

### crm.close_deal

Закрыть карточку сделки

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_close_deal

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "expected_updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "reason": {
      "type": "string",
      "maxLength": 500
    }
  },
  "required": [
    "deal_id",
    "expected_updated_at"
  ],
  "additionalProperties": false
}
```

### orders.set_status

Изменить статус заказа

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: orders_set_status

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "order_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "confirmed",
            "in_progress",
            "completed",
            "cancelled",
            "cancellation_requested",
            "cancellation_declined",
            "rejected",
            "no_show"
          ]
        },
        "rejection_reason": {
          "type": "string",
          "maxLength": 2000
        }
      },
      "required": [
        "status"
      ],
      "additionalProperties": false
    },
    "expected_updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "order_id",
    "fields",
    "expected_updated_at"
  ],
  "additionalProperties": false
}
```

### orders.report_outcome

Сообщить результат заказа

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: orders_report_outcome

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "order_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "outcome": {
          "type": "string",
          "enum": [
            "completed",
            "cancelled",
            "no_show"
          ]
        },
        "reason": {
          "type": "string",
          "maxLength": 2000
        },
        "prepayment_paid": {
          "type": "boolean"
        },
        "prepayment_amount": {
          "type": "number",
          "minimum": 0,
          "maximum": 10000000
        },
        "refund_plan": {
          "type": "string",
          "enum": [
            "not_applicable",
            "none",
            "full",
            "partial"
          ]
        },
        "refund_amount": {
          "type": "number",
          "minimum": 0,
          "maximum": 10000000
        },
        "version": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "outcome",
        "version"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "order_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### orders.mark_refund_sent

Отметить отправленный возврат

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: orders_mark_refund_sent

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "order_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "amount": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 10000000
    },
    "version": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "order_id",
    "amount",
    "version"
  ],
  "additionalProperties": false
}
```

### bookings.set_status

Изменить статус заказа

POST /api/v1/profiles/{profileId}/actions

Scopes: bookings:write

MCP: bookings_set_status

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "order_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "confirmed",
            "in_progress",
            "completed",
            "cancelled",
            "cancellation_requested",
            "cancellation_declined",
            "rejected",
            "no_show"
          ]
        },
        "rejection_reason": {
          "type": "string",
          "maxLength": 2000
        }
      },
      "required": [
        "status"
      ],
      "additionalProperties": false
    },
    "expected_updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "order_id",
    "fields",
    "expected_updated_at"
  ],
  "additionalProperties": false
}
```

### bookings.report_outcome

Сообщить результат заказа

POST /api/v1/profiles/{profileId}/actions

Scopes: bookings:write

MCP: bookings_report_outcome

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "order_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "outcome": {
          "type": "string",
          "enum": [
            "completed",
            "cancelled",
            "no_show"
          ]
        },
        "reason": {
          "type": "string",
          "maxLength": 2000
        },
        "prepayment_paid": {
          "type": "boolean"
        },
        "prepayment_amount": {
          "type": "number",
          "minimum": 0,
          "maximum": 10000000
        },
        "refund_plan": {
          "type": "string",
          "enum": [
            "not_applicable",
            "none",
            "full",
            "partial"
          ]
        },
        "refund_amount": {
          "type": "number",
          "minimum": 0,
          "maximum": 10000000
        },
        "version": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "outcome",
        "version"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "order_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### bookings.mark_refund_sent

Отметить отправленный возврат

POST /api/v1/profiles/{profileId}/actions

Scopes: bookings:write

MCP: bookings_mark_refund_sent

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "order_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "amount": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 10000000
    },
    "version": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "order_id",
    "amount",
    "version"
  ],
  "additionalProperties": false
}
```

### crm.update_pipeline

Изменить воронку

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_update_pipeline

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "pipeline_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "description": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000
            },
            {
              "type": "null"
            }
          ]
        },
        "card_settings": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "custom_fields_config": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "type": {
                "type": "string",
                "enum": [
                  "text",
                  "number",
                  "date",
                  "select",
                  "checkbox",
                  "url"
                ]
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "id",
              "name",
              "type"
            ]
          }
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "pipeline_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.delete_pipeline

Удалить пустую воронку

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_delete_pipeline

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "pipeline_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "pipeline_id"
  ],
  "additionalProperties": false
}
```

### crm.create_stage

Создать этап воронки

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_create_stage

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "pipeline_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        "color": {
          "type": "string",
          "maxLength": 20
        },
        "position": {
          "type": "integer",
          "minimum": 1,
          "maximum": 99
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "pipeline_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.update_stage

Изменить этап воронки

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_update_stage

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "pipeline_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "stage_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        "color": {
          "type": "string",
          "maxLength": 20
        },
        "position": {
          "type": "integer",
          "minimum": 1,
          "maximum": 99
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "pipeline_id",
    "stage_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.delete_stage

Удалить этап воронки

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_delete_stage

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "pipeline_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "stage_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "pipeline_id",
    "stage_id"
  ],
  "additionalProperties": false
}
```

### crm.set_pipeline_profiles

Подключить профили к воронке

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_set_pipeline_profiles

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "pipeline_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "shared_profile_ids": {
      "maxItems": 49,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    }
  },
  "required": [
    "pipeline_id",
    "shared_profile_ids"
  ],
  "additionalProperties": false
}
```

### crm.create_contact_child

Добавить ребёнка в карточку клиента

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_create_contact_child

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "birth_date": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        "interests": {
          "default": "",
          "type": "string",
          "maxLength": 2000
        },
        "preferences": {
          "default": "",
          "type": "string",
          "maxLength": 2000
        },
        "reminder_enabled": {
          "default": true,
          "type": "boolean"
        },
        "reminder_days": {
          "default": 30,
          "type": "integer",
          "minimum": 0,
          "maximum": 90
        }
      },
      "required": [
        "name",
        "birth_date"
      ]
    }
  },
  "required": [
    "contact_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.update_contact_child

Изменить сведения о ребёнке

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_update_contact_child

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "child_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "birth_date": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        "interests": {
          "default": "",
          "type": "string",
          "maxLength": 2000
        },
        "preferences": {
          "default": "",
          "type": "string",
          "maxLength": 2000
        },
        "reminder_enabled": {
          "default": true,
          "type": "boolean"
        },
        "reminder_days": {
          "default": 30,
          "type": "integer",
          "minimum": 0,
          "maximum": 90
        }
      },
      "required": [
        "name",
        "birth_date"
      ]
    }
  },
  "required": [
    "contact_id",
    "child_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.delete_contact_child

Удалить ребёнка из карточки клиента

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_delete_contact_child

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "child_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "contact_id",
    "child_id"
  ],
  "additionalProperties": false
}
```

### crm.import_contacts

Импортировать клиентов

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_import_contacts

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contacts": {
      "minItems": 1,
      "maxItems": 2000,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "phone": {
            "type": "string",
            "maxLength": 30
          },
          "email": {
            "type": "string",
            "maxLength": 200
          }
        },
        "required": [
          "name"
        ]
      }
    }
  },
  "required": [
    "contacts"
  ],
  "additionalProperties": false
}
```

### crm.merge_contacts

Объединить карточки клиентов

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_merge_contacts

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "source_contact_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "contact_id",
    "source_contact_id"
  ],
  "additionalProperties": false
}
```

### crm.configure_automation_recipe

Настроить рецепт автоматизации

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_configure_automation_recipe

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "pipeline_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "recipe_key": {
          "type": "string",
          "minLength": 1,
          "maxLength": 60
        },
        "enabled": {
          "type": "boolean"
        },
        "trigger_config": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "actions": {
          "maxItems": 20,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "title": {
                "type": "string",
                "maxLength": 300
              },
              "text": {
                "type": "string",
                "maxLength": 4000
              }
            }
          }
        }
      },
      "required": [
        "recipe_key",
        "enabled"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "pipeline_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.create_stage_automation

Создать автоматизацию этапа

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_create_stage_automation

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "pipeline_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "stageId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "kind": {
          "type": "string",
          "enum": [
            "task",
            "message",
            "push",
            "note"
          ]
        },
        "when": {
          "type": "string",
          "enum": [
            "enter",
            "create",
            "both"
          ]
        },
        "title": {
          "type": "string",
          "maxLength": 200
        },
        "text": {
          "type": "string",
          "maxLength": 2000
        },
        "offsetMinutes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 43200
        },
        "dueMode": {
          "type": "string",
          "enum": [
            "offset",
            "end_of_day"
          ]
        },
        "taskType": {
          "type": "string",
          "enum": [
            "call",
            "message",
            "prep",
            "custom"
          ]
        },
        "assignee": {
          "type": "string",
          "enum": [
            "owner",
            "deal_assignee"
          ]
        },
        "sourceTypes": {
          "maxItems": 5,
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "inquiry",
              "board_response",
              "quiz",
              "manual",
              "order"
            ]
          }
        },
        "valueGte": {
          "type": "number",
          "minimum": 0,
          "maximum": 99999999
        }
      },
      "required": [
        "stageId",
        "kind"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "pipeline_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.update_automation

Изменить автоматизацию

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_update_automation

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "pipeline_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "automation_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "trigger_config": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "pipeline_id",
    "automation_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.delete_automation

Удалить автоматизацию

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_delete_automation

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "pipeline_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "automation_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "pipeline_id",
    "automation_id"
  ],
  "additionalProperties": false
}
```

### crm.set_sales_target

Установить план продаж

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_set_sales_target

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
    },
    "target": {
      "type": "number",
      "minimum": 0,
      "maximum": 999999999
    }
  },
  "required": [
    "period",
    "target"
  ],
  "additionalProperties": false
}
```

### crm.create_finance_entry

Добавить финансовую операцию

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:finance:write

MCP: crm_create_finance_entry

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "customer_income",
            "customer_refund",
            "staff_accrual",
            "staff_payout",
            "expense_plan",
            "expense_actual"
          ]
        },
        "amount": {
          "type": [
            "string",
            "number"
          ]
        },
        "occurred_on": {
          "type": "string"
        },
        "method": {
          "type": "string",
          "enum": [
            "cash",
            "bank_transfer",
            "card",
            "online",
            "other"
          ]
        },
        "category": {
          "type": "string",
          "enum": [
            "travel",
            "consumables",
            "rent",
            "subcontractor",
            "other"
          ]
        },
        "staff_user_id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "related_entry_id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "note": {
          "type": "string",
          "maxLength": 1000
        },
        "request_key": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "kind",
        "amount",
        "occurred_on",
        "request_key"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "deal_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.reverse_finance_entry

Сторнировать финансовую операцию

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:finance:write

MCP: crm_reverse_finance_entry

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "entry_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "request_key": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "occurred_on": {
          "type": "string"
        },
        "note": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1000
        }
      },
      "required": [
        "request_key",
        "occurred_on",
        "note"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "deal_id",
    "entry_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.set_finance_terms

Установить срок оплаты

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:finance:write

MCP: crm_set_finance_terms

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "payment_due_on": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "deal_id",
    "payment_due_on"
  ],
  "additionalProperties": false
}
```

### crm.create_inventory_item

Добавить предмет в костюмерную

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:inventory:write

MCP: crm_create_inventory_item

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "fields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "category": {
          "type": "string",
          "enum": [
            "costume",
            "prop",
            "equipment",
            "vehicle",
            "decor",
            "tableware",
            "attraction"
          ]
        },
        "quantity": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "repair",
            "retired"
          ]
        },
        "storage_location": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200
            },
            {
              "type": "null"
            }
          ]
        },
        "notes": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000
            },
            {
              "type": "null"
            }
          ]
        },
        "photo": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000
            },
            {
              "type": "null"
            }
          ]
        },
        "crop_params": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "name",
        "category",
        "quantity",
        "status"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.update_inventory_item

Изменить предмет костюмерной

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:inventory:write

MCP: crm_update_inventory_item

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "item_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "category": {
          "type": "string",
          "enum": [
            "costume",
            "prop",
            "equipment",
            "vehicle",
            "decor",
            "tableware",
            "attraction"
          ]
        },
        "quantity": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "repair",
            "retired"
          ]
        },
        "storage_location": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200
            },
            {
              "type": "null"
            }
          ]
        },
        "notes": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000
            },
            {
              "type": "null"
            }
          ]
        },
        "photo": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000
            },
            {
              "type": "null"
            }
          ]
        },
        "crop_params": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "name",
        "category",
        "quantity",
        "status"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "item_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.reserve_inventory

Забронировать предмет для сделки

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:inventory:write

MCP: crm_reserve_inventory

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "item_id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "quantity": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10000
        },
        "starts_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        "ends_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        "event_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "note": {
          "type": "string",
          "maxLength": 1000
        }
      },
      "required": [
        "item_id",
        "quantity",
        "starts_at",
        "ends_at",
        "event_date"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "deal_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.move_inventory

Выдать или вернуть предмет

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:inventory:write

MCP: crm_move_inventory

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "reservation_id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "action": {
          "type": "string",
          "enum": [
            "issue",
            "return",
            "lost",
            "cancel"
          ]
        },
        "quantity": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10000
        },
        "issued_to": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "note": {
          "type": "string",
          "maxLength": 1000
        }
      },
      "required": [
        "reservation_id",
        "action"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "deal_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.save_preparation

Сохранить план подготовки

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_save_preparation

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "event_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "brief": {
          "type": "string",
          "maxLength": 10000
        },
        "materials": {
          "type": "string",
          "maxLength": 10000
        },
        "run_sheet": {
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "time": {
                "type": "string",
                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "duration_minutes": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1440
              },
              "responsible": {
                "default": "",
                "type": "string",
                "maxLength": 120
              },
              "notes": {
                "default": "",
                "type": "string",
                "maxLength": 2000
              }
            },
            "required": [
              "id",
              "time",
              "title",
              "duration_minutes"
            ]
          }
        }
      },
      "required": [
        "brief",
        "materials",
        "run_sheet"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "deal_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.preparation_action

Изменить задачи или шаблон подготовки

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_preparation_action

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "apply_template"
            },
            "template_id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "event_date": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            },
            "assignee_id": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "action",
            "template_id",
            "event_date"
          ]
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "save_template"
            },
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "program_key": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 120
                },
                {
                  "type": "null"
                }
              ]
            },
            "tasks": {
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "offset_days": {
                    "type": "integer",
                    "minimum": -365,
                    "maximum": 30
                  },
                  "notes": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "required": [
                  "title",
                  "offset_days"
                ]
              }
            },
            "brief": {
              "type": "string",
              "maxLength": 10000
            },
            "materials": {
              "type": "string",
              "maxLength": 10000
            },
            "run_sheet": {
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "time": {
                    "type": "string",
                    "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "duration_minutes": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1440
                  },
                  "responsible": {
                    "default": "",
                    "type": "string",
                    "maxLength": 120
                  },
                  "notes": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "required": [
                  "id",
                  "time",
                  "title",
                  "duration_minutes"
                ]
              }
            }
          },
          "required": [
            "action",
            "name",
            "tasks",
            "brief",
            "materials",
            "run_sheet"
          ]
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "add_task"
            },
            "title": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "offset_days": {
              "type": "integer",
              "minimum": -365,
              "maximum": 30
            },
            "event_date": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            },
            "assignee_id": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "action",
            "title",
            "offset_days",
            "event_date"
          ]
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "delete_template"
            },
            "template_id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "required": [
            "action",
            "template_id"
          ]
        }
      ]
    }
  },
  "required": [
    "deal_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### profile.create_custom_block

Создать раздел профиля

POST /api/v1/profiles/{profileId}/actions

Scopes: profiles:write

MCP: profile_create_custom_block

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "fields": {
      "type": "object",
      "properties": {
        "block_type": {
          "type": "string",
          "enum": [
            "list",
            "advantages",
            "steps",
            "timeline",
            "text",
            "gallery",
            "image-text",
            "table",
            "accordion",
            "video",
            "before-after"
          ]
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "content": {
          "default": {},
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "settings": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "is_active": {
          "default": true,
          "type": "boolean"
        }
      },
      "required": [
        "block_type",
        "title"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "fields"
  ],
  "additionalProperties": false
}
```

### profile.update_custom_block

Изменить содержимое раздела профиля

POST /api/v1/profiles/{profileId}/actions

Scopes: profiles:write

MCP: profile_update_custom_block

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "block_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "block_type": {
          "type": "string",
          "enum": [
            "list",
            "steps",
            "text",
            "gallery",
            "image-text",
            "advantages",
            "table",
            "accordion",
            "timeline",
            "video",
            "before-after",
            "testimonials"
          ]
        },
        "content": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "is_active": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "block_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### profile.delete_custom_block

Удалить раздел профиля

POST /api/v1/profiles/{profileId}/actions

Scopes: profiles:write

MCP: profile_delete_custom_block

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "block_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "block_id"
  ],
  "additionalProperties": false
}
```

### design.update_custom_block

Изменить оформление раздела профиля

POST /api/v1/profiles/{profileId}/actions

Scopes: design:write

MCP: design_update_custom_block

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "block_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "settings": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "block_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### design.reorder_custom_blocks

Изменить порядок разделов профиля

POST /api/v1/profiles/{profileId}/actions

Scopes: design:write

MCP: design_reorder_custom_blocks

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "updates": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "sort_order": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "id",
          "sort_order"
        ]
      }
    }
  },
  "required": [
    "updates"
  ],
  "additionalProperties": false
}
```

### quizzes.create_promo_code

Создать промокод калькулятора

POST /api/v1/profiles/{profileId}/actions

Scopes: quizzes:write

MCP: quizzes_create_promo_code

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "discount_type": {
          "type": "string",
          "enum": [
            "percent",
            "fixed"
          ]
        },
        "discount_value": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 10000000
        },
        "max_uses": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 1000000
            },
            {
              "type": "null"
            }
          ]
        },
        "valid_until": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "code",
        "discount_type",
        "discount_value"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "quiz_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### quizzes.delete_promo_code

Удалить промокод калькулятора

POST /api/v1/profiles/{profileId}/actions

Scopes: quizzes:write

MCP: quizzes_delete_promo_code

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "code_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "quiz_id",
    "code_id"
  ],
  "additionalProperties": false
}
```

### quizzes.update_product_settings

Настроить уведомления и CRM калькулятора

POST /api/v1/profiles/{profileId}/actions

Scopes: quizzes:write

MCP: quizzes_update_product_settings

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "notifications": {
          "type": "object",
          "properties": {
            "leadCreated": {
              "type": "boolean"
            },
            "site": {
              "type": "boolean"
            },
            "telegram": {
              "type": "boolean"
            },
            "max": {
              "type": "boolean"
            },
            "email": {
              "type": "boolean"
            },
            "sound": {
              "type": "boolean"
            },
            "titleTemplate": {
              "type": "string",
              "maxLength": 160
            },
            "messageTemplate": {
              "type": "string",
              "maxLength": 500
            }
          }
        },
        "crm": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "quiz_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### bookings.save_widget

Сохранить виджет бронирования

POST /api/v1/profiles/{profileId}/actions

Scopes: bookings:write

MCP: bookings_save_widget

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "fields": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "is_active": {
          "default": true,
          "type": "boolean"
        },
        "config": {
          "type": "object",
          "properties": {
            "title": {
              "default": "Забронировать",
              "type": "string",
              "maxLength": 100
            },
            "description": {
              "default": "",
              "type": "string",
              "maxLength": 500
            },
            "theme": {
              "default": "profile",
              "type": "string",
              "enum": [
                "profile",
                "light",
                "dark"
              ]
            },
            "accent": {
              "type": "string",
              "pattern": "^#[0-9a-fA-F]{6}$"
            },
            "accent_to": {
              "type": "string",
              "pattern": "^#[0-9a-fA-F]{6}$"
            },
            "layout": {
              "default": "catalog",
              "type": "string",
              "enum": [
                "catalog",
                "calendar"
              ]
            },
            "service_ids": {
              "default": [],
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "room_ids": {
              "default": [],
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "radius": {
              "default": 24,
              "type": "integer",
              "minimum": 0,
              "maximum": 32
            }
          },
          "additionalProperties": false
        }
      },
      "required": [
        "name",
        "config"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "fields"
  ],
  "additionalProperties": false
}
```

### bookings.save_automation

Сохранить сценарий бронирования

POST /api/v1/profiles/{profileId}/actions

Scopes: bookings:write

MCP: bookings_save_automation

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "fields": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        "enabled": {
          "default": false,
          "type": "boolean"
        },
        "config": {
          "type": "object",
          "properties": {
            "trigger": {
              "type": "string",
              "enum": [
                "created",
                "confirmed",
                "cancelled",
                "before_start",
                "after_start",
                "before_end",
                "after_end",
                "unpaid_after",
                "manual"
              ]
            },
            "offset_minutes": {
              "default": 60,
              "type": "integer",
              "minimum": 0,
              "maximum": 43200
            },
            "statuses": {
              "default": [],
              "maxItems": 7,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "pending",
                  "confirmed",
                  "in_progress",
                  "completed",
                  "cancelled",
                  "rejected",
                  "no_show"
                ]
              }
            },
            "unpaid_only": {
              "default": false,
              "type": "boolean"
            },
            "service_ids": {
              "default": [],
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "room_ids": {
              "default": [],
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "actions": {
              "minItems": 1,
              "maxItems": 10,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "notify_owner",
                      "notify_client",
                      "email_client",
                      "chat",
                      "note",
                      "task",
                      "confirm",
                      "cancel",
                      "webhook"
                    ]
                  },
                  "text": {
                    "default": "",
                    "type": "string",
                    "maxLength": 4000
                  },
                  "subject": {
                    "default": "Бронирование",
                    "type": "string",
                    "maxLength": 150
                  },
                  "url": {
                    "type": "string",
                    "maxLength": 2000,
                    "format": "uri"
                  },
                  "delay_minutes": {
                    "default": 60,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 43200
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "trigger",
            "actions"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "name",
        "config"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "fields"
  ],
  "additionalProperties": false
}
```

### bookings.run_automation

Запустить или продолжить сценарий бронирования

POST /api/v1/profiles/{profileId}/actions

Scopes: bookings:write

MCP: bookings_run_automation

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "fields": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "run"
            },
            "rule_id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "order_id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "request_key": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "required": [
            "action",
            "rule_id",
            "order_id",
            "request_key"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "retry"
            },
            "run_id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "delivery_checked": {
              "default": false,
              "type": "boolean"
            }
          },
          "required": [
            "action",
            "run_id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "skip_step"
            },
            "run_id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "required": [
            "action",
            "run_id"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "fields"
  ],
  "additionalProperties": false
}
```

### bookings.save_inventory_settings

Настроить ресурсы для бронирований

POST /api/v1/profiles/{profileId}/actions

Scopes: bookings:write

MCP: bookings_save_inventory_settings

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "expected_revision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "requirements": {
      "maxItems": 80,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "service_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "item_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          },
          "buffer_before_minutes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1440
          },
          "buffer_after_minutes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1440
          }
        },
        "required": [
          "service_id",
          "item_id",
          "quantity",
          "buffer_before_minutes",
          "buffer_after_minutes"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "expected_revision",
    "requirements"
  ],
  "additionalProperties": false
}
```

### bookings.cancel_waitlist_entry

Удалить запись из листа ожидания

POST /api/v1/profiles/{profileId}/actions

Scopes: bookings:write

MCP: bookings_cancel_waitlist_entry

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "entry_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "entry_id"
  ],
  "additionalProperties": false
}
```

### payments.configure_provider

Настроить кассу

POST /api/v1/profiles/{profileId}/actions

Scopes: payments:settings:write

MCP: payments_configure_provider

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "fields": {
      "type": "object",
      "properties": {
        "provider": {
          "default": "yookassa",
          "type": "string",
          "enum": [
            "yookassa",
            "tbank",
            "yandexpay",
            "yandexpay_test"
          ]
        },
        "shop_id": {
          "type": "string",
          "minLength": 3,
          "maxLength": 100
        },
        "is_active": {
          "type": "boolean"
        },
        "deposit_type": {
          "default": "percent",
          "type": "string",
          "enum": [
            "percent",
            "fixed"
          ]
        },
        "deposit_value": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 1000000
        },
        "send_receipt": {
          "default": false,
          "type": "boolean"
        },
        "tax_system_code": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 6
            },
            {
              "type": "null"
            }
          ]
        },
        "vat_code": {
          "default": 1,
          "type": "integer",
          "minimum": 1,
          "maximum": 6
        }
      },
      "required": [
        "shop_id",
        "deposit_value"
      ],
      "additionalProperties": false
    },
    "secret_ref": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "fields"
  ],
  "additionalProperties": false
}
```

### payments.delete_provider

Удалить подключение кассы

POST /api/v1/profiles/{profileId}/actions

Scopes: payments:settings:write

MCP: payments_delete_provider

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### payments.test_provider

Проверить подключение кассы

POST /api/v1/profiles/{profileId}/actions

Scopes: payments:settings:write

MCP: payments_test_provider

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "verification_payment_id": {
      "type": "string",
      "maxLength": 100
    }
  },
  "additionalProperties": false
}
```

### crm.record_contact_action

Записать действие звонка или SMS в журнал

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_record_contact_action

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "contact_call",
            "contact_sms"
          ]
        },
        "phone": {
          "type": "string",
          "maxLength": 100
        }
      },
      "required": [
        "type"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "deal_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.add_note

Добавить заметку в журнал сделки

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_add_note

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 10000
    }
  },
  "required": [
    "deal_id",
    "text"
  ],
  "additionalProperties": false
}
```

### crm.manage_crew

Изменить состав и очередь команды сделки

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_manage_crew

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "assign"
            },
            "user_id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "priority": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "role_label": {
              "type": "string",
              "maxLength": 100
            },
            "note": {
              "type": "string",
              "maxLength": 1000
            },
            "rate": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 10000000
                },
                {
                  "type": "null"
                }
              ]
            },
            "crew_position_id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "required": [
            "action",
            "user_id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "save_position"
            },
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "role_label": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "required_count": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "setup_minutes": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 1440
            },
            "travel_minutes": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 1440
            },
            "rate": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 10000000
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "action",
            "role_label",
            "required_count"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "readiness"
            },
            "assignee_id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "ready": {
              "type": "boolean"
            }
          },
          "required": [
            "action",
            "assignee_id",
            "ready"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "start_notifications"
            }
          },
          "required": [
            "action"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "set_mode"
            },
            "mode": {
              "type": "string",
              "enum": [
                "cascade",
                "parallel"
              ]
            }
          },
          "required": [
            "action",
            "mode"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "set_timeout"
            },
            "minutes": {
              "type": "integer",
              "minimum": 5,
              "maximum": 10080
            }
          },
          "required": [
            "action",
            "minutes"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "reorder"
            },
            "ordered_user_ids": {
              "minItems": 1,
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            }
          },
          "required": [
            "action",
            "ordered_user_ids"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "deal_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.remove_assignee

Снять назначение с сотрудника

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_remove_assignee

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "assignee_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id",
    "assignee_id"
  ],
  "additionalProperties": false
}
```

### crm.respond_to_own_assignment

Ответить на собственное назначение

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_respond_to_own_assignment

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "assignee_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "response": {
      "type": "string",
      "enum": [
        "accept",
        "decline"
      ]
    },
    "reason": {
      "type": "string",
      "maxLength": 500
    }
  },
  "required": [
    "deal_id",
    "assignee_id",
    "response"
  ],
  "additionalProperties": false
}
```

### crm.set_calendar_visibility

Показать или скрыть сделку в календаре

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_set_calendar_visibility

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "show": {
      "type": "boolean"
    }
  },
  "required": [
    "deal_id",
    "show"
  ],
  "additionalProperties": false
}
```

### banks.import_statement

Импортировать подготовленную банковскую выписку

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:banks:write

MCP: banks_import_statement

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "statement_ref": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "summary": {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "modulbank",
            "tbank",
            "sber",
            "alfa"
          ]
        },
        "operation_count": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000
        },
        "income_count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000
        },
        "expense_count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000
        },
        "total_income_minor": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "total_expense_minor": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "accounts": {
          "minItems": 1,
          "maxItems": 1000,
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^••••\\d{4}$"
          }
        }
      },
      "required": [
        "provider",
        "operation_count",
        "income_count",
        "expense_count",
        "total_income_minor",
        "total_expense_minor",
        "accounts"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "statement_ref",
    "summary"
  ],
  "additionalProperties": false
}
```

### banks.disconnect

Отключить банковское подключение

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:banks:write

MCP: banks_disconnect

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "connection_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "connection_id"
  ],
  "additionalProperties": false
}
```

### banks.sync

Синхронизировать операции подключённого банка

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:banks:write

MCP: banks_sync

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "connection_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "from": {
      "type": "string"
    },
    "till": {
      "type": "string"
    }
  },
  "required": [
    "connection_id",
    "from",
    "till"
  ],
  "additionalProperties": false
}
```

### banks.reconcile_transaction

Связать банковский платёж с оплатой сделки

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:banks:write

MCP: banks_reconcile_transaction

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "transaction_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "existing_entry_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "transaction_id",
    "deal_id"
  ],
  "additionalProperties": false
}
```

### crm.publish_subcontract

Опубликовать предложение субподряда

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_publish_subcontract

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "crew_position_id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "role_label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        "category": {
          "type": "string"
        },
        "rate": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0,
              "maximum": 10000000
            },
            {
              "type": "null"
            }
          ]
        },
        "slots": {
          "type": "integer",
          "minimum": 1,
          "maximum": 50
        },
        "description": {
          "type": "string",
          "maxLength": 2000
        }
      },
      "required": [
        "role_label",
        "category"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "deal_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.close_subcontract

Закрыть предложение субподряда

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_close_subcontract

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "subcontract_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id",
    "subcontract_id"
  ],
  "additionalProperties": false
}
```

### crm.accept_subcontract_response

Принять отклик на собственный субподряд

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_accept_subcontract_response

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "response_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id",
    "response_id"
  ],
  "additionalProperties": false
}
```

### crm.decline_subcontract_response

Отклонить отклик на собственный субподряд

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_decline_subcontract_response

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "response_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id",
    "response_id"
  ],
  "additionalProperties": false
}
```

### crm.convert_deal_to_order

Оформить предложение заказа из обращения

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_convert_deal_to_order

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "expected_updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "deal_id",
    "expected_updated_at"
  ],
  "additionalProperties": false
}
```

### crm.merge_deals

Объединить две собственные сделки

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_merge_deals

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "primary_deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "secondary_deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "expected_primary_updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "expected_secondary_updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "primary_deal_id",
    "secondary_deal_id",
    "expected_primary_updated_at",
    "expected_secondary_updated_at"
  ],
  "additionalProperties": false
}
```

### payments.send_invoice

Отправить счёт клиенту

POST /api/v1/profiles/{profileId}/actions

Scopes: payments:write

MCP: payments_send_invoice

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "invoice_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "conversation_id": {
      "anyOf": [
        {
          "type": "string",
          "const": "native"
        },
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      ]
    }
  },
  "required": [
    "deal_id",
    "invoice_id",
    "conversation_id"
  ],
  "additionalProperties": false
}
```

### payments.issue_invoice

Выставить счёт по сделке

POST /api/v1/profiles/{profileId}/actions

Scopes: payments:write

MCP: payments_issue_invoice

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "deposit",
            "balance"
          ]
        },
        "deposit_type": {
          "default": "percent",
          "type": "string",
          "enum": [
            "percent",
            "fixed"
          ]
        },
        "deposit_value": {
          "default": "30",
          "type": "string",
          "pattern": "^\\d{1,9}(?:[.,]\\d{1,2})?$"
        },
        "stage_id": {
          "default": null,
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "save_stage_rule": {
          "default": false,
          "type": "boolean"
        },
        "receipt_email": {
          "type": "string",
          "maxLength": 200,
          "format": "email",
          "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
        },
        "receipt_phone": {
          "type": "string",
          "pattern": "^\\+?[\\d ()-]{10,25}$"
        },
        "request_key": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "kind",
        "request_key"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "deal_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### payments.refresh_invoice

Обновить статус счёта по сделке

POST /api/v1/profiles/{profileId}/actions

Scopes: payments:write

MCP: payments_refresh_invoice

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "invoice_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id",
    "invoice_id"
  ],
  "additionalProperties": false
}
```

### crm.add_material_link

Добавить ссылку в материалы сделки

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_add_material_link

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "link"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "external_url": {
          "type": "string",
          "maxLength": 2000,
          "format": "uri"
        }
      },
      "required": [
        "kind",
        "name",
        "external_url"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "deal_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.attach_material_file

Прикрепить подготовленный файл к сделке

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_attach_material_file

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "file_ref": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "metadata": {
      "type": "object",
      "properties": {
        "deal_id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "mime_type": {
          "type": "string",
          "enum": [
            "application/pdf",
            "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
            "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
            "text/plain",
            "image/jpeg",
            "image/png",
            "image/webp"
          ]
        },
        "size": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 8388608
        },
        "sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      },
      "required": [
        "deal_id",
        "name",
        "mime_type",
        "size",
        "sha256"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "deal_id",
    "file_ref",
    "metadata"
  ],
  "additionalProperties": false
}
```

### crm.delete_material

Удалить материал из сделки

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_delete_material

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "material_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id",
    "material_id"
  ],
  "additionalProperties": false
}
```

### crm.restore_material

Восстановить материал сделки

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_restore_material

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "material_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id",
    "material_id"
  ],
  "additionalProperties": false
}
```

### crm.send_external_message

Отправить сообщение клиенту через подключённый канал

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:messages:write

MCP: crm_send_external_message

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "conversation_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "text": {
      "type": "string",
      "maxLength": 2000
    },
    "request_key": {
      "type": "string",
      "pattern": "^[\\w:.-]{8,128}$"
    },
    "media_ids": {
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    "reply_to_message_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id",
    "conversation_id",
    "text",
    "request_key"
  ],
  "additionalProperties": false
}
```

### crm.retry_external_message

Повторить разрешённую отправку сообщения

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:messages:write

MCP: crm_retry_external_message

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "message_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id",
    "message_id"
  ],
  "additionalProperties": false
}
```

### crm.send_external_invite

Отправить клиенту приглашение на страницу праздника

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:messages:write

MCP: crm_send_external_invite

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "conversation_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "request_key": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9:_-]{8,120}$"
    },
    "renew": {
      "type": "boolean"
    },
    "text": {
      "type": "string",
      "maxLength": 1000
    }
  },
  "required": [
    "deal_id",
    "conversation_id",
    "request_key"
  ],
  "additionalProperties": false
}
```

### crm.revoke_external_invite

Отозвать приглашение клиента

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:messages:write

MCP: crm_revoke_external_invite

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "invite_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id",
    "invite_id"
  ],
  "additionalProperties": false
}
```

### crm.send_profile_message

Отправить сообщение клиенту в ЗумЗам

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:messages:write

MCP: crm_send_profile_message

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "request_key": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "conversation_id",
    "text",
    "request_key"
  ],
  "additionalProperties": false
}
```

### bookings.create_credit_code

Создать промокод или подарочный сертификат

POST /api/v1/profiles/{profileId}/actions

Scopes: bookings:write

MCP: bookings_create_credit_code

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "fields": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "coupon",
            "gift",
            "loyalty"
          ]
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "code": {
          "type": "string",
          "minLength": 4,
          "maxLength": 64,
          "pattern": "^[A-Za-zА-Яа-яЁё0-9_-]+$"
        },
        "discount_type": {
          "default": "fixed",
          "type": "string",
          "enum": [
            "fixed",
            "percent"
          ]
        },
        "value": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 10000000,
          "multipleOf": 0.01
        },
        "min_total": {
          "default": 0,
          "type": "number",
          "minimum": 0,
          "maximum": 10000000
        },
        "max_uses": {
          "default": null,
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 1000000
            },
            {
              "type": "null"
            }
          ]
        },
        "per_client_limit": {
          "default": null,
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 1000000
            },
            {
              "type": "null"
            }
          ]
        },
        "service_ids": {
          "default": [],
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "starts_at": {
          "default": null,
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "expires_at": {
          "default": null,
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "kind",
        "name",
        "value"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "fields"
  ],
  "additionalProperties": false
}
```

### bookings.set_credit_code_state

Включить или отключить код бронирования

POST /api/v1/profiles/{profileId}/actions

Scopes: bookings:write

MCP: bookings_set_credit_code_state

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "code_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "active": {
      "type": "boolean"
    }
  },
  "required": [
    "code_id",
    "active"
  ],
  "additionalProperties": false
}
```

### profile.create_draft

Создать черновик своего профиля

POST /api/v1/profiles/{profileId}/actions

Scopes: profiles:write

MCP: profile_create_draft

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### profile.update_draft_content

Изменить содержимое черновика

POST /api/v1/profiles/{profileId}/actions

Scopes: profiles:write

MCP: profile_update_draft_content

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "fields": {
      "type": "object",
      "properties": {
        "display_name": {
          "type": "string",
          "minLength": 3,
          "maxLength": 60
        },
        "slug": {
          "type": "string"
        },
        "bio": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 45
            },
            {
              "type": "null"
            }
          ]
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "category": {
          "type": "string",
          "enum": [
            "venue",
            "animator",
            "show",
            "agency",
            "quest",
            "master_class",
            "photographer",
            "catering",
            "confectionery",
            "decorator",
            "dj_musician",
            "host",
            "transport",
            "attraction_rental"
          ]
        },
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "address": {
          "type": [
            "string",
            "null"
          ]
        },
        "timezone": {
          "type": "string"
        },
        "phone": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        },
        "website": {
          "type": [
            "string",
            "null"
          ]
        },
        "main_photo": {
          "type": [
            "string",
            "null"
          ]
        },
        "logo": {
          "type": [
            "string",
            "null"
          ]
        },
        "cover_photo": {
          "type": [
            "string",
            "null"
          ]
        },
        "photos": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "videos": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "video_cover": {
          "type": [
            "string",
            "null"
          ]
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "price_range": {
          "type": [
            "string",
            "null"
          ]
        },
        "working_hours": {},
        "details": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "custom_fields_config": {},
        "faq": {},
        "social_links": {},
        "primary_venue_type": {
          "type": [
            "string",
            "null"
          ]
        },
        "primary_services": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "additional_services": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "custom_activities": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "legal_form": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "private",
                "self_employed",
                "ip",
                "ooo"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "show_calendar": {
          "type": "boolean"
        },
        "activities": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "services": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "geo_location_wkt": {
          "type": "string"
        },
        "location_photos": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "show_yandex_reviews": {
          "type": "boolean"
        },
        "show_dgis_reviews": {
          "type": "boolean"
        },
        "avito_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "show_avito_reviews": {
          "type": "boolean"
        },
        "yandex_auto_refresh": {
          "type": "boolean"
        },
        "yandex_refresh_interval_days": {
          "type": "integer",
          "minimum": 7,
          "maximum": 30
        },
        "dgis_auto_refresh": {
          "type": "boolean"
        },
        "dgis_refresh_interval_days": {
          "type": "integer",
          "minimum": 7,
          "maximum": 30
        },
        "avito_auto_refresh": {
          "type": "boolean"
        },
        "avito_refresh_interval_days": {
          "type": "integer",
          "minimum": 7,
          "maximum": 30
        },
        "directions": {
          "type": [
            "string",
            "null"
          ]
        },
        "transport_info": {
          "type": [
            "string",
            "null"
          ]
        },
        "yandex_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "dgis_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "location_video_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "branch_name": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 40
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "fields"
  ],
  "additionalProperties": false
}
```

### profile.update_draft_design

Изменить оформление черновика

POST /api/v1/profiles/{profileId}/actions

Scopes: design:write

MCP: profile_update_draft_design

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "preset": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "section_order": {
      "maxItems": 200,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 150
      }
    }
  },
  "required": [
    "preset"
  ],
  "additionalProperties": false
}
```

### profile.discard_draft

Отменить черновик профиля

POST /api/v1/profiles/{profileId}/actions

Scopes: profiles:write

MCP: profile_discard_draft

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### profile.publish_draft

Применить содержимое и оформление черновика

POST /api/v1/profiles/{profileId}/actions

Scopes: profiles:publish

MCP: profile_publish_draft

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### quizzes.create_webhook

Создать вебхук калькулятора

POST /api/v1/profiles/{profileId}/actions

Scopes: quizzes:write

MCP: quizzes_create_webhook

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "minLength": 8,
          "maxLength": 500
        },
        "events": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "lead.created"
            ]
          }
        },
        "enabled": {
          "type": "boolean"
        },
        "description": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "url"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "quiz_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### quizzes.update_webhook

Изменить вебхук калькулятора

POST /api/v1/profiles/{profileId}/actions

Scopes: quizzes:write

MCP: quizzes_update_webhook

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "webhook_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "minLength": 8,
          "maxLength": 500
        },
        "events": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "lead.created"
            ]
          }
        },
        "enabled": {
          "type": "boolean"
        },
        "description": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "quiz_id",
    "webhook_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### quizzes.delete_webhook

Удалить вебхук калькулятора

POST /api/v1/profiles/{profileId}/actions

Scopes: quizzes:write

MCP: quizzes_delete_webhook

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "webhook_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "quiz_id",
    "webhook_id"
  ],
  "additionalProperties": false
}
```

### crm.activate_official_channel

Включить подключённый канал

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_activate_official_channel

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "connection_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "expected_updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "connection_id",
    "expected_updated_at"
  ],
  "additionalProperties": false
}
```

### crm.connect_channel

Подключить канал или почту профиля

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_connect_channel

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "secret_ref": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "summary": {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "vk",
            "telegram",
            "max",
            "whatsapp",
            "mailbox"
          ]
        },
        "profile_id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "pipeline_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "account": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        }
      },
      "required": [
        "provider",
        "profile_id",
        "pipeline_id",
        "account"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "secret_ref",
    "summary"
  ],
  "additionalProperties": false
}
```

### crm.configure_vk_channel

Изменить настройки канала ВКонтакте

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_configure_vk_channel

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "connection_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "expectedUpdatedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "pipelineId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "callbackServerId": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 2147483647
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "paused",
            "disabled"
          ]
        },
        "flags": {
          "type": "object",
          "properties": {
            "vk_ingest": {
              "type": "boolean"
            },
            "vk_send": {
              "type": "boolean"
            },
            "external_deal_invite": {
              "type": "boolean"
            },
            "external_client_history": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "pilotPeerIds": {
          "maxItems": 20,
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,9}$"
          }
        }
      },
      "required": [
        "expectedUpdatedAt"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "connection_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.pause_official_channel

Приостановить подключённый канал

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_pause_official_channel

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "connection_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "expected_updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "connection_id",
    "expected_updated_at"
  ],
  "additionalProperties": false
}
```

### crm.disconnect_mailbox

Отключить почту профиля

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:settings:write

MCP: crm_disconnect_mailbox

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### quizzes.import_template

Создать калькулятор из шаблона

POST /api/v1/profiles/{profileId}/actions

Scopes: quizzes:write

MCP: quizzes_import_template

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "template": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "zumzam.quiz.template"
        },
        "version": {
          "anyOf": [
            {
              "type": "number",
              "const": 1
            },
            {
              "type": "number",
              "const": 2
            }
          ]
        },
        "exportedAt": {
          "type": "string"
        },
        "included": {
          "type": "object",
          "properties": {
            "schema": {
              "type": "boolean"
            },
            "pricingRules": {
              "type": "boolean"
            },
            "settings": {
              "type": "boolean"
            },
            "appearance": {
              "type": "boolean"
            },
            "toggles": {
              "type": "boolean"
            },
            "display": {
              "type": "boolean"
            },
            "productSettings": {
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        },
        "source": {
          "type": "object",
          "properties": {
            "quizId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "profileId": {
              "type": [
                "string",
                "null"
              ]
            },
            "standalone": {
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        },
        "quiz": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            },
            "description": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 1000
                },
                {
                  "type": "null"
                }
              ]
            },
            "ctaLabel": {
              "type": "string",
              "maxLength": 80
            },
            "submitLabel": {
              "type": "string",
              "maxLength": 80
            },
            "startPrice": {
              "type": "number"
            },
            "currency": {
              "type": "string",
              "maxLength": 8
            },
            "schema": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "pricingRules": {},
            "settings": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "isActive": {
              "type": "boolean"
            },
            "productSettings": {
              "type": "object",
              "properties": {
                "notifications": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "crm": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "additionalProperties": {}
            },
            "display": {
              "type": "object",
              "properties": {
                "showInHeader": {
                  "type": "boolean"
                },
                "sectionHeading": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sectionDescription": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "showSectionHeading": {
                  "type": "boolean"
                },
                "displayStyle": {
                  "type": "string",
                  "maxLength": 40
                },
                "iconUrl": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "coverUrl": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "additionalProperties": {}
            }
          },
          "required": [
            "title",
            "schema"
          ],
          "additionalProperties": {}
        }
      },
      "required": [
        "kind",
        "version",
        "quiz"
      ],
      "additionalProperties": {}
    },
    "title_suffix": {
      "type": "string",
      "maxLength": 40
    }
  },
  "required": [
    "template"
  ],
  "additionalProperties": false
}
```

### quizzes.copy_owned_calculator

Скопировать собственный калькулятор в профиль

POST /api/v1/profiles/{profileId}/actions

Scopes: quizzes:write

MCP: quizzes_copy_owned_calculator

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "source_profile_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "title_suffix": {
      "default": " (копия)",
      "type": "string",
      "maxLength": 40
    }
  },
  "required": [
    "source_profile_id",
    "quiz_id"
  ],
  "additionalProperties": false
}
```

### crm.create_client_invite

Создать ссылку для приглашения клиента

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_create_client_invite

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "contact_id"
  ],
  "additionalProperties": false
}
```

### crm.revoke_client_invite

Отозвать приглашение клиента

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:write

MCP: crm_revoke_client_invite

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "contact_id"
  ],
  "additionalProperties": false
}
```

### media.publish_image

Добавить подготовленное фото

POST /api/v1/profiles/{profileId}/actions

Scopes: media:write

MCP: media_publish_image

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "file_ref": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "metadata": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "mime_type": {
          "type": "string",
          "const": "image/webp"
        },
        "size": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 1048576
        },
        "sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      },
      "required": [
        "name",
        "mime_type",
        "size",
        "sha256"
      ],
      "additionalProperties": false
    },
    "placement": {
      "default": "library",
      "type": "string",
      "enum": [
        "library",
        "logo",
        "main_photo",
        "cover_photo",
        "gallery"
      ]
    }
  },
  "required": [
    "file_ref",
    "metadata"
  ],
  "additionalProperties": false
}
```

### profile.move_to_trash

Удалить профиль с возможностью восстановления

POST /api/v1/profiles/{profileId}/actions

Scopes: profiles:manage

MCP: profile_move_to_trash

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "confirm_cancel_promotions": {
      "default": false,
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### profile.restore_from_trash

Восстановить свой профиль

POST /api/v1/profiles/{profileId}/actions

Scopes: profiles:manage

MCP: profile_restore_from_trash

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### crm.mark_profile_conversation_read

Отметить сообщения клиента прочитанными

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:messages:write

MCP: crm_mark_profile_conversation_read

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "archived": {
      "type": "boolean"
    }
  },
  "required": [
    "conversation_id"
  ],
  "additionalProperties": false
}
```

### crm.archive_profile_conversation

Изменить архивирование диалога профиля

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:messages:write

MCP: crm_archive_profile_conversation

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "archived": {
      "type": "boolean"
    }
  },
  "required": [
    "conversation_id"
  ],
  "additionalProperties": false
}
```

### crm.edit_profile_message

Изменить своё сообщение клиенту

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:messages:write

MCP: crm_edit_profile_message

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "message_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    }
  },
  "required": [
    "message_id",
    "text"
  ],
  "additionalProperties": false
}
```

### crm.delete_profile_message

Удалить своё сообщение клиенту

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:messages:write

MCP: crm_delete_profile_message

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "message_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "message_id"
  ],
  "additionalProperties": false
}
```

### crm.set_profile_message_reaction

Изменить свою реакцию на сообщение

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:messages:write

MCP: crm_set_profile_message_reaction

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "message_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "emoji": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "message_id",
    "emoji"
  ],
  "additionalProperties": false
}
```

### profile.reply_to_review

Ответить на отзыв своего профиля

POST /api/v1/profiles/{profileId}/actions

Scopes: profiles:write

MCP: profile_reply_to_review

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "review_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "minLength": 10,
          "maxLength": 500
        }
      },
      "required": [
        "text"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "review_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### crm.perform_external_message_action

Выполнить действие с сообщением внешнего канала

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:messages:write

MCP: crm_perform_external_message_action

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "conversation_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "message_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "action": {
      "type": "string",
      "enum": [
        "typing",
        "read",
        "reaction",
        "edit",
        "delete"
      ]
    },
    "value": {
      "type": "string",
      "maxLength": 2000
    },
    "reaction_id": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000
    },
    "request_key": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id",
    "conversation_id",
    "action",
    "request_key"
  ],
  "additionalProperties": false
}
```

### crm.send_email

Отправить письмо из почты профиля

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:messages:write

MCP: crm_send_email

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "from_email": {
      "type": "string",
      "maxLength": 200,
      "format": "email",
      "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    },
    "to_email": {
      "type": "string",
      "maxLength": 200,
      "format": "email",
      "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    },
    "subject": {
      "type": "string",
      "minLength": 1,
      "maxLength": 300
    },
    "body": {
      "type": "string",
      "minLength": 1,
      "maxLength": 20000
    },
    "request_key": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id",
    "from_email",
    "to_email",
    "subject",
    "body",
    "request_key"
  ],
  "additionalProperties": false
}
```

### crm.cancel_communication_job

Отменить ещё не начатую отправку

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:messages:write

MCP: crm_cancel_communication_job

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "job_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "job_id"
  ],
  "additionalProperties": false
}
```

### crm.attach_external_messages

Добавить выбранные сообщения в свою сделку

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:messages:write

MCP: crm_attach_external_messages

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "message_ids": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "conversation_id",
    "message_ids",
    "deal_id"
  ],
  "additionalProperties": false
}
```

### crm.create_external_holiday

Создать праздник из выбранных сообщений

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:messages:write

MCP: crm_create_external_holiday

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "message_ids": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    }
  },
  "required": [
    "conversation_id",
    "message_ids"
  ],
  "additionalProperties": false
}
```

### crm.associate_external_client

Связать каналы с клиентом и выбранным праздником

POST /api/v1/profiles/{profileId}/actions

Scopes: crm:messages:write

MCP: crm_associate_external_client

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "contactId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "mode": {
              "type": "string",
              "const": "existing"
            },
            "dealId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "required": [
            "contactId",
            "mode",
            "dealId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "contactId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "mode": {
              "type": "string",
              "const": "new"
            },
            "pipelineId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "title": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "idempotencyKey": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "required": [
            "contactId",
            "mode",
            "pipelineId",
            "title",
            "idempotencyKey"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "conversation_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### catalog.create_service

Создать услугу

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_create_service

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 100
    },
    "title": {
      "type": "string",
      "maxLength": 100
    },
    "description": {
      "default": "",
      "anyOf": [
        {
          "type": "string",
          "minLength": 0,
          "maxLength": 1000
        },
        {
          "type": "string",
          "const": ""
        }
      ]
    },
    "price": {
      "type": "number",
      "minimum": 0
    },
    "price_type": {
      "type": "string"
    },
    "service_type": {
      "type": "string",
      "enum": [
        "animator",
        "show",
        "venue",
        "quest",
        "master_class",
        "photographer",
        "catering",
        "confectionery",
        "decorator",
        "dj_musician",
        "host",
        "attraction_rental",
        "transport",
        "decoration",
        "other",
        "service",
        "additional",
        "package",
        "turnkey",
        "subscription",
        "certificate"
      ]
    },
    "duration_minutes": {
      "type": [
        "number",
        "null"
      ]
    },
    "duration": {
      "type": [
        "number",
        "null"
      ]
    },
    "age_from": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 18
        },
        {
          "type": "null"
        }
      ]
    },
    "age_to": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 18
        },
        {
          "type": "null"
        }
      ]
    },
    "min_participants": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 999
        },
        {
          "type": "null"
        }
      ]
    },
    "max_participants": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 999
        },
        {
          "type": "null"
        }
      ]
    },
    "images": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "details": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "is_additional": {
      "type": "boolean"
    },
    "is_package": {
      "type": "boolean"
    },
    "package_includes": {
      "default": [],
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    }
  },
  "required": [
    "service_type"
  ],
  "additionalProperties": false
}
```

### catalog.update_service

Изменить услугу

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_update_service

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "service_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 100
        },
        "title": {
          "type": "string",
          "maxLength": 100
        },
        "description": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 0,
              "maxLength": 1000
            },
            {
              "type": "string",
              "const": ""
            }
          ]
        },
        "price": {
          "type": "number",
          "minimum": 0
        },
        "price_type": {
          "type": "string"
        },
        "includes": {
          "default": [],
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          }
        },
        "duration_minutes": {
          "type": [
            "number",
            "null"
          ]
        },
        "duration": {
          "type": [
            "number",
            "null"
          ]
        },
        "age_from": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 18
            },
            {
              "type": "null"
            }
          ]
        },
        "age_to": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 18
            },
            {
              "type": "null"
            }
          ]
        },
        "min_participants": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 999
            },
            {
              "type": "null"
            }
          ]
        },
        "max_participants": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 999
            },
            {
              "type": "null"
            }
          ]
        },
        "images": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "details": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "service_type": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "animator",
                "show",
                "venue",
                "quest",
                "master_class",
                "photographer",
                "catering",
                "confectionery",
                "decorator",
                "dj_musician",
                "host",
                "attraction_rental",
                "transport",
                "decoration",
                "other",
                "service",
                "additional",
                "package",
                "turnkey",
                "subscription",
                "certificate"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "is_additional": {
          "type": "boolean"
        },
        "is_package": {
          "type": "boolean"
        },
        "is_active": {
          "type": "boolean"
        },
        "display_order": {
          "type": "number"
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "service_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### catalog.delete_service

Удалить услугу

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_delete_service

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "service_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "service_id"
  ],
  "additionalProperties": false
}
```

### catalog.create_room

Создать зал

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_create_room

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "capacity": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 10000
        },
        {
          "type": "null"
        }
      ]
    },
    "area_sqm": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0.1,
          "maximum": 99999
        },
        {
          "type": "null"
        }
      ]
    },
    "amenities": {
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100
      }
    },
    "photos": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "working_hours": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "monday": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "open": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    },
                    "close": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    }
                  },
                  "required": [
                    "open",
                    "close"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "tuesday": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "open": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    },
                    "close": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    }
                  },
                  "required": [
                    "open",
                    "close"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "wednesday": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "open": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    },
                    "close": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    }
                  },
                  "required": [
                    "open",
                    "close"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "thursday": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "open": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    },
                    "close": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    }
                  },
                  "required": [
                    "open",
                    "close"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "friday": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "open": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    },
                    "close": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    }
                  },
                  "required": [
                    "open",
                    "close"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "saturday": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "open": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    },
                    "close": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    }
                  },
                  "required": [
                    "open",
                    "close"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "sunday": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "open": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    },
                    "close": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                    }
                  },
                  "required": [
                    "open",
                    "close"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "booking_settings": {
      "type": "object",
      "properties": {
        "capacity_mode": {
          "type": "string",
          "enum": [
            "exclusive",
            "bookings",
            "guests"
          ]
        },
        "parallel_capacity": {
          "type": "integer",
          "minimum": 1,
          "maximum": 200
        },
        "slot_duration_minutes": {
          "type": "integer",
          "minimum": 15,
          "maximum": 480
        },
        "min_advance_hours": {
          "type": "integer",
          "minimum": 0,
          "maximum": 720
        },
        "max_advance_days": {
          "type": "integer",
          "minimum": 1,
          "maximum": 365
        },
        "auto_confirm": {
          "type": "boolean"
        },
        "buffer_before_minutes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 120
        },
        "buffer_after_minutes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 120
        }
      },
      "additionalProperties": {}
    },
    "is_active": {
      "type": "boolean"
    },
    "sort_order": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
```

### catalog.update_room

Изменить зал

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_update_room

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "room_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "description": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000
            },
            {
              "type": "null"
            }
          ]
        },
        "capacity": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            },
            {
              "type": "null"
            }
          ]
        },
        "area_sqm": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.1,
              "maximum": 99999
            },
            {
              "type": "null"
            }
          ]
        },
        "amenities": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 100
          }
        },
        "photos": {
          "maxItems": 20,
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          }
        },
        "working_hours": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "monday": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "open": {
                          "type": "string",
                          "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                        },
                        "close": {
                          "type": "string",
                          "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                        }
                      },
                      "required": [
                        "open",
                        "close"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tuesday": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "open": {
                          "type": "string",
                          "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                        },
                        "close": {
                          "type": "string",
                          "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                        }
                      },
                      "required": [
                        "open",
                        "close"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "wednesday": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "open": {
                          "type": "string",
                          "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                        },
                        "close": {
                          "type": "string",
                          "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                        }
                      },
                      "required": [
                        "open",
                        "close"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "thursday": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "open": {
                          "type": "string",
                          "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                        },
                        "close": {
                          "type": "string",
                          "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                        }
                      },
                      "required": [
                        "open",
                        "close"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "friday": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "open": {
                          "type": "string",
                          "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                        },
                        "close": {
                          "type": "string",
                          "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                        }
                      },
                      "required": [
                        "open",
                        "close"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "saturday": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "open": {
                          "type": "string",
                          "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                        },
                        "close": {
                          "type": "string",
                          "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                        }
                      },
                      "required": [
                        "open",
                        "close"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sunday": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "open": {
                          "type": "string",
                          "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                        },
                        "close": {
                          "type": "string",
                          "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
                        }
                      },
                      "required": [
                        "open",
                        "close"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "booking_settings": {
          "type": "object",
          "properties": {
            "capacity_mode": {
              "type": "string",
              "enum": [
                "exclusive",
                "bookings",
                "guests"
              ]
            },
            "parallel_capacity": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "slot_duration_minutes": {
              "type": "integer",
              "minimum": 15,
              "maximum": 480
            },
            "min_advance_hours": {
              "type": "integer",
              "minimum": 0,
              "maximum": 720
            },
            "max_advance_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365
            },
            "auto_confirm": {
              "type": "boolean"
            },
            "buffer_before_minutes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 120
            },
            "buffer_after_minutes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 120
            }
          },
          "additionalProperties": {}
        },
        "is_active": {
          "type": "boolean"
        },
        "sort_order": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "room_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### catalog.delete_room

Удалить зал

POST /api/v1/profiles/{profileId}/actions

Scopes: catalog:manage

MCP: catalog_delete_room

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "room_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "room_id"
  ],
  "additionalProperties": false
}
```

### profile.create_story

Добавить историю

POST /api/v1/profiles/{profileId}/actions

Scopes: profiles:write

MCP: profile_create_story

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "photo",
        "video"
      ]
    },
    "src": {
      "type": "string",
      "maxLength": 2048,
      "format": "uri"
    },
    "poster": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2048,
          "format": "uri"
        },
        {
          "type": "null"
        }
      ]
    },
    "duration": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 40
        },
        {
          "type": "null"
        }
      ]
    },
    "cta_type": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "message",
            "quiz",
            "anchor"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "cta_target": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ]
    },
    "cta_label": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 30
        },
        {
          "type": "null"
        }
      ]
    },
    "overlay": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "title": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "string",
                  "enum": [
                    "top",
                    "center",
                    "bottom"
                  ]
                },
                "align": {
                  "type": "string",
                  "enum": [
                    "left",
                    "center",
                    "right"
                  ]
                },
                "size": {
                  "type": "string",
                  "enum": [
                    "small",
                    "medium",
                    "large"
                  ]
                },
                "color": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "background": {
                  "type": "string",
                  "enum": [
                    "none",
                    "shade",
                    "pill"
                  ]
                }
              },
              "required": [
                "position",
                "align",
                "size",
                "color",
                "background"
              ]
            },
            "cta": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "string",
                  "enum": [
                    "top",
                    "center",
                    "bottom"
                  ]
                },
                "variant": {
                  "type": "string",
                  "enum": [
                    "light",
                    "accent",
                    "outline"
                  ]
                },
                "radius": {
                  "type": "string",
                  "enum": [
                    "rounded",
                    "pill"
                  ]
                }
              },
              "required": [
                "position",
                "variant",
                "radius"
              ]
            }
          },
          "required": [
            "title",
            "cta"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "crop": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "x": {
              "type": "number",
              "minimum": 0,
              "maximum": 100
            },
            "y": {
              "type": "number",
              "minimum": 0,
              "maximum": 100
            },
            "zoom": {
              "type": "number",
              "minimum": 1,
              "maximum": 2.5
            }
          },
          "required": [
            "x",
            "y",
            "zoom"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "trim_start": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 600
        },
        {
          "type": "null"
        }
      ]
    },
    "trim_end": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 600
        },
        {
          "type": "null"
        }
      ]
    },
    "muted": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "src"
  ],
  "additionalProperties": false
}
```

### profile.update_story

Изменить историю

POST /api/v1/profiles/{profileId}/actions

Scopes: profiles:write

MCP: profile_update_story

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "story_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "fields": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "photo",
            "video"
          ]
        },
        "src": {
          "type": "string",
          "maxLength": 2048,
          "format": "uri"
        },
        "poster": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2048,
              "format": "uri"
            },
            {
              "type": "null"
            }
          ]
        },
        "duration": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 120
            },
            {
              "type": "null"
            }
          ]
        },
        "title": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 40
            },
            {
              "type": "null"
            }
          ]
        },
        "cta_type": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "message",
                "quiz",
                "anchor"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "cta_target": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 64
            },
            {
              "type": "null"
            }
          ]
        },
        "cta_label": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 30
            },
            {
              "type": "null"
            }
          ]
        },
        "overlay": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "title": {
                  "type": "object",
                  "properties": {
                    "position": {
                      "type": "string",
                      "enum": [
                        "top",
                        "center",
                        "bottom"
                      ]
                    },
                    "align": {
                      "type": "string",
                      "enum": [
                        "left",
                        "center",
                        "right"
                      ]
                    },
                    "size": {
                      "type": "string",
                      "enum": [
                        "small",
                        "medium",
                        "large"
                      ]
                    },
                    "color": {
                      "type": "string",
                      "pattern": "^#[0-9a-f]{6}$"
                    },
                    "background": {
                      "type": "string",
                      "enum": [
                        "none",
                        "shade",
                        "pill"
                      ]
                    }
                  },
                  "required": [
                    "position",
                    "align",
                    "size",
                    "color",
                    "background"
                  ]
                },
                "cta": {
                  "type": "object",
                  "properties": {
                    "position": {
                      "type": "string",
                      "enum": [
                        "top",
                        "center",
                        "bottom"
                      ]
                    },
                    "variant": {
                      "type": "string",
                      "enum": [
                        "light",
                        "accent",
                        "outline"
                      ]
                    },
                    "radius": {
                      "type": "string",
                      "enum": [
                        "rounded",
                        "pill"
                      ]
                    }
                  },
                  "required": [
                    "position",
                    "variant",
                    "radius"
                  ]
                }
              },
              "required": [
                "title",
                "cta"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "crop": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "x": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "y": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "zoom": {
                  "type": "number",
                  "minimum": 1,
                  "maximum": 2.5
                }
              },
              "required": [
                "x",
                "y",
                "zoom"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "trim_start": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0,
              "maximum": 600
            },
            {
              "type": "null"
            }
          ]
        },
        "trim_end": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0,
              "maximum": 600
            },
            {
              "type": "null"
            }
          ]
        },
        "muted": {
          "type": "boolean"
        },
        "is_active": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "story_id",
    "fields"
  ],
  "additionalProperties": false
}
```

### profile.delete_story

Удалить историю

POST /api/v1/profiles/{profileId}/actions

Scopes: profiles:write

MCP: profile_delete_story

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "story_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "story_id"
  ],
  "additionalProperties": false
}
```

### profile.reorder_stories

Изменить порядок историй

POST /api/v1/profiles/{profileId}/actions

Scopes: profiles:write

MCP: profile_reorder_stories

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "order": {
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    }
  },
  "required": [
    "order"
  ],
  "additionalProperties": false
}
```

### profile.update

Изменить профиль

POST /api/v1/profiles/{profileId}/actions

Scopes: profiles:write

MCP: profile_update

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "display_name": {
      "type": "string",
      "minLength": 3,
      "maxLength": 60
    },
    "slug": {
      "type": "string"
    },
    "bio": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 45
        },
        {
          "type": "null"
        }
      ]
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "category": {
      "type": "string",
      "enum": [
        "venue",
        "animator",
        "show",
        "agency",
        "quest",
        "master_class",
        "photographer",
        "catering",
        "confectionery",
        "decorator",
        "dj_musician",
        "host",
        "transport",
        "attraction_rental"
      ]
    },
    "city": {
      "type": [
        "string",
        "null"
      ]
    },
    "address": {
      "type": [
        "string",
        "null"
      ]
    },
    "timezone": {
      "type": "string"
    },
    "phone": {
      "type": [
        "string",
        "null"
      ]
    },
    "email": {
      "type": [
        "string",
        "null"
      ]
    },
    "website": {
      "type": [
        "string",
        "null"
      ]
    },
    "main_photo": {
      "type": [
        "string",
        "null"
      ]
    },
    "logo": {
      "type": [
        "string",
        "null"
      ]
    },
    "cover_photo": {
      "type": [
        "string",
        "null"
      ]
    },
    "photos": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "videos": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "video_cover": {
      "type": [
        "string",
        "null"
      ]
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "price_range": {
      "type": [
        "string",
        "null"
      ]
    },
    "working_hours": {},
    "details": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "custom_fields_config": {},
    "faq": {},
    "social_links": {},
    "primary_venue_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "primary_services": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "additional_services": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "custom_activities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "legal_form": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "private",
            "self_employed",
            "ip",
            "ooo"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "show_calendar": {
      "type": "boolean"
    },
    "activities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "services": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "geo_location_wkt": {
      "type": "string"
    },
    "location_photos": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "show_yandex_reviews": {
      "type": "boolean"
    },
    "show_dgis_reviews": {
      "type": "boolean"
    },
    "avito_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "show_avito_reviews": {
      "type": "boolean"
    },
    "yandex_auto_refresh": {
      "type": "boolean"
    },
    "yandex_refresh_interval_days": {
      "type": "integer",
      "minimum": 7,
      "maximum": 30
    },
    "dgis_auto_refresh": {
      "type": "boolean"
    },
    "dgis_refresh_interval_days": {
      "type": "integer",
      "minimum": 7,
      "maximum": 30
    },
    "avito_auto_refresh": {
      "type": "boolean"
    },
    "avito_refresh_interval_days": {
      "type": "integer",
      "minimum": 7,
      "maximum": 30
    },
    "directions": {
      "type": [
        "string",
        "null"
      ]
    },
    "transport_info": {
      "type": [
        "string",
        "null"
      ]
    },
    "yandex_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "dgis_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "location_video_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "branch_name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 40
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "description": "Поля профиля как в редакторе: название, slug, описания, контакты, адрес/география, FAQ, галерея и контент. Публикация, оформление и настройки CRM изменяются отдельными действиями. Фото должны быть предварительно загружены в ЗумЗам."
}
```

### design.set_template

Изменить шаблон секции

POST /api/v1/profiles/{profileId}/actions

Scopes: design:write

MCP: design_set_template

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "sectionId": {
      "type": "string",
      "minLength": 1
    },
    "templateId": {
      "type": "string",
      "minLength": 1
    },
    "variant": {
      "type": "string",
      "enum": [
        "mobile",
        "desktop"
      ]
    },
    "lastUpdatedAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "sectionId",
    "templateId"
  ],
  "additionalProperties": false
}
```

### design.update_settings

Изменить оформление

POST /api/v1/profiles/{profileId}/actions

Scopes: design:write

MCP: design_update_settings

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "preset": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "presetId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "branchTargetIds": {
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "keepContent": {
          "type": "boolean"
        }
      },
      "required": [
        "preset"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "copyVariant": {
          "type": "object",
          "properties": {
            "from": {
              "type": "string",
              "enum": [
                "mobile",
                "desktop"
              ]
            },
            "to": {
              "type": "string",
              "enum": [
                "mobile",
                "desktop"
              ]
            }
          },
          "required": [
            "from",
            "to"
          ]
        }
      },
      "required": [
        "copyVariant"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "defaults": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "mobile": {
                "type": "string",
                "minLength": 1
              },
              "desktop": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "mobile",
              "desktop"
            ]
          }
        }
      },
      "required": [
        "defaults"
      ],
      "additionalProperties": false
    }
  ],
  "description": "Один из режимов: preset (настройки оформления), copyVariant:{from,to}, defaults (сброс шаблонов). branchTargetIds требует доступа к каждому выбранному профилю."
}
```

### design.create_version

Сохранить версию оформления

POST /api/v1/profiles/{profileId}/actions

Scopes: design:write

MCP: design_create_version

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "label": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    }
  },
  "additionalProperties": false
}
```

### design.restore_version

Восстановить оформление

POST /api/v1/profiles/{profileId}/actions

Scopes: design:write

MCP: design_restore_version

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "version_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "version_id"
  ],
  "additionalProperties": false
}
```

### get_profile_publication

Проверить готовность и согласие на публикацию профиля

GET /api/v1/profiles/{profileId}/resources/publication

Scopes: profiles:read

MCP: get_profile_publication

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### list_profile_team

Прочитать участников, приглашения и права команды

GET /api/v1/profiles/{profileId}/resources/team

Scopes: team:read

MCP: list_profile_team

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### review_profile_document_faq

Сверить документ с вопросами профиля

GET /api/v1/profiles/{profileId}/resources/document_faq_review

Scopes: documents:read

MCP: review_profile_document_faq

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "document_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "document_id"
  ],
  "additionalProperties": false
}
```

### list_profile_document_files

Прочитать файлы документов профиля

GET /api/v1/profiles/{profileId}/resources/document_files

Scopes: documents:read

MCP: list_profile_document_files

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "cursor": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "additionalProperties": false
}
```

### list_profile_documents

Прочитать документы профиля, черновики и архив

GET /api/v1/profiles/{profileId}/resources/documents

Scopes: documents:read

MCP: list_profile_documents

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "cursor": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "additionalProperties": false
}
```

### list_profile_document_versions

Прочитать опубликованные версии собственного документа

GET /api/v1/profiles/{profileId}/resources/document_versions

Scopes: documents:read

MCP: list_profile_document_versions

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "document_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "cursor": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "document_id"
  ],
  "additionalProperties": false
}
```

### list_profile_quizzes

Прочитать калькуляторы и размещения выбранного профиля

GET /api/v1/profiles/{profileId}/resources/quizzes

Scopes: quizzes:read

MCP: list_profile_quizzes

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "cursor": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "additionalProperties": false
}
```

### list_profile_quiz_leads

Прочитать заявки калькулятора выбранного размещения

GET /api/v1/profiles/{profileId}/resources/quiz_leads

Scopes: quizzes:read

MCP: list_profile_quiz_leads

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "placement_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "cursor": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "quiz_id",
    "placement_id"
  ],
  "additionalProperties": false
}
```

### get_profile_quiz_statistics

Прочитать статистику калькулятора выбранного размещения

GET /api/v1/profiles/{profileId}/resources/quiz_statistics

Scopes: quizzes:read

MCP: get_profile_quiz_statistics

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "placement_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "period": {
      "default": "30",
      "type": "string",
      "enum": [
        "7",
        "30",
        "90",
        "all"
      ]
    }
  },
  "required": [
    "quiz_id",
    "placement_id"
  ],
  "additionalProperties": false
}
```

### get_profile_booking_settings

Прочитать настройки бронирования профиля

GET /api/v1/profiles/{profileId}/resources/booking_settings

Scopes: bookings:read

MCP: get_profile_booking_settings

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### list_profile_bookings

Прочитать бронирования выбранного профиля

GET /api/v1/profiles/{profileId}/resources/bookings

Scopes: bookings:read

MCP: list_profile_bookings

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "cursor": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "from": {
      "type": "string"
    },
    "to": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
```

### list_profile_calendar

Прочитать календарь выбранного профиля

GET /api/v1/profiles/{profileId}/resources/calendar

Scopes: bookings:read

MCP: list_profile_calendar

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "cursor": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "from": {
      "type": "string"
    },
    "to": {
      "type": "string"
    }
  },
  "required": [
    "from",
    "to"
  ],
  "additionalProperties": false
}
```

### get_profile_booking_slots

Проверить доступные слоты бронирования

GET /api/v1/profiles/{profileId}/resources/booking_slots

Scopes: bookings:read

MCP: get_profile_booking_slots

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "date": {
      "type": "string"
    },
    "service_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "room_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "date"
  ],
  "additionalProperties": false
}
```

### get_profile_order_resolution

Прочитать согласование результата заказа

GET /api/v1/profiles/{profileId}/resources/order_resolution

Scopes: crm:read

MCP: get_profile_order_resolution

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "order_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "order_id"
  ],
  "additionalProperties": false
}
```

### get_profile_booking_resolution

Прочитать согласование результата заказа

GET /api/v1/profiles/{profileId}/resources/booking_resolution

Scopes: bookings:read

MCP: get_profile_booking_resolution

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "order_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "order_id"
  ],
  "additionalProperties": false
}
```

### list_profile_contact_children

Прочитать сведения о детях клиента

GET /api/v1/profiles/{profileId}/resources/contact_children

Scopes: crm:read

MCP: list_profile_contact_children

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "contact_id"
  ],
  "additionalProperties": false
}
```

### list_profile_crm_automations

Прочитать автоматизации CRM

GET /api/v1/profiles/{profileId}/resources/automations

Scopes: crm:read

MCP: list_profile_crm_automations

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "pipeline_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "pipeline_id"
  ],
  "additionalProperties": false
}
```

### get_profile_crm_sales_target

Прочитать план и факт продаж

GET /api/v1/profiles/{profileId}/resources/sales_target

Scopes: crm:read

MCP: get_profile_crm_sales_target

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
    }
  },
  "required": [
    "period"
  ],
  "additionalProperties": false
}
```

### get_profile_crm_analytics

Прочитать аналитику CRM

GET /api/v1/profiles/{profileId}/resources/crm_analytics

Scopes: crm:read

MCP: get_profile_crm_analytics

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "pipeline_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "additionalProperties": false
}
```

### get_profile_deal_finance

Прочитать финансы сделки

GET /api/v1/profiles/{profileId}/resources/deal_finance

Scopes: crm:finance:read

MCP: get_profile_deal_finance

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id"
  ],
  "additionalProperties": false
}
```

### get_profile_finance_report

Прочитать финансовый отчёт

GET /api/v1/profiles/{profileId}/resources/finance_report

Scopes: crm:finance:read

MCP: get_profile_finance_report

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "from": {
      "type": "string"
    },
    "to": {
      "type": "string"
    }
  },
  "required": [
    "from",
    "to"
  ],
  "additionalProperties": false
}
```

### list_profile_inventory

Прочитать костюмерную и бронирования

GET /api/v1/profiles/{profileId}/resources/inventory

Scopes: crm:inventory:read

MCP: list_profile_inventory

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "additionalProperties": false
}
```

### get_profile_deal_preparation

Прочитать подготовку сделки

GET /api/v1/profiles/{profileId}/resources/preparation

Scopes: crm:read

MCP: get_profile_deal_preparation

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id"
  ],
  "additionalProperties": false
}
```

### list_profile_custom_blocks

Прочитать разделы профиля

GET /api/v1/profiles/{profileId}/resources/custom_blocks

Scopes: profiles:read

MCP: list_profile_custom_blocks

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### get_profile_custom_block_design

Прочитать оформление раздела профиля

GET /api/v1/profiles/{profileId}/resources/custom_block_design

Scopes: design:read

MCP: get_profile_custom_block_design

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "block_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "block_id"
  ],
  "additionalProperties": false
}
```

### list_profile_quiz_promo_codes

Прочитать промокоды калькулятора

GET /api/v1/profiles/{profileId}/resources/quiz_promo_codes

Scopes: quizzes:read

MCP: list_profile_quiz_promo_codes

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "quiz_id"
  ],
  "additionalProperties": false
}
```

### get_profile_quiz_product_settings

Прочитать уведомления и CRM калькулятора

GET /api/v1/profiles/{profileId}/resources/quiz_product_settings

Scopes: quizzes:read

MCP: get_profile_quiz_product_settings

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "quiz_id"
  ],
  "additionalProperties": false
}
```

### list_profile_booking_widgets

Прочитать виджеты бронирования

GET /api/v1/profiles/{profileId}/resources/booking_widgets

Scopes: bookings:read

MCP: list_profile_booking_widgets

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### list_profile_booking_automations

Прочитать сценарии бронирования

GET /api/v1/profiles/{profileId}/resources/booking_automations

Scopes: bookings:read

MCP: list_profile_booking_automations

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### get_profile_booking_inventory_settings

Прочитать ресурсы бронирования

GET /api/v1/profiles/{profileId}/resources/booking_inventory_settings

Scopes: bookings:read

MCP: get_profile_booking_inventory_settings

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### list_profile_booking_waitlist

Прочитать лист ожидания

GET /api/v1/profiles/{profileId}/resources/booking_waitlist

Scopes: bookings:read

MCP: list_profile_booking_waitlist

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "cursor": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "status": {
      "type": "string",
      "enum": [
        "waiting",
        "notified",
        "cancelled",
        "booked"
      ]
    }
  },
  "additionalProperties": false
}
```

### get_profile_payment_provider

Прочитать настройки кассы

GET /api/v1/profiles/{profileId}/resources/payment_provider

Scopes: payments:read

MCP: get_profile_payment_provider

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### get_deal_crew

Прочитать назначения, роли и готовность команды

GET /api/v1/profiles/{profileId}/resources/deal_crew

Scopes: crm:read

MCP: get_deal_crew

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id"
  ],
  "additionalProperties": false
}
```

### list_deal_activities

Прочитать журнал собственной сделки

GET /api/v1/profiles/{profileId}/resources/deal_activities

Scopes: crm:read

MCP: list_deal_activities

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "cursor": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id"
  ],
  "additionalProperties": false
}
```

### search_bank_reconciliation_deals

Найти собственную сделку для сверки платежа

GET /api/v1/profiles/{profileId}/resources/bank_deal_search

Scopes: crm:banks:read

MCP: search_bank_reconciliation_deals

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "search": {
      "default": "",
      "type": "string",
      "maxLength": 80
    }
  },
  "additionalProperties": false
}
```

### list_deal_subcontracts

Прочитать субподряды собственной сделки

GET /api/v1/profiles/{profileId}/resources/deal_subcontracts

Scopes: crm:read

MCP: list_deal_subcontracts

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "cursor": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id"
  ],
  "additionalProperties": false
}
```

### list_subcontract_responses

Прочитать отклики на собственный субподряд

GET /api/v1/profiles/{profileId}/resources/subcontract_responses

Scopes: crm:read

MCP: list_subcontract_responses

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "subcontract_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "cursor": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id",
    "subcontract_id"
  ],
  "additionalProperties": false
}
```

### get_deal_invoices

Прочитать счета и остаток оплаты собственной сделки

GET /api/v1/profiles/{profileId}/resources/deal_invoices

Scopes: payments:read

MCP: get_deal_invoices

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id"
  ],
  "additionalProperties": false
}
```

### get_deal_materials

Прочитать материалы собственной сделки

GET /api/v1/profiles/{profileId}/resources/deal_materials

Scopes: crm:read

MCP: get_deal_materials

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id"
  ],
  "additionalProperties": false
}
```

### list_prepared_deal_materials

Прочитать собственные подготовленные файлы

GET /api/v1/profiles/{profileId}/resources/prepared_materials

Scopes: crm:write

MCP: list_prepared_deal_materials

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "additionalProperties": false
}
```

### get_deal_channels

Прочитать переписку собственной сделки

GET /api/v1/profiles/{profileId}/resources/deal_channels

Scopes: crm:messages:read

MCP: get_deal_channels

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "conversation_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "before": {
      "type": "string",
      "maxLength": 300
    }
  },
  "required": [
    "deal_id"
  ],
  "additionalProperties": false
}
```

### list_profile_conversations

Прочитать клиентские диалоги своего профиля

GET /api/v1/profiles/{profileId}/resources/conversations

Scopes: crm:messages:read

MCP: list_profile_conversations

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "limit": {
      "default": 50,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "before": {
      "type": "string",
      "maxLength": 200
    }
  },
  "additionalProperties": false
}
```

### get_profile_conversation_messages

Прочитать сообщения клиентского диалога своего профиля

GET /api/v1/profiles/{profileId}/resources/conversation_messages

Scopes: crm:messages:read

MCP: get_profile_conversation_messages

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "limit": {
      "default": 50,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "before": {
      "type": "string",
      "maxLength": 200
    },
    "conversation_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "conversation_id"
  ],
  "additionalProperties": false
}
```

### get_booking_credit_codes

Прочитать промокоды и остатки сертификатов профиля

GET /api/v1/profiles/{profileId}/resources/booking_credit_codes

Scopes: bookings:read

MCP: get_booking_credit_codes

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### get_profile_draft

Прочитать содержимое черновика своего профиля

GET /api/v1/profiles/{profileId}/resources/draft

Scopes: profiles:read

MCP: get_profile_draft

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### get_profile_publish_history

Прочитать историю публикаций своего профиля

GET /api/v1/profiles/{profileId}/resources/publish_history

Scopes: profiles:read

MCP: get_profile_publish_history

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "limit": {
      "default": 20,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  },
  "additionalProperties": false
}
```

### get_quiz_webhooks

Прочитать вебхуки собственного калькулятора

GET /api/v1/profiles/{profileId}/resources/quiz_webhooks

Scopes: quizzes:read

MCP: get_quiz_webhooks

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "quiz_id"
  ],
  "additionalProperties": false
}
```

### get_profile_connections

Прочитать подключения каналов и почты своего профиля

GET /api/v1/profiles/{profileId}/resources/connections

Scopes: crm:read

MCP: get_profile_connections

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### get_profile_connection_setup

Получить ссылку на подтверждение подключения владельцем

GET /api/v1/profiles/{profileId}/resources/connection_setup

Scopes: crm:settings:write

MCP: get_profile_connection_setup

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "enum": [
        "modulbank",
        "instagram",
        "amocrm",
        "bitrix24",
        "telegram",
        "max",
        "whatsapp"
      ]
    }
  },
  "required": [
    "provider"
  ],
  "additionalProperties": false
}
```

### export_owned_quiz_template

Выгрузить шаблон собственного калькулятора

GET /api/v1/profiles/{profileId}/resources/quiz_template

Scopes: quizzes:read

MCP: export_owned_quiz_template

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quiz_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "quiz_id"
  ],
  "additionalProperties": false
}
```

### get_client_invites

Прочитать состояние приглашений собственного клиента

GET /api/v1/profiles/{profileId}/resources/client_invites

Scopes: crm:read

MCP: get_client_invites

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "contact_id"
  ],
  "additionalProperties": false
}
```

### list_own_profile_media

Прочитать медиатеку собственного профиля

GET /api/v1/profiles/{profileId}/resources/profile_media

Scopes: profiles:read

MCP: list_own_profile_media

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "cursor": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "additionalProperties": false
}
```

### get_own_profile_lifecycle

Проверить состояние и срок восстановления своего профиля

GET /api/v1/profiles/{profileId}/resources/lifecycle

Scopes: profiles:manage

MCP: get_own_profile_lifecycle

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### get_profile_message_reactions

Прочитать реакции в клиентском диалоге профиля

GET /api/v1/profiles/{profileId}/resources/message_reactions

Scopes: crm:messages:read

MCP: get_profile_message_reactions

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "message_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "message_id"
  ],
  "additionalProperties": false
}
```

### list_own_profile_reviews

Прочитать отзывы своего профиля

GET /api/v1/profiles/{profileId}/resources/reviews

Scopes: profiles:read

MCP: list_own_profile_reviews

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "cursor": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "additionalProperties": false
}
```

### get_profile_communication_jobs

Проверить выполнение отправок и действий профиля

GET /api/v1/profiles/{profileId}/resources/communication_jobs

Scopes: crm:messages:write

MCP: get_profile_communication_jobs

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "job_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "cursor": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "additionalProperties": false
}
```

### get_deal_emails

Прочитать страницу писем собственной сделки

GET /api/v1/profiles/{profileId}/resources/deal_emails

Scopes: crm:messages:read

MCP: get_deal_emails

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "cursor": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "limit": {
      "default": 10,
      "type": "integer",
      "minimum": 1,
      "maximum": 25
    }
  },
  "required": [
    "deal_id"
  ],
  "additionalProperties": false
}
```

### get_external_media_status

Проверить подготовку вложения внешнего чата

GET /api/v1/profiles/{profileId}/resources/external_media

Scopes: crm:messages:write

MCP: get_external_media_status

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "media_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "deal_id",
    "media_id"
  ],
  "additionalProperties": false
}
```

### list_profile_external_conversations

Прочитать входящие диалоги собственного профиля

GET /api/v1/profiles/{profileId}/resources/external_conversations

Scopes: crm:messages:read

MCP: list_profile_external_conversations

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "cursor": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "unassigned_only": {
      "type": "string",
      "enum": [
        "true",
        "false"
      ]
    }
  },
  "additionalProperties": false
}
```

### get_profile_external_conversation

Прочитать сообщения до распределения по сделкам

GET /api/v1/profiles/{profileId}/resources/external_conversation

Scopes: crm:messages:read

MCP: get_profile_external_conversation

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "before": {
      "type": "string",
      "maxLength": 300
    }
  },
  "required": [
    "conversation_id"
  ],
  "additionalProperties": false
}
```
