Please note that this feature is available as a paid add-on only.

This method will create Transaction Email object, which will result in sending the transactional email to specified recipients.

Returns status code

201

Example Request Body

{
    "fromField": {
        "fromFieldId": "V"
    },
    "replyTo": {
        "fromFieldId": "V"
    },
    "subject": "Order Confirmation - Example Shop",
    "tag": {
        "tagId": "vBd5"
    },
    "content": {
        "plain": "Your order has been confirmed. Thank you for shopping with us!",
        "html": "<h1>Your order has been confirmed</h1><strong>Thank you for shopping with us!</strong>"
    },
    "recipients": {
        "to": {
            "email": "john.doe@example.com",
            "name": "John Doe",
            "validSince": "2018-05-02T09:30:43+0200"
        },
        "cc": [
            {
                "email": "john.doe@example.com",
                "name": "John Doe"
            }
        ],
        "bcc": [
            {
                "email": "john.doe@example.com",
                "name": "John Doe"
            }
        ]
    },
    "attachments": [
        {
            "fileName": "pixel.png",
            "mimeType": "image/png",
            "content": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mOUua1dDwAD4AGjnrXmUAAAAABJRU5ErkJggg=="
        }
    ]
}

Body params

Field nameField typeField description
fromField (required)objectFrom field email address of message
Field nameField typeField description
fromFieldIdstringFromFieldId from from-fields resources
replyToobjectReply-to email address of message
Field nameField typeField description
fromFieldIdstringFromFieldId from from-fields resources
subject (required)stringSubject of email, length: 1-512 bytes
tagobjectTag from tags resources
Field nameField typeField description
tagId (required)stringId of tag
content (required)objectMessage content length limit is 16 MiB. Total decoded message size with attachments cannot exceed 32 MiB.
Field nameField typeField description
plainstringPlain message
htmlstringHTML message
recipients (required)objectRecipients. Total number of recipients in To:, Cc: and Bcc: cannot exceed 8
Field nameField typeField description
toobjectTo: object
Field nameField typeField description
validSincestringWhen did this address appear in your system for the first time
email (required)stringEmail address
namestringRecipient's name. Length: 1-128
cccollectionsCc: addresses
bcccollectionsBcc: addresses
attachmentscollectionsThe collection of attachments. Total decoded message size with attachments cannot exceed 32 MiB

Example Response

{
    "transactionalEmailId": "uE5k"
}

Possible Errors