Messages

Add base Email message

The method is used for creating a base Email message. If the template parameter is set to true, the message is created as a template. If template = false or absent, a regular message is created and added to the general message list.

post/api/v1/messages/email

Request

Request body

idinteger

Message ID.

namestring required

Message name.

languageCodestring

Language code.

tagsstring[]

List of tags.

subscriptionsKeysstring[]

Subscription categories keys, assigned to a message.

languagesstring[]

An array with the language codes for multilingual messages. Available for the GET method only.

fromstring required

<b>Required parameter</b> for a regular message (template = false or absent).<br> Sender name and email address, e.g. "from": ""name" <info@test.com>".<br> If template = true, the parameter is optional: if your organization has email senders, the first one is assigned to the template; otherwise, the template is created without a sender.

subjectstring required

Message subject

htmlTextstring required

Message HTML code

rawHtmlstring

Message HTML code without styles.

ampHtmlstring

Message AMP code

cssstring

Message styles

updatedDatestring date-time

Message updated date

templateboolean

Set to true to create the message as a template. If false or absent, a general message is created.

Example request

{
  "from": "\"John Smith\" John.Smith@example.com",
  "subject": "Thanks for signing up",
  "translations": [
    {
      "from": "\"John Smith\" John.Smith@example.com",
      "subject": "Thanks for signing up"
    }
  ]
}

Response

idinteger

Changes

No recorded changes to this operation across all 2 revisions of this API.