Create a template
POST /templates
/templatesSaves a new email template. Send the design either as HTML in content (a custom-HTML template, code_own) or as simple_json_code (a visual-editor template, be_editor, whose HTML is generated for you).
Personalize the content with the merge tags of the audience (list_audience_merge_tags). Email templates must include the unsubscribe link {{ link.campaign.unsuscribe }}; other useful tags are {{ link.list.update_profile }}, {{ text.list.suscriber.email }} and {{ text.list.company.name }}.
When to use: To store a design you wrote or generated so that campaigns and automations can use it. The result is referenced by its IRI (/templates/{uuid}).
When not to use: To copy a ready-made design use create_template_from_master or create_template_from_theme; to save a design made in a Beefree session use create_template_from_bee_session.
Side effects: A thumbnail image of the template is generated in the background.
Permissions: Requires the author role or higher, or the marketing.templates.write capability.
Value for the X-Auth-Token header parameter.
In: header
The new Template resource
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://api.easymailing.com/templates" \ -H "X-Auth-Token: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "title": "string", "content": "string", "simple_json_code": {} }'{ "id": 0, "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "title": "string", "type": "be_editor", "thumbnail": "http://example.com", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}