Easymailing
Templates

Update a template

PUT /templates/{uuid}

PUT/templates/{uuid}

Changes the title and design of a template. A custom-HTML template (code_own) takes content; a visual-editor template (be_editor) takes simple_json_code.

When to use: To fix or redesign a template. Campaigns that use it and have not been sent yet (draft, ready or scheduled) get the new design; sent campaigns keep theirs.

When not to use: To change a visual-editor template from a Beefree session use create_template_from_bee_session with em_template_id. A template cannot change type: create a new one instead.

Side effects: Campaigns using the template that are still draft, ready or scheduled are refreshed with the new design. A new version is saved in the history of a visual-editor template. The thumbnail is regenerated in the background.

Permissions: Requires the author role or higher, or the marketing.templates.write capability.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Path Parameters

uuid*string

UUID of the template. Get it with list_templates.

Request Body

The updated 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

application/problem+json

curl -X PUT "https://api.easymailing.com/templates/5c0e8b17-3a94-4d62-b1f7-90a4c6e2d835" \  -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"}