POST /smtp/email

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
htmlContent String No

HTML body of the message ( Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed )

textContent String No

Plain Text body of the message ( Ignored if 'templateId' is passed )

replyTo Object No

Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {"email":"ann6533@example.com", "name":"Ann"}.

replyTo.email String Yes

Email address in reply to

replyTo.name String No

Name in reply to. Maximum allowed characters are 70.

sender Object No

Mandatory if 'templateId' is not passed. Pass name (optional) and email of sender from which emails will be sent. For example, {"name":"Mary from MyShop", "email":"no-reply@myshop.com"}

sender.name String No

Name of the sender from which the emails will be sent. Maximum allowed characters are 70.

sender.email String Yes

Email of the sender from which the emails will be sent

subject String No

Subject of the message. Mandatory if 'templateId' is not passed

attachment[] Array No

Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, [{"url":"https://attachment.domain.com/myAttachmentFromUrl.jpg", "name":"myAttachmentFromUrl.jpg"}, {"content":"base64 example content", "name":"myAttachmentFromBase64.jpg"}]. Allowed extensions for attachment file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg and wmv ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored )

attachment[].name String No

Required if content is passed. Name of the attachment

attachment[].url String No

Absolute url of the attachment (no local file).

attachment[].content String No

Base64 encoded chunk data of the attachment generated on the fly

to[] Array Yes

List of email addresses and names (optional) of the recipients. For example, [{"name":"Jimmy", "email":"jimmy98@example.com"}, {"name":"Joe", "email":"joe@example.com"}]

to[].email String Yes

Email address of the recipient

to[].name String No

Name of the recipient. Maximum allowed characters are 70.

params Object No

Pass the set of attributes to customize the template. For example, {"FNAME":"Joe", "LNAME":"Doe"}. It's considered only if template is in New Template Language format.

templateId Integer No

Id of the template

cc[] Array No

List of email addresses and names (optional) of the recipients in cc

cc[].email String Yes

Email address of the recipient in cc

cc[].name String No

Name of the recipient in cc. Maximum allowed characters are 70.

bcc[] Array No

List of email addresses and names (optional) of the recipients in bcc

bcc[].email String Yes

Email address of the recipient in bcc

bcc[].name String No

Name of the recipient in bcc. Maximum allowed characters are 70.

tags[] Array No

Tag your emails to find them more easily

headers Object No

Pass the set of custom headers (not the standard headers) that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in This-Case-Only (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, {"sender.ip":"1.2.3.4", "X-Mailin-custom":"some_custom_header", "idempotencyKey":"abc-123"}.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.