Skip to content
Last updated

Using templates with Send API

Send API, Mailjet Transactional API, allow you to leverage the power of the template language.

The templates and template language can be used in multiple ways with Send API:

posting on /send resource with message content as TextPart or HtmlPart saving the content of the message with the /template resource and using it on demand with the TemplateID property of Send API. using templates you created through the Passport User Interface.

Send a message containing template language

You can simply pass in the payload of the call to Send API a text version (TextPart property) and/or an Html version (HtmlPart property) containing template language.

# Create : Create a sub-account with a new Public and Secret API Key. API Keys are used as credentials to access the API and SMTP server.
curl -s \
	-X POST \
	--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
	https://api.mailjet.com/v3/REST/apikey \
	-H 'Content-Type: application/json' \
	-d '{
		"ACL":,
		"IsActive":"true",
		"Name":"API Key 1"
	}'