Send Transactional Email (Template ID)

Transactional email templates can also be created and stored using the transactional interface. After publishing these templates, the template ID can be referenced in the options field of the request body.

Using the interface to create transactional templates means they can be:

  • Drafted
  • Stored
  • Published
  • Reused

Endpoint

Method URL
POST https://api.everlytic.net/transactional/email/v1/mail

Request Body

{
  "options": {
    "template_id": "g789123d-8924-4811-b964-4d7255c6c54a",
    "group_name": "Rest API Using Template ID"
  },
  "headers": {
    "to": [
      {
        "email": “[email protected]",
        "name": "John Doe”
      }
    ]
  }
}

Example Request

curl --location 'https://api.everlytic.net/transactional/email/v1/mail' \
--header 'Content-Type: application/json' \
--data-raw '{
  "options": {
    "template_id": “g789123d-8924-4811-b964-4d7255c6c54a",
    "group_name": "Rest API Using Template ID"
  },
  "headers": {
    "to": [
      {
        "email": "[email protected]",
        "name": "John Doe”
      }
    ]
  }
}'

Example Response

Email was sent successfully [200 OK]

{
  "transactions": [
    {
      "id": “98761234-bf57-4157-9b3a-65781dc8c4d3"
    }
  ]
}