Перейти к основному содержимому

Справочник API

Полный список эндпоинтов Public API — того, что доступно по API-ключу проекта. Страница собрана из OpenAPI-спеки, из которой генерятся и официальные SDK, поэтому разойтись с реальным поведением API она не может.

Машиночитаемая спека: mailinfra-public.json.

Основы​

  • База API — https://app.mailinfra.ru/v1.
  • Аутентификация — Authorization: Bearer mi_live_… (рабочие отправки) или Bearer mi_test_… (sandbox: письмо сохраняется со статусом SIMULATED, не доставляется и не расходует месячный объём).
  • Успешный ответ всегда приходит конвертом {"data": …}.
  • Ошибка — конвертом {"error": {"code", "message", "details"}, "request_id"}. Ветвитесь по error.code, а не по тексту сообщения: коды и лимиты.
  • X-Request-ID есть в каждом ответе — именно его называйте в обращении в поддержку.
Не собирайте запросы руками

Идемпотентность, повторы с backoff и разбор ошибок уже сделаны в официальных SDK: Python, Node.js, PHP, Go.

Эндпоинты​

GET /emails​

Письма проекта, новые сначала, страницами по limit.

Args: ctx: Контекст API-ключа. db: Сессия БД. status_filter: Статус письма. from_email: Адрес отправителя. to_email: Адрес получателя. tag: Тег письма. from_date: Начало периода (включительно). to_date: Конец периода. limit: Размер страницы, до 100. cursor: next_cursor предыдущей страницы.

Returns: Страница писем, признак следующей и её курсор.

Параметры​

ПараметрГдеТипОбязательноОписание
statusqueryEmailStatus | nullнет
from_emailquerystring | nullнет
to_emailquerystring | nullнет
tagquerystring | nullнет
fromquerystring (ISO-8601) | nullнет
toquerystring (ISO-8601) | nullнет
limitqueryintegerнетот 1, до 100, по умолчанию 25
cursorquerystring | nullнетдо 200 символов

Ответ​

Поле data — список EmailListItem.

Коды ответа​

КодКогдаЗаголовки
200Успешный ответMailInfra-Notice, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

POST /emails​

Параметры​

ПараметрГдеТипОбязательноОписание
Idempotency-Keyзаголовокstring | nullнетдо 255 символов

Тело запроса​

Схема: EmailSendRequest.

ПолеТипОбязательноОписание
attachmentsarray<EmailAttachmentInput>нетдо 10 элементов
bccarray<string (email)>нетСкрытая копия — не больше одного адреса.. до 1 элементов
ccarray<string (email)>нетКопия — не больше одного адреса.. до 1 элементов
fromstring (email) | nullнет
from_namestring | nullнетдо 200 символов
headersobject<string, string>нет
htmlstring | nullнетдо 26 214 400 символов
metadataobject<string, string>нетВаши пары «ключ — значение» (номер заказа, id пользователя): вернутся в GET /v1/emails и в каждом вебхуке письма. До 20 ключей, значения — строки до 500 символов.
reply_toarray<string (email)>нетдо 10 элементов
send_atstring (ISO-8601) | nullнетОтложенная отправка: ISO 8601 с часовым поясом, не дальше 7 дней вперёд. Письмо получит статус SCHEDULED; до отправки его можно отменить или перенести. Время в прошлом — отправить сразу.
subjectstring | nullнетдо 998 символов
tagsarray<string>нетдо 10 элементов
templatestring | nullнетдо 100 символов
template_versioninteger | nullнетот 1
textstring | nullнетдо 26 214 400 символов
toarray<string (email)>даПолучатель письма — ровно один адрес.. не пустой список, до 1 элементов
ttlinteger | nullнетСрок жизни письма в секундах (от минуты до суток), отсчёт от send_at или от приёма. Не дошедшее за это время письмо не отправляется и не повторяется: статус FAILED с причиной expired или отказ с категорией delivery-expired. Для кодов входа и других писем, которые поздно уже не нужны.. от 60, до 86400
variablesobject<string, any>нет

Ответ​

Поле data — EmailSendResponseData.

Коды ответа​

