Отправка шаблона письма
REST FULL API - EMAIL
Отправка шаблона письма
Этот метод API позволяет отправить письмо с динамическим содержимым, используя ссылку на шаблон письма (указав идентификатор шаблона). Вы можете настроить содержимое письма с помощью переменных, а также при необходимости встроить медиафайлы.
Чтобы отправить электронное письмо, выполните запрос по следующему URL:
PUT (POST) https://api.notificore.ru/email/send-template-emails
Параметры запроса:

Parameter

Required

Type

Description

to

Yes

array

List of email addresses to send the email to.

from

Yes

string

The sender's email address.

template_id

Yes

integer

ID of the email template to be used for the email's content.

subject

Yes

string

Subject line of the email.

template_content

Yes

object

JSON object with key-value pairs for dynamic content in the email template.

inlines

No

array

List of inline media files to be embedded in the email.

name

No

string

The name of the inline media file.

cid

No

string

Content-ID for embedding the media file.

contentType

No

string

Type of the media file (e.g., image/jpeg).

content

No

string

Base64-encoded content of the media file.

Пример запроса:
{
 "to": [
   "user@example.com"
 ],
 "from": "user@example.com",
 "template_id": 1,
 "subject": "string",
 "template_content": {
   "name": "John Doe",
   "order": "#1234"
 },
 "inlines": [
   {
     "name": "string",
     "cid": "string",
     "contentType": "string",
     "content": "string"
   }
 ]
}
Параметры запроса:

Parameter

Type

Description

message_id

string

A unique identifier for the message sent.

Если запрос выполнен успешно, вы получите ответ:
{
 "message_id": "string"
}