Skip to content

Send Email Template

POST
/v1/send/template

Sends an email using a predefined template.

This method is suitable for production usage and allows you to use templates for sending emails.

The request body for sending an email using a template.

This request body should be a JSON object containing the necessary fields to send an email using a template.

object
template_id
required

The unique identifier of the email template to use.

string
template123
to
required
Array<object>
object
name

The name of the recipient.

string
Jane Smith
email

The email address of the recipient.

string format: email
jane@smith.com
variables

Variables to be used in the email template. Variables avalaible from A to Z. You can define variables like variable_a_var, variable_b_var, etc.

These variables can be used in dynamic content like {{variable_a_var}}.

object
variable_a_var

Use on dynamic content like {{variable_a_var}}.

string
Variable A Value
attachment
Array<object>
object
name

The name of the file to be attached.

string
document.pdf
url

The URL of the file to be attached.

The file will be downloaded and attached to the email.

string format: url
https://www.buildquickbots.com/whatsapp/media/sample/pdf/sample01.pdf
attachment_buffer
Array<object>
object
name

The name of the file to be attached.

string
document.pdf
content

The base64 encoded content of the file to be attached.

This is useful for small files that can be sent directly in the request.

string format: byte
data:(mime type),base64,JVBERi0xLjQKJazc... (base64 content)

Email sent successfully.

object
status
boolean
true
message
string
Email sent successfully

Your key auth is not valid

object
status
boolean
error
boolean
true
message
string
Your key auth is not valid, please check with your administrator to get the new key
Example
{
"status": false,
"error": true,
"description": "Your key auth is not valid, please check with your administrator to get the new key"
}

Your account dont have credits availables for send

object
status
boolean
error
boolean
true
message
string
Your account dont have credits availables for send this, please contact your administrator
Example
{
"status": false,
"error": true,
"description": "Your account dont have credits availables for send this, please contact your administrator"
}

Missing required parameters

object
status
boolean
error
boolean
true
message
string
Missing params, please verify or contact to support
Example
{
"status": false,
"error": true,
"description": "Missing params, please verify or contact to support"
}

Useful for guiding users to view code examples in different developer languages.

developer@developer:~#
curl -X POST "https://api.example.com/v1/send/template" \
-H "Accept: application/json" \
-H "Connection: keep-alive" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-token>" \
-d '{"template_id":"template123","to":[{"name":"Jane Smith","email":"jane@smith.com"}],"variables":{"variable_a_var":"Variable A Value"},"attachment":[{"name":"document.pdf","url":"https://www.buildquickbots.com/whatsapp/media/sample/pdf/sample01.pdf"}],"attachment_buffer":[{"name":"document.pdf","content":"data:(mime type),base64,JVBERi0xLjQKJazc... (base64 content)"}]}'