---
title: "Создание Max-сообщения"
method: POST
path: "/max"
tags: ["Max"]
---

# Создание Max-сообщения

`POST /max`

Создает Max-сообщение и ставит его в очередь отправки. Поддерживает идемпотентность через заголовок `Idempotency-Key`.

## Headers

- `Idempotency-Key` string, uuid

## Request body

- MaxCreateRequest
  - `bot_token` string, required — Токен Max-бота.
  - `chat_id` integer, required — Идентификатор Max-чата.
  - `format` 'html' | 'markdown' — Формат текста сообщения.
  - `message` string, required — Текст Max-сообщения.
  - `button` Button
    - `url` string, uri, required — URL кнопки.
    - `label` string, required — Текст кнопки.
  - `tags` string[] — Уникальные slug-метки.

## Response `200`

Сообщение создано.

- object
  - `uuid` string, uuid, required — UUID в стандартном строковом формате.

## Other responses

- `400` — Неправильный запрос.
- `401` — Пользователь не авторизован или токен не передан.
- `403` — Доступ запрещен.
- `500` — Внутренняя ошибка сервера.

---

[API](https://skmtc.net/smartofood/apis/smartofood-control-api.md) · [All operations](https://skmtc.net/smartofood/apis/smartofood-control-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smartofood/smartofood-control-api/versions/b905fafbfc0a/schema)
