Skip to main content
POST/email-templates/

Create email template

You can create customized email templates.

AttributesTypeRequiredDescription
contentstringyesA content of your email template (HTML can be used inside).
descstringyesA description of your email template.
namestringyesAn email template name.

Request​

curl -X POST -H "Authorization: Token <your_64_char_api_key>"
-H "Accept: */*; version=2" -H "Content-Type: application/json" -d '{
"name":"Test template",
"content":"\<body>\<p>My test email template\</p>\</body>",
"desc":"This is email template created for test. Don'"'"'t send it to users."
}' "https://<your_app_subdomain>.user.com/api/public/email-templates/"

Response​

{
"id": 213,
"name": "Test template",
"desc": "This is email template created for test. Don't send it to users.",
"created_at": "2016-09-19T09:08:53.125485Z",
"updated_at": "2016-09-19T09:08:53.125518Z",
"content": "\<body>\<p>My test email template\</p>\</body>",
"subject": "Test template subject"
}