КодКогдаЗаголовки
200Идемпотентный повтор: запрос с таким Idempotency-Key уже был принят, письмо повторно не отправлено.Idempotent-Replayed, MailInfra-Notice, X-Request-ID
202Успешный ответMailInfra-Notice, X-Request-ID
429Превышен входной лимит организации (rps_exceeded) или лимит отправки: месячный объём плана (error.code = monthly_limit_exceeded, в error.details — limit, used, resets_at и period — ключ расчётного периода: YYYY-MM для Free, <активация в UTC>#<номер месяца> для платной подписки), дневной потолок организации (daily_send_cap_exceeded, в error.details — cap и resets_at), общий бесплатный объём домена отправителя на FREE (domain_free_limit_exceeded, в error.details — domain, limit, used, resets_at, period) или прогрев новой FREE-организации — не больше 20 получателей в первые сутки (free_warmup_limit_exceeded, resets_at — конец прогрева), либо писем тестовых ключей. Заголовок Retry-After содержит задержку до повтора.MailInfra-Notice, Retry-After, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

POST /emails/batch​

Принимает до MAX_BATCH_EMAILS писем одним запросом.

Доступно на платных тарифах. На Free любой batch, даже из одного письма, отклоняется с HTTP 403 batch_not_allowed_for_plan до приёма писем: ничего не создаётся и квота не расходуется. Отправляйте письма по одному через POST /v1/emails.

С Idempotency-Key у каждого письма свой ключ (ключ запроса и номер письма): повтор того же запроса не дублирует уже принятые письма, а отклонённые пробует принять заново. Если повтором оказались все принятые письма, ответ — 200 с заголовком Idempotent-Replayed.

Args: payload: Письма batch-запроса. ctx: Контекст API-ключа. request: HTTP-запрос — для адреса клиента в архиве ОРИ. response: HTTP-ответ — статус и заголовок повтора. db: Сессия БД. idempotency_key: Ключ идемпотентности batch-запроса.

Returns: Результат по каждому письму и счётчики.

Параметры​

ПараметрГдеТипОбязательноОписание
Idempotency-Keyзаголовокstring | nullнетдо 252 символов

Тело запроса​

Схема: BatchSendRequest.

ПолеТипОбязательноОписание
emailsarray<BatchEmailSendRequest>дане пустой список, до 100 элементов

Ответ​

Поле data — BatchSendResponseData.

Коды ответа​

КодКогдаЗаголовки
200Идемпотентный повтор: все письма пачки с таким Idempotency-Key уже были приняты, ни одно не отправлено повторно; в теле — первые ответы.Idempotent-Replayed, MailInfra-Notice, X-Request-ID
202Успешный ответMailInfra-Notice, X-Request-ID
403Batch недоступен на тарифе Free (batch_not_allowed_for_plan): запрос отклонён целиком, письма не созданы, квота не расходуется. Также — у API-ключа нет права на отправку.MailInfra-Notice, X-Request-ID
429Превышен входной лимит организации (rps_exceeded). Batch целиком = один входной токен. Retry-After — задержка до повтора. Квоты отдельных писем возвращаются ошибками элементов.MailInfra-Notice, Retry-After, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

GET /emails/{email_id}​

Параметры​

ПараметрГдеТипОбязательноОписание
email_idпутьstring (uuid)да

Ответ​

Поле data — EmailDetail.

Коды ответа​

КодКогдаЗаголовки
200Успешный ответMailInfra-Notice, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

PATCH /emails/{email_id}​

Переносит запланированное письмо на новое время.

Args: email_id: Письмо проекта ключа. payload: Новое send_at. ctx: Контекст API-ключа. db: Сессия БД.

Returns: Письмо с новым scheduled_at.

Raises: ForbiddenError: Ключ не может отправлять письма. NotFoundError: Письма нет в проекте. ConflictError: Письмо уже не запланировано (email_not_scheduled). ValidationError: send_at дальше горизонта (send_at_too_far).

Параметры​

ПараметрГдеТипОбязательноОписание
email_idпутьstring (uuid)да

Тело запроса​

Схема: EmailRescheduleRequest.

ПолеТипОбязательноОписание
send_atstring (ISO-8601)даНовое время отправки с часовым поясом, не дальше 7 дней от приёма письма. Время в прошлом — отправить сейчас.

Ответ​

Поле data — EmailScheduleData.

Коды ответа​

КодКогдаЗаголовки
200Успешный ответMailInfra-Notice, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

POST /emails/{email_id}/cancel​

Отменяет запланированное письмо; резерв квоты возвращается.

Право — то же, что на отправку: отмена — часть того же сценария («пользователь оплатил — напоминание не нужно»), а ответ не раскрывает содержимого письма.

Args: email_id: Письмо проекта ключа. ctx: Контекст API-ключа. db: Сессия БД.

Returns: Письмо в статусе CANCELED.

Raises: ForbiddenError: Ключ не может отправлять письма. NotFoundError: Письма нет в проекте. ConflictError: Письмо уже не запланировано (email_not_scheduled).

Параметры​

ПараметрГдеТипОбязательноОписание
email_idпутьstring (uuid)да

Ответ​

Поле data — EmailScheduleData.

Коды ответа​

КодКогдаЗаголовки
200Успешный ответMailInfra-Notice, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

GET /emails/{email_id}/events​

Параметры​

ПараметрГдеТипОбязательноОписание
email_idпутьstring (uuid)да

Ответ​

Поле data — список EmailEventPublic.

Коды ответа​

КодКогдаЗаголовки
200Успешный ответMailInfra-Notice, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

GET /templates​

List up to fifty template identities without loading source bodies.

Args: ctx: Authenticated key context. db: Request session. after: Previous page's continuation cursor.

Returns: Project-local draft/publication summaries and a continuation cursor.

Параметры​

ПараметрГдеТипОбязательноОписание
afterquerystring (uuid) | nullнет

Ответ​

Поле data — TemplatePage.

Коды ответа​

КодКогдаЗаголовки
200Успешный ответMailInfra-Notice, X-Request-ID
429Превышен лимит управления шаблонами: 120 запросов в минуту на API-ключ.MailInfra-Notice, Retry-After, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

POST /templates​

Create an unpublished code or visual draft in the key's project.

Args: payload: Typed source and data contract. ctx: Authenticated key context. db: Request session.

Returns: Revision one; an occupied slug returns 409.

Тело запроса​

Схема: TemplateCreate.

ПолеТипОбязательноОписание
deliveryTemplateDelivery | nullнет
documentTemplateDocument-Input | nullнет
editorstringнетпо умолчанию "code"
html_templatestring | nullнет
namestringдане пустая строка, до 200 символов
slugstringдане пустая строка, до 100 символов
subject_templatestringнетпо умолчанию ""
test_datasetsarray<TemplateTestDataset> | nullнет
text_templatestring | nullнет
variable_schemaobject<string, VariableDefinition-Input> | nullнет
variablesobject<string, any> | nullнет

Ответ​

Поле data — TemplatePublic.

Коды ответа​

КодКогдаЗаголовки
201Успешный ответMailInfra-Notice, X-Request-ID
429Превышен лимит управления шаблонами: 120 запросов в минуту на API-ключ.MailInfra-Notice, Retry-After, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

DELETE /templates/{slug}​

Delete only the expected revision after checking protected block authority.

Args: slug: Project-local slug. ctx: Authenticated key context. db: Request session. draft_revision: Explicit expected revision, required for API deletion.

Returns: Deletion status; concurrent edits produce 409.

Параметры​

ПараметрГдеТипОбязательноОписание
slugпутьstringдадо 100 символов
draft_revisionqueryintegerдаот 1

Ответ​

Поле data — StatusResponse.

Коды ответа​

КодКогдаЗаголовки
200Успешный ответMailInfra-Notice, X-Request-ID
429Превышен лимит управления шаблонами: 120 запросов в минуту на API-ключ.MailInfra-Notice, Retry-After, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

GET /templates/{slug}​

Read the saved draft and its project/identity binding for revision-safe tools.

Args: slug: Project-local slug. ctx: Authenticated key context. db: Request session.

Returns: Saved source, expected revision, and publication metadata.

Параметры​

ПараметрГдеТипОбязательноОписание
slugпутьstringдадо 100 символов

Ответ​

Поле data — TemplatePublic.

Коды ответа​

КодКогдаЗаголовки
200Успешный ответMailInfra-Notice, X-Request-ID
429Превышен лимит управления шаблонами: 120 запросов в минуту на API-ключ.MailInfra-Notice, Retry-After, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

PATCH /templates/{slug}​

Update the expected saved revision without changing its publication.

Args: slug: Project-local slug. payload: Typed partial source update with draft_revision. ctx: Authenticated key context. db: Request session.

Returns: Updated draft; conflicts and protected block changes fail without overwriting.

Параметры​

ПараметрГдеТипОбязательноОписание
slugпутьstringдадо 100 символов

Тело запроса​

Схема: TemplateUpdate.

ПолеТипОбязательноОписание
deliveryTemplateDelivery | nullнет
documentTemplateDocument-Input | nullнет
draft_revisionintegerдаот 1
editorstring | nullнет
html_templatestring | nullнет
namestring | nullнетне пустая строка, до 200 символов
refresh_dependenciesbooleanнетпо умолчанию false
subject_templatestring | nullнетне пустая строка
test_datasetsarray<TemplateTestDataset> | nullнет
text_templatestring | nullнет
variable_schemaobject<string, VariableDefinition-Input> | nullнет
variablesobject<string, any> | nullнет

Ответ​

Поле data — TemplatePublic.

Коды ответа​

КодКогдаЗаголовки
200Успешный ответMailInfra-Notice, X-Request-ID
429Превышен лимит управления шаблонами: 120 запросов в минуту на API-ключ.MailInfra-Notice, Retry-After, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

POST /templates/{slug}/checks​

Inspect all saved datasets without publishing or changing the draft.

Args: slug: Project-local slug. payload: Expected draft revision. ctx: Authenticated key context. db: Request session.

Returns: The same publication report and fingerprint as the dashboard.

Параметры​

ПараметрГдеТипОбязательноОписание
slugпутьstringдадо 100 символов

Тело запроса​

Схема: TemplateRestore.

ПолеТипОбязательноОписание
draft_revisionintegerдаот 1

Ответ​

Поле data — TemplateChecks.

Коды ответа​

КодКогдаЗаголовки
200Успешный ответMailInfra-Notice, X-Request-ID
429Превышен лимит управления шаблонами: 120 запросов в минуту на API-ключ.MailInfra-Notice, Retry-After, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

POST /templates/{slug}/preview​

Render an explicit draft revision or publication with bounded shared rendering.

Args: slug: Project-local slug. payload: Exactly one snapshot selection and runtime variables. ctx: Authenticated key context. db: Request session.

Returns: HTML/plain output without creating an email or consuming delivery quota.

Raises: ForbiddenError: The key or its creator cannot read project templates. NotFoundError: The requested template or publication is unavailable. ConflictError: The requested draft revision is stale. ValidationError: Required pinned dependencies or source syntax are invalid. UnprocessableError: Variables, rendering, or visual output fail shared validation.

Параметры​

ПараметрГдеТипОбязательноОписание
slugпутьstringдадо 100 символов

Тело запроса​

Схема: TemplateRenderRequest.

ПолеТипОбязательноОписание
draft_revisioninteger | nullнетот 1
template_versioninteger | nullнетот 1
variablesobject<string, any>нет

Ответ​

Поле data — TemplatePreviewResponse.

Коды ответа​

КодКогдаЗаголовки
200Успешный ответMailInfra-Notice, X-Request-ID
429Превышен лимит управления шаблонами: 120 запросов в минуту на API-ключ.MailInfra-Notice, Retry-After, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

POST /templates/{slug}/publish​

Publish a reviewed revision through the ordinary checks and warning acceptance.

Args: slug: Project-local slug. payload: Revision, comment, and optional reviewed warning fingerprint. ctx: Authenticated full-access key whose creator is a publisher. db: Request session.

Returns: Template metadata pointing to a new immutable publication.

Параметры​

ПараметрГдеТипОбязательноОписание
slugпутьstringдадо 100 символов

Тело запроса​

Схема: TemplatePublish.

ПолеТипОбязательноОписание
accept_warningsbooleanнетпо умолчанию false
checks_fingerprintstring | nullнет
commentstringнетдо 2 000 символов, по умолчанию ""
draft_revisionintegerдаот 1

Ответ​

Поле data — TemplatePublic.

Коды ответа​

КодКогдаЗаголовки
200Успешный ответMailInfra-Notice, X-Request-ID
429Превышен лимит управления шаблонами: 120 запросов в минуту на API-ключ.MailInfra-Notice, Retry-After, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

GET /templates/{slug}/versions​

Read a bounded page of immutable publications.

Args: slug: Project-local slug. ctx: Authenticated key context. db: Request session. before: Exclusive version-number cursor.

Returns: Up to fifty published source snapshots and a continuation cursor.

Параметры​

ПараметрГдеТипОбязательноОписание
slugпутьstringдадо 100 символов
beforequeryinteger | nullнетот 1

Ответ​

Поле data — TemplateVersionPage.

Коды ответа​

КодКогдаЗаголовки
200Успешный ответMailInfra-Notice, X-Request-ID
429Превышен лимит управления шаблонами: 120 запросов в минуту на API-ключ.MailInfra-Notice, Retry-After, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

GET /templates/{slug}/versions/{number}​

Read one publication belonging to the key's scoped template.

Args: slug: Project-local slug. number: Published version number. ctx: Authenticated key context. db: Request session.

Returns: Immutable source, data contract, dependencies, and renderer version.

Параметры​

ПараметрГдеТипОбязательноОписание
slugпутьstringдадо 100 символов
numberпутьintegerдаот 1

Ответ​

Поле data — TemplateVersionPublic.

Коды ответа​

КодКогдаЗаголовки
200Успешный ответMailInfra-Notice, X-Request-ID
429Превышен лимит управления шаблонами: 120 запросов в минуту на API-ключ.MailInfra-Notice, Retry-After, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

POST /templates/{slug}/versions/{number}/restore​

Restore an immutable publication into a new draft, retaining block restrictions.

Args: slug: Project-local slug. number: Historical publication number. payload: Expected current draft revision. ctx: Authenticated key context. db: Request session.

Returns: A new draft; the current sending publication remains unchanged.

Параметры​

ПараметрГдеТипОбязательноОписание
slugпутьstringдадо 100 символов
numberпутьintegerдаот 1

Тело запроса​

Схема: TemplateRestore.

ПолеТипОбязательноОписание
draft_revisionintegerдаот 1

Ответ​

Поле data — TemplatePublic.

Коды ответа​

КодКогдаЗаголовки
200Успешный ответMailInfra-Notice, X-Request-ID
429Превышен лимит управления шаблонами: 120 запросов в минуту на API-ключ.MailInfra-Notice, Retry-After, X-Request-ID
прочиеОшибка. Единый конверт: error.code, error.message, error.details, request_idMailInfra-Notice, X-Request-ID

Схемы​

BatchEmailSendRequest​

ПолеТипОбязательноОписание
attachmentsarray<EmailAttachmentInput>нетдо 10 элементов
bccarray<string (email)>нетСкрытая копия — не больше одного адреса.. до 1 элементов
ccarray<string (email)>нетКопия — не больше одного адреса.. до 1 элементов
fromstring (email) | nullнет
from_namestring | nullнетдо 200 символов
headersobject<string, string>нет
htmlstring | nullнетдо 26 214 400 символов
idempotency_keystring | nullнетStable item identity across regrouped batches and single sends. Overrides the request key for this item.. не пустая строка, до 255 символов
metadataobject<string, string>нетВаши пары «ключ — значение» (номер заказа, id пользователя): вернутся в GET /v1/emails и в каждом вебхуке письма. До 20 ключей, значения — строки до 500 символов.
reply_toarray<string (email)>нетдо 10 элементов
send_atstring (ISO-8601) | nullнетОтложенная отправка: ISO 8601 с часовым поясом, не дальше 7 дней вперёд. Письмо получит статус SCHEDULED; до отправки его можно отменить или перенести. Время в прошлом — отправить сразу.
subjectstring | nullнетдо 998 символов
tagsarray<string>нетдо 10 элементов
templatestring | nullнетдо 100 символов
template_versioninteger | nullнетот 1
textstring | nullнетдо 26 214 400 символов
toarray<string (email)>даПолучатель письма — ровно один адрес.. не пустой список, до 1 элементов
ttlinteger | nullнетСрок жизни письма в секундах (от минуты до суток), отсчёт от send_at или от приёма. Не дошедшее за это время письмо не отправляется и не повторяется: статус FAILED с причиной expired или отказ с категорией delivery-expired. Для кодов входа и других писем, которые поздно уже не нужны.. от 60, до 86400
variablesobject<string, any>нет

BatchSendError​

ПолеТипОбязательноОписание
codestringда
detailsobject<string, any>нет
messagestringда
status_codeintegerда

BatchSendRequest​

ПолеТипОбязательноОписание
emailsarray<BatchEmailSendRequest>дане пустой список, до 100 элементов

BatchSendResponseData​

ПолеТипОбязательноОписание
accepted_countintegerда
failed_countintegerда
resultsarray<BatchSendResult>да

BatchSendResult​

ПолеТипОбязательноОписание
errorBatchSendError | nullнет
idstring (uuid) | nullнет
indexintegerда
skipEmailSendSkip | nullнет
skipped_recipientsarray<object<string, string>>нет
statusEmailStatus | string | nullнет

BounceCategory​

Нормализованная причина bounce — для UI/Debug Explorer.

Отдельно от BounceType (hard/soft): категория даёт человекочитаемую причину, вычисляется классификатором по enhanced-коду/тексту диагностики. См.

Допустимые значения:

  • invalid-recipient
  • mailbox-full
  • message-too-large
  • content-spam-block
  • policy-rejection
  • reputation-blocklist
  • greylisting
  • dns-mx-failure
  • connection-error
  • rate-limited
  • auth-failure
  • delivery-expired
  • unknown

BounceType​

Допустимые значения:

  • hard
  • soft

ButtonAppearance-Input​

Shared button defaults with literal colors and bounded dimensions.

Attributes: background: Fill color of HTML and Outlook buttons. color: Label color. radius: Corner radius in even pixels. border_width: Outline thickness; zero disables the outline. border_color: Outline color.

ПолеТипОбязательноОписание
backgroundstringнетпо умолчанию "#1F1F1E"
border_colorstringнетпо умолчанию "#1F1F1E"
border_widthintegerнетот 0, до 8, по умолчанию 0
colorstringнетпо умолчанию "#FFFFFF"
radiusintegerнетот 0, до 32, по умолчанию 8

ButtonBlock-Input​

ПолеТипОбязательноОписание
auto_widthbooleanнетпо умолчанию false
backgroundstringнетпо умолчанию "#1F1F1E"
border_colorstringнетпо умолчанию "#1F1F1E"
border_widthintegerнетот 0, до 8, по умолчанию 0
colorstringнетпо умолчанию "#FFFFFF"
conditionCondition-Input | nullнет
darkOverrides-Input | nullнет
edit_modestringнетпо умолчанию "all"
full_widthbooleanнетпо умолчанию false
idstringда
labelarray<any>дадо 100 элементов
librarySavedBlockReference-Input | nullнет
mobileOverrides-Input | nullнет
radiusintegerнетот 0, до 32, по умолчанию 8
repeatRepeat-Input | nullнет
styleStyle-Inputнет
trackbooleanнетпо умолчанию true
typestringда
urlarray<any>дадо 100 элементов
visibilitystringнетпо умолчанию "all"

Column-Input​

ПолеТипОбязательноОписание
blocksarray<any>нетдо 200 элементов
conditionCondition-Input | nullнет
darkOverrides-Input | nullнет
idstringда
mobileOverrides-Input | nullнет
repeatRepeat-Input | nullнет
styleStyle-Inputнет
vertical_alignstringнетпо умолчанию "top"
visibilitystringнетпо умолчанию "all"

Condition-Input​

ПолеТипОбязательноОписание
operatorstringнетпо умолчанию "truthy"
pathstringда
valuestring | integer | number | boolean | array<string | integer | number | boolean> | nullнет

ContainerBorder-Input​

Literal outline shared by layout containers and leaf block wrappers.

Attributes: width: Outline thickness on each side; zero explicitly disables it. color: Literal RGB outline color. style: Portable CSS line style.

ПолеТипОбязательноОписание
colorstringнетпо умолчанию "#E8E2D2"
stylestringнетпо умолчанию "solid"
widthintegerнетот 0, до 8, по умолчанию 1

DarkTheme-Input​

Letter-level colors for clients that honour prefers-color-scheme: dark.

Block colors are changed separately with each node's dark overrides.

Attributes: background: Page around the letter. content_background: Letter column behind the sections. color: Base text color inherited by blocks without their own color. heading_color: H1-H3 color in dark mode; a block's own dark color still wins.

ПолеТипОбязательноОписание
backgroundstring | nullнет
colorstring | nullнет
content_backgroundstring | nullнет
heading_colorstring | nullнет

DividerBlock-Input​

ПолеТипОбязательноОписание
colorstringнетпо умолчанию "#E8E2D2"
conditionCondition-Input | nullнет
darkOverrides-Input | nullнет
edit_modestringнетпо умолчанию "all"
idstringда
librarySavedBlockReference-Input | nullнет
mobileOverrides-Input | nullнет
repeatRepeat-Input | nullнет
styleStyle-Inputнет
thicknessintegerнетот 2, до 8, по умолчанию 2
typestringда
visibilitystringнетпо умолчанию "all"

DkimSigningStatus​

Достоверность DKIM-подписи письма.

EXPECTED — на нашей стороне известно, что домен верифицирован и ключ для него существует, поэтому Haraka должна была подписать письмо. Это не подтверждение факта подписи — Haraka сегодня не сообщает результат подписания обратно. CONFIRMED/FAILED зарезервированы под будущий callback от Haraka (fast-follow), значения уже есть, миграция не нужна.

Допустимые значения:

  • expected
  • confirmed
  • failed
  • not_signed

EmailAttachmentInput​

Вложение в исходящем письме.

content_base64 — содержимое файла в base64.

ПолеТипОбязательноОписание
content_base64stringдадо 14 348 938 символов
content_idstring | nullнетContent-ID inline-картинки: в HTML на неё ссылаются как cid:<content_id>. Такое вложение встраивается в письмо, а не прикладывается файлом.. до 257 символов
content_typestringнетдо 255 символов, по умолчанию "application/octet-stream"
filenamestringдане пустая строка, до 255 символов

EmailDetail​

ПолеТипОбязательноОписание
bcc_emailsarray<string> | nullда
bounce_categoryBounceCategory | nullнет
bounce_typeBounceType | nullнет
cc_emailsarray<string> | nullда
created_atstring (ISO-8601)да
delivered_atstring (ISO-8601) | nullда
dkim_alignedboolean | nullнет
dkim_dstring | nullнет
dkim_selectorstring | nullнет
dkim_signing_statusDkimSigningStatus | nullнет
dmarc_alignedboolean | nullнет
expires_atstring (ISO-8601) | nullнет
failed_atstring (ISO-8601) | nullда
final_smtp_codeinteger | nullнет
final_smtp_enhancedstring | nullнет
final_smtp_textstring | nullнет
from_emailstringда
from_namestring | nullда
headersobject<string, string>да
html_bodystring | nullда
idstring (uuid)да
message_idstring | nullнет
metadataobject<string, string>нет
next_attempt_atstring (ISO-8601) | nullнет
project_idstring (uuid)да
reply_toarray<string> | nullда
scheduled_atstring (ISO-8601) | nullнет
sent_atstring (ISO-8601) | nullда
sourceEmailSourceнетпо умолчанию "API"
spf_alignedboolean | nullнет
spf_authorized_ipboolean | nullнет
spf_domainstring | nullнет
statusEmailStatusда
subjectstringда
suppression_reasonSuppressionReason | nullнет
tagsarray<string>да
template_version_idstring (uuid) | nullнет
text_bodystring | nullда
throttle_deadline_atstring (ISO-8601) | nullнет
throttle_reasonstring | nullнет
throttle_started_atstring (ISO-8601) | nullнет
to_emailsarray<string>да

EmailEventPublic​

ПолеТипОбязательноОписание
dataobject<string, any>да
idstring (uuid)да
ip_addressstring | nullнет
timestampstring (ISO-8601)да
typeEmailEventTypeда
user_agentstring | nullнет

EmailEventType​

Допустимые значения:

  • scheduled
  • queued
  • sending
  • sent
  • delivered
  • smtp_connected
  • opened
  • clicked
  • bounced
  • complained
  • failed
  • simulated
  • deferred
  • canceled

EmailListItem​

Сокращённая репрезентация для списка.

ПолеТипОбязательноОписание
bounce_categoryBounceCategory | nullнет
bounce_typeBounceType | nullнет
created_atstring (ISO-8601)да
delivered_atstring (ISO-8601) | nullда
dkim_alignedboolean | nullнет
dkim_dstring | nullнет
dkim_selectorstring | nullнет
dkim_signing_statusDkimSigningStatus | nullнет
dmarc_alignedboolean | nullнет
expires_atstring (ISO-8601) | nullнет
final_smtp_codeinteger | nullнет
final_smtp_enhancedstring | nullнет
final_smtp_textstring | nullнет
from_emailstringда
idstring (uuid)да
message_idstring | nullнет
metadataobject<string, string>нет
next_attempt_atstring (ISO-8601) | nullнет
project_idstring (uuid)да
scheduled_atstring (ISO-8601) | nullнет
sent_atstring (ISO-8601) | nullда
sourceEmailSourceнетпо умолчанию "API"
spf_alignedboolean | nullнет
spf_authorized_ipboolean | nullнет
spf_domainstring | nullнет
statusEmailStatusда
subjectstringда
suppression_reasonSuppressionReason | nullнет
tagsarray<string>да
throttle_deadline_atstring (ISO-8601) | nullнет
throttle_reasonstring | nullнет
throttle_started_atstring (ISO-8601) | nullнет
to_emailsarray<string>да

EmailListResponse​

GET /v1/emails: страница писем проекта, новые сначала.

ПолеТипОбязательноОписание
dataarray<EmailListItem>да
has_morebooleanдаЕсть ли ещё письма после этой страницы.
next_cursorstring | nullнетПередайте в параметр cursor, чтобы получить следующую страницу.

EmailRescheduleRequest​

PATCH /v1/emails/{id}: перенос запланированного письма.

ПолеТипОбязательноОписание
send_atstring (ISO-8601)даНовое время отправки с часовым поясом, не дальше 7 дней от приёма письма. Время в прошлом — отправить сейчас.

EmailScheduleData​

Ответ отмены и переноса: только состояние планирования, без тела письма.

ПолеТипОбязательноОписание
idstring (uuid)да
scheduled_atstring (ISO-8601) | nullда
statusEmailStatusда

EmailSendRequest​

POST /v1/emails.

ПолеТипОбязательноОписание
attachmentsarray<EmailAttachmentInput>нетдо 10 элементов
bccarray<string (email)>нетСкрытая копия — не больше одного адреса.. до 1 элементов
ccarray<string (email)>нетКопия — не больше одного адреса.. до 1 элементов
fromstring (email) | nullнет
from_namestring | nullнетдо 200 символов
headersobject<string, string>нет
htmlstring | nullнетдо 26 214 400 символов
metadataobject<string, string>нетВаши пары «ключ — значение» (номер заказа, id пользователя): вернутся в GET /v1/emails и в каждом вебхуке письма. До 20 ключей, значения — строки до 500 символов.
reply_toarray<string (email)>нетдо 10 элементов
send_atstring (ISO-8601) | nullнетОтложенная отправка: ISO 8601 с часовым поясом, не дальше 7 дней вперёд. Письмо получит статус SCHEDULED; до отправки его можно отменить или перенести. Время в прошлом — отправить сразу.
subjectstring | nullнетдо 998 символов
tagsarray<string>нетдо 10 элементов
templatestring | nullнетдо 100 символов
template_versioninteger | nullнетот 1
textstring | nullнетдо 26 214 400 символов
toarray<string (email)>даПолучатель письма — ровно один адрес.. не пустой список, до 1 элементов
ttlinteger | nullнетСрок жизни письма в секундах (от минуты до суток), отсчёт от send_at или от приёма. Не дошедшее за это время письмо не отправляется и не повторяется: статус FAILED с причиной expired или отказ с категорией delivery-expired. Для кодов входа и других писем, которые поздно уже не нужны.. от 60, до 86400
variablesobject<string, any>нет

EmailSendResponseData​

ПолеТипОбязательноОписание
idstring (uuid) | nullдаИдентификатор письма; null, если отправка пропущена (status SKIPPED).
skipEmailSendSkip | nullнетПричина пропуска; только при status SKIPPED.
skipped_recipientsarray<object<string, string>>нет
statusEmailStatus | stringдаQUEUED, SCHEDULED или SIMULATED. SKIPPED — письмо не создано по политике шаблона (пустой массив с on_empty=skip_send), квота не расходуется.

EmailSendSkip​

Why a template send created no email.

ПолеТипОбязательноОписание
reasonstringдаempty_array — пустой массив с политикой on_empty=skip_send.
variablestringдаПуть массива, например order.items.

EmailSource​

Транспорт, через который письмо попало в пайплайн отправки.

Допустимые значения:

  • API
  • SMTP
  • CAMPAIGN

EmailStatus​

Допустимые значения:

  • SCHEDULED
  • QUEUED
  • SENDING
  • SENT
  • DELIVERED
  • BOUNCED
  • COMPLAINED
  • FAILED
  • SIMULATED
  • CANCELED

ErrorDetails​

ПолеТипОбязательноОписание
codestringда
detailsobject<string, any> | nullнет
messagestringда

ErrorResponse​

Единый конверт ошибки.

Ровно эта форма отдаётся всеми обработчиками исключений — доменными (MailInfraError), валидационными и fallback'ом на непойманное исключение. Схема подключена к OpenAPI через ERROR_RESPONSES, чтобы сгенерированные клиенты знали структуру ошибки, а не только её код.

ПолеТипОбязательноОписание
errorErrorDetailsда
request_idstring | nullнет

HeadingAppearance-Input​

Document-level typography used unless a block overrides it.

Attributes: h1_size: Even H1 font size. h2_size: Even H2 font size. h3_size: Even H3 font size. color: Optional heading color; otherwise the surrounding color is inherited. weight: Default heading font weight. line_height: Default heading line-height multiplier.

ПолеТипОбязательноОписание
colorstring | nullнет
h1_sizeintegerнетот 10, до 48, по умолчанию 32
h2_sizeintegerнетот 10, до 48, по умолчанию 24
h3_sizeintegerнетот 10, до 48, по умолчанию 20
line_heightnumberнетот 1, до 3, по умолчанию 1.25
weightintegerнетпо умолчанию 700

HeadingAttrs-Input​

ПолеТипОбязательноОписание
levelintegerдаот 1, до 3

HtmlBlock-Input​

ПолеТипОбязательноОписание
conditionCondition-Input | nullнет
darkOverrides-Input | nullнет
edit_modestringнетпо умолчанию "all"
idstringда
librarySavedBlockReference-Input | nullнет
mobileOverrides-Input | nullнет
plain_sourcestring | nullнетдо 50 000 символов
plain_textarray<any>нетдо 100 элементов
repeatRepeat-Input | nullнет
sourcestringдадо 50 000 символов
styleStyle-Inputнет
typestringда
visibilitystringнетпо умолчанию "all"

ImageBlock-Input​

ПолеТипОбязательноОписание
altarray<any>нетдо 100 элементов
conditionCondition-Input | nullнет
darkOverrides-Input | nullнет
dark_srcarray<any> | nullнет
decorativebooleanнетпо умолчанию false
edit_modestringнетпо умолчанию "all"
idstringда
librarySavedBlockReference-Input | nullнет
mobileOverrides-Input | nullнет
radiusintegerнетот 0, до 32, по умолчанию 0
repeatRepeat-Input | nullнет
srcarray<any>дадо 100 элементов
styleStyle-Inputнет
trackbooleanнетпо умолчанию true
typestringда
urlarray<any> | nullнет
visibilitystringнетпо умолчанию "all"
widthintegerнетот 2, до 960, по умолчанию 600

Insets-Input​

ПолеТипОбязательноОписание
bottomintegerнетот 0, до 128, по умолчанию 12
leftintegerнетот 0, до 128, по умолчанию 16
rightintegerнетот 0, до 128, по умолчанию 16
topintegerнетот 0, до 128, по умолчанию 12

JsonValue​

Объект без фиксированных полей.

ListAttrs-Input​

ПолеТипОбязательноОписание
startintegerнетот 1, до 1000, по умолчанию 1

MarkAttrs-Input​

ПолеТипОбязательноОписание
colorstring | nullнет
hrefarray<any> | nullнет
trackbooleanнетпо умолчанию true

OrderColumn-Input​

ПолеТипОбязательноОписание
alignstring | nullнет
formatstring | nullнет
labelarray<any>дадо 100 элементов
pathstringда

OrderItemsBlock-Input​

ПолеТипОбязательноОписание
appearanceTableAppearance-Input | nullнет
columnsarray<OrderColumn-Input>дане пустой список, до 12 элементов
conditionCondition-Input | nullнет
darkOverrides-Input | nullнет
edit_modestringнетпо умолчанию "all"
emptyRichDocument-Input | nullнет
idstringда
itemstringнетпо умолчанию "item"
librarySavedBlockReference-Input | nullнет
limitintegerнетот 1, до 1000, по умолчанию 100
mobileOverrides-Input | nullнет
pathstringда
repeatRepeat-Input | nullнет
styleStyle-Inputнет
totalarray<any>нетдо 100 элементов
typestringда
visibilitystringнетпо умолчанию "all"
zebrabooleanнетпо умолчанию false

Overrides-Input​

ПолеТипОбязательноОписание
alignstring | nullнет
backgroundstring | nullнет
border_colorstring | nullнет
colorstring | nullнет
letter_spacingnumber | nullнетот -2, до 20
paddingInsets-Input | nullнет
sizeinteger | nullнетот 10, до 48
text_transformstring | nullнет

Repeat-Input​

ПолеТипОбязательноОписание
emptyRichDocument-Input | nullнет
itemstringнетпо умолчанию "item"
limitintegerнетот 1, до 1000, по умолчанию 100
pathstringда

RichDocument-Input​

ПолеТипОбязательноОписание
contentarray<RichNode-Input>нетдо 100 элементов
typestringнетпо умолчанию "doc"

RichMark-Input​

ПолеТипОбязательноОписание
attrsMarkAttrs-Input | nullнет
typestringда

RichNode-Input​

ПолеТипОбязательноОписание
attrsVariableAttrs-Input | HeadingAttrs-Input | ListAttrs-Input | nullнет
contentarray<RichNode-Input>нетдо 100 элементов
marksarray<RichMark-Input>нетдо 6 элементов
textstring | nullнетдо 10 000 символов
typestringда

Row-Input​

One level of columns with desktop proportions and mobile stacking.

Attributes: columns: Ordered column nodes. layout: Integer content percentages adding to 100, or automatic equality. stack: Whether mobile clients stack the columns vertically. reverse_mobile: Reverse visual stacking while retaining document evaluation order. gap: Even horizontal gap in pixels, excluded from column backgrounds.

ПолеТипОбязательноОписание
columnsarray<Column-Input>дане пустой список, до 8 элементов
conditionCondition-Input | nullнет
darkOverrides-Input | nullнет
gapintegerнетот 0, до 64, по умолчанию 0
idstringда
layoutarray<integer>нетдо 8 элементов
mobileOverrides-Input | nullнет
repeatRepeat-Input | nullнет
reverse_mobilebooleanнетпо умолчанию false
stackbooleanнетпо умолчанию true
styleStyle-Inputнет
visibilitystringнетпо умолчанию "all"

SavedBlockReference-Input​

A source revision embedded in the document rather than resolved at send time.

ПолеТипОбязательноОписание
block_idstringда
revisionintegerдаот 1, до 2147483647

Section-Input​

ПолеТипОбязательноОписание
background_imageSectionBackground-Input | nullнет
conditionCondition-Input | nullнет
darkOverrides-Input | nullнет
idstringда
mobileOverrides-Input | nullнет
repeatRepeat-Input | nullнет
rowsarray<Row-Input>дане пустой список, до 50 элементов
styleStyle-Inputнет
visibilitystringнетпо умолчанию "all"

SectionBackground-Input​

Image background with a solid fallback from the section's ordinary style.

ПолеТипОбязательноОписание
modestringнетпо умолчанию "cover"
srcarray<any>дане пустой список, до 100 элементов

SocialBlock-Input​

ПолеТипОбязательноОписание
conditionCondition-Input | nullнет
darkOverrides-Input | nullнет
edit_modestringнетпо умолчанию "all"
icon_sizeintegerнетот 16, до 64, по умолчанию 32
idstringда
librarySavedBlockReference-Input | nullнет
linksarray<SocialLink-Input>дадо 8 элементов
mobileOverrides-Input | nullнет
repeatRepeat-Input | nullнет
styleStyle-Inputнет
typestringда
visibilitystringнетпо умолчанию "all"
ПолеТипОбязательноОписание
icon_srcarray<any> | nullнет
labelarray<any>дадо 100 элементов
trackbooleanнетпо умолчанию true
urlarray<any>дадо 100 элементов

SpacerBlock-Input​

Vertical gap with an optional mobile-only height.

Attributes: type: Spacer discriminator. height: Even desktop height in pixels. mobile_height: Even mobile height; zero removes the gap and null inherits.

ПолеТипОбязательноОписание
conditionCondition-Input | nullнет
darkOverrides-Input | nullнет
edit_modestringнетпо умолчанию "all"
heightintegerнетот 2, до 128, по умолчанию 24
idstringда
librarySavedBlockReference-Input | nullнет
mobileOverrides-Input | nullнет
mobile_heightinteger | nullнетот 0, до 128
repeatRepeat-Input | nullнет
styleStyle-Inputнет
typestringда
visibilitystringнетпо умолчанию "all"

StatusResponse​

ПолеТипОбязательноОписание
statusstringда

Style-Input​

ПолеТипОбязательноОписание
alignstringнетпо умолчанию "left"
backgroundstring | nullнет
borderContainerBorder-Input | nullнет
colorstring | nullнет
fontstring | nullнет
letter_spacingnumber | nullнетот -2, до 20
line_heightnumberнетот 1, до 3, по умолчанию 1.6
paddingInsets-Inputнет
radiusinteger | nullнетот 0, до 64
sizeintegerнетот 10, до 48, по умолчанию 16
text_transformstring | nullнет
weightintegerнетпо умолчанию 400

SuppressionReason​

Допустимые значения:

  • HARD_BOUNCE
  • COMPLAINT
  • UNSUBSCRIBE
  • MANUAL

TableAppearance-Input​

Presentation settings shared by ordinary and order-item tables.

Attributes: border_width: Cell outline thickness; zero removes cell borders. border_color: Cell outline color. header_background: Optional header-row fill. zebra_background: Alternating row fill when striping is enabled. cell_padding: Even cell padding in pixels.

ПолеТипОбязательноОписание
border_colorstringнетпо умолчанию "#E8E2D2"
border_widthintegerнетот 0, до 8, по умолчанию 1
cell_paddingintegerнетот 0, до 32, по умолчанию 6
header_backgroundstring | nullнет
zebra_backgroundstringнетпо умолчанию "#F4F1EA"

TableBlock-Input​

ПолеТипОбязательноОписание
appearanceTableAppearance-Input | nullнет
column_alignarray<string | null>нетдо 12 элементов
conditionCondition-Input | nullнет
darkOverrides-Input | nullнет
edit_modestringнетпо умолчанию "all"
headersarray<array<any>>нетдо 12 элементов
idstringда
librarySavedBlockReference-Input | nullнет
mobileOverrides-Input | nullнет
repeatRepeat-Input | nullнет
rowsarray<array<array<any>>>нетдо 100 элементов
styleStyle-Inputнет
typestringда
visibilitystringнетпо умолчанию "all"
zebrabooleanнетпо умолчанию true

TemplateCheckIssue​

ПолеТипОбязательноОписание
codestringда
datasetstring | nullнет
detailsobject<string, any>нет
fieldstring | nullнет
messagestringда
node_idstring | nullнет
severitystringнетпо умолчанию "error"
status_codeintegerнетпо умолчанию 422

TemplateChecks​

ПолеТипОбязательноОписание
can_publishbooleanда
datasetsarray<TemplateDatasetCheck>да
draft_revisionintegerда
fingerprintstringнетпо умолчанию ""
issuesarray<TemplateCheckIssue>да

TemplateCreate​

ПолеТипОбязательноОписание
deliveryTemplateDelivery | nullнет
documentTemplateDocument-Input | nullнет
editorstringнетпо умолчанию "code"
html_templatestring | nullнет
namestringдане пустая строка, до 200 символов
slugstringдане пустая строка, до 100 символов
subject_templatestringнетпо умолчанию ""
test_datasetsarray<TemplateTestDataset> | nullнет
text_templatestring | nullнет
variable_schemaobject<string, VariableDefinition-Input> | nullнет
variablesobject<string, any> | nullнет

TemplateDatasetCheck​

ПолеТипОбязательноОписание
html_bytesinteger | nullнет
namestringда
passedbooleanда
tracked_html_bytesinteger | nullнет

TemplateDelivery​

ПолеТипОбязательноОписание
from_emailstring (email) | nullнет
from_namestring | nullнетдо 200 символов
kindstringнетпо умолчанию "transactional"
reply_toarray<string (email)>нетдо 10 элементов

TemplateDocument-Input​

ПолеТипОбязательноОписание
dirstringнетпо умолчанию "ltr"
head_cssstringнетдо 16 384 символов, по умолчанию ""
langstringнетдо 35 символов, по умолчанию "ru"
preheaderarray<any>нетдо 100 элементов
sectionsarray<Section-Input>дане пустой список, до 50 элементов
subjectarray<any>дане пустой список, до 100 элементов
themeTheme-Inputнет
versionintegerнетпо умолчанию 2

TemplateDocument-Output​

Объект без фиксированных полей.

TemplatePage​

ПолеТипОбязательноОписание
itemsarray<TemplateSummary>да
next_cursorstring (uuid) | nullнет

TemplatePreviewResponse​

ПолеТипОбязательноОписание
htmlstring | nullда
preheaderstring | nullнет
subjectstringда
textstring | nullда

TemplatePublic​

ПолеТипОбязательноОписание
created_atstring (ISO-8601)да
deliveryTemplateDeliveryнет
dependenciesobject<string, any> | nullнет
dependencies_pinnedbooleanнетпо умолчанию false
documentTemplateDocument-Output | nullнет
draft_revisionintegerда
editorstringнетпо умолчанию "code"
html_templatestring | nullда
idstring (uuid)да
namestringда
project_idstring (uuid)да
published_revisioninteger | nullда
published_version_idstring (uuid) | nullда
published_version_numberintegerда
renderer_versionstringнетпо умолчанию "jinja-v1"
slugstringда
subject_templatestringда
test_datasetsarray<TemplateTestDatasetPublic>да
text_templatestring | nullда
updated_atstring (ISO-8601)да
variable_schemaobject<string, any> | nullда
variablesobject<string, any>да
versionintegerда

TemplatePublish​

ПолеТипОбязательноОписание
accept_warningsbooleanнетпо умолчанию false
checks_fingerprintstring | nullнет
commentstringнетдо 2 000 символов, по умолчанию ""
draft_revisionintegerдаот 1

TemplateRenderRequest​

ПолеТипОбязательноОписание
draft_revisioninteger | nullнетот 1
template_versioninteger | nullнетот 1
variablesobject<string, any>нет

TemplateRestore​

ПолеТипОбязательноОписание
draft_revisionintegerдаот 1

TemplateSummary​

ПолеТипОбязательноОписание
draft_revisionintegerда
editorstringда
idstring (uuid)да
namestringда
published_version_numberintegerда
slugstringда
updated_atstring (ISO-8601)да

TemplateTestDataset​

ПолеТипОбязательноОписание
namestringдане пустая строка, до 100 символов
variablesobject<string, JsonValue>нет

TemplateTestDatasetPublic​

ПолеТипОбязательноОписание
namestringда
variablesobject<string, any>да

TemplateUpdate​

ПолеТипОбязательноОписание
deliveryTemplateDelivery | nullнет
documentTemplateDocument-Input | nullнет
draft_revisionintegerдаот 1
editorstring | nullнет
html_templatestring | nullнет
namestring | nullнетне пустая строка, до 200 символов
refresh_dependenciesbooleanнетпо умолчанию false
subject_templatestring | nullнетне пустая строка
test_datasetsarray<TemplateTestDataset> | nullнет
text_templatestring | nullнет
variable_schemaobject<string, VariableDefinition-Input> | nullнет
variablesobject<string, any> | nullнет

TemplateVersionPage​

ПолеТипОбязательноОписание
itemsarray<TemplateVersionPublic>да
next_beforeinteger | nullнет

TemplateVersionPublic​

ПолеТипОбязательноОписание
author_idstring (uuid) | nullда
commentstringда
created_atstring (ISO-8601)да
deliveryTemplateDeliveryнет
dependenciesobject<string, any> | nullнет
documentTemplateDocument-Output | nullнет
draft_revisionintegerда
editorstringнетпо умолчанию "code"
html_templatestring | nullда
idstring (uuid)да
numberintegerда
renderer_versionstringда
subject_templatestringда
template_idstring (uuid)да
test_datasetsarray<TemplateTestDatasetPublic>да
text_templatestring | nullда
variable_schemaobject<string, any> | nullда
variablesobject<string, any>да

TextBlock-Input​

ПолеТипОбязательноОписание
conditionCondition-Input | nullнет
contentRichDocument-Inputда
darkOverrides-Input | nullнет
edit_modestringнетпо умолчанию "all"
idstringда
librarySavedBlockReference-Input | nullнет
mobileOverrides-Input | nullнет
repeatRepeat-Input | nullнет
styleStyle-Inputнет
typestringда
visibilitystringнетпо умолчанию "all"

TextPart-Input​

ПолеТипОбязательноОписание
textstringдадо 10 000 символов
typestringда

Theme-Input​

ПолеТипОбязательноОписание
backgroundstringнетпо умолчанию "#F4F1EA"
buttonButtonAppearance-Input | nullнет
colorstringнетпо умолчанию "#3F3D38"
color_schemestringнетпо умолчанию "light dark"
content_backgroundstringнетпо умолчанию "#FFFFFF"
darkDarkTheme-Input | nullнет
fontstringнетпо умолчанию "sans"
headingHeadingAppearance-Input | nullнет
heading_fontstringнетпо умолчанию "serif"
link_colorstringнетпо умолчанию "#1F1F1E"
pin_mailru_colorsbooleanнетпо умолчанию false
widthintegerнетот 320, до 960, по умолчанию 600

UnsubscribeBlock-Input​

Explicit recipient-specific opt-out link, always excluded from click tracking.

ПолеТипОбязательноОписание
conditionCondition-Input | nullнет
darkOverrides-Input | nullнет
edit_modestringнетпо умолчанию "all"
idstringда
labelarray<any>нетдо 100 элементов, по умолчанию [{"text":"Отписаться","type":"text"}]
librarySavedBlockReference-Input | nullнет
mobileOverrides-Input | nullнет
repeatRepeat-Input | nullнет
styleStyle-Inputнет
typestringда
urlarray<any>дане пустой список, до 100 элементов
visibilitystringнетпо умолчанию "all"

VariableAttrs-Input​

ПолеТипОбязательноОписание
fallbackstring | nullнетдо 2 000 символов
formatstring | nullнет
format_argsarray<string>нетдо 3 элементов
pathstringда

VariableDefinition-Input​

ПолеТипОбязательноОписание
exampleJsonValueнет
fallbackJsonValueнет
itemsVariableDefinition-Input | nullнет
on_emptystringнетпо умолчанию "allow"
propertiesobject<string, VariableDefinition-Input>нет
requiredbooleanнетпо умолчанию false
typestringда

VariablePart-Input​

ПолеТипОбязательноОписание
attrsVariableAttrs-Inputда
typestringда