---
title: "Add base Email message"
method: POST
path: "/api/v1/messages/email"
tags: ["Messages"]
---

# Add base Email message

`POST /api/v1/messages/email`

The method is used for adding/updating the language version of a message identified by the internal ID (for multilingual messages).

## Request body

- BaseEmailMessage
  - `id` integer — Message ID.
  - `name` string, required — Message name.
  - `languageCode` string — Language code.
  - `tags` string[] — List of tags.
  - `subscriptionsKeys` string[] — Subscription categories keys, assigned to a message.
  - `languages` string[] — An array with the language codes for multilingual messages. Available for the GET method only.
  - `from` string, required — <b>Required parameter.</b><br> Sender name and email address, e.g. "from": "\"name\" &lt;info@test.com&gt;"
  - `subject` string, required — Message subject
  - `htmlText` string, required — Message HTML code
  - `rawHtml` string — Message HTML code without styles.
  - `ampHtml` string — Message AMP code
  - `css` string — Message styles
  - `updatedDate` string, date-time — Message updated date
  - `translations` EmailMessage[] — The array of the language versions for the current message. Available for the GET method only.
    - `id` integer — Message ID.
    - `name` string, required — Message name.
    - `languageCode` string — Language code.
    - `tags` string[] — List of tags.
    - `subscriptionsKeys` string[] — Subscription categories keys, assigned to a message.
    - `languages` string[] — An array with the language codes for multilingual messages. Available for the GET method only.
    - `from` string, required — <b>Required parameter.</b><br> Sender name and email address, e.g. "from": "\"name\" &lt;info@test.com&gt;"
    - `subject` string, required — Message subject
    - `htmlText` string, required — Message HTML code
    - `rawHtml` string — Message HTML code without styles.
    - `ampHtml` string — Message AMP code
    - `css` string — Message styles
    - `updatedDate` string, date-time — Message updated date
    - `template` boolean
  - `template` boolean — Set to true to create the message as a template. If false or absent, a general message is created.

## Response `200`

---

[API](https://skmtc.net/esputnik/apis/esputnik-com.md) · [All operations](https://skmtc.net/esputnik/apis/esputnik-com/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/esputnik/esputnik-com/versions/1c4afd7ba72a/schema)
