Developer Docs

Table of contents

This API method allows you to send an email with dynamic content by referencing an email template (specifying template id). You can customize the content of the email with variables, and you also have the option to embed inline media files. 

To send email template, make a request to this URL: 

PUT (POST) https://api.wwt.world/api/email/send-template-emails

Request parameters 

Parameter Required Type Description 
to Yes array List of email addresses to send the email to. 
from Yes string The sender’s email address. 
template_id Yes integer ID of the email template to be used for the email’s content. 
subject Yes string Subject line of the email. 
template_content Yes object JSON object with key-value pairs for dynamic content in the email template. 
inlines No array List of inline media files to be embedded in the email. 
name No string The name of the inline media file. 
cid No string Content-ID for embedding the media file. 
contentType No string Type of the media file (e.g., image/jpeg). 
content No string Base64-encoded content of the media file. 

Request sample 

{ 

  "to": [ 

    "user@example.com" 

  ], 

  "from": "user@example.com", 

  "template_id": 1, 

  "subject": "string", 

  "template_content": { 

    "name": "John Doe", 

    "order": "#1234" 

  }, 

  "inlines": [ 

    { 

      "name": "string", 

      "cid": "string", 

      "contentType": "string", 

      "content": "string" 

    } 

  ] 

} 

Response parameters 

Parameter Type Description 
message_id string A unique identifier for the message sent. 

If the request is successful, you will receive a response: 

{ 

  "message_id": "string" 

}