# Create email template
You can create customized email templates.
POST
/email-templates/
Attributes | Type | Required | Description |
---|---|---|---|
content | string | yes | A content of your email template (HTML can be used inside). |
desc | string | yes | A description of your email template. |
name | string | yes | An email template name. |
# Request
- CURL
- JavaScript
- PHP
- Python
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"
}