This API enables you to migrate your templates to Insider, and reduce time spent on recreating templates. To complete this migration, get started with the following requirements:
1. Download the HTML of the email template from your vendor. Make sure that the HTML is covering the full content.
2. Make sure to have an application to execute the operations (e.g. Postman, etc.).
3. Generate the Email Template API key, and save it for later use in the payload. You can generate it on Inone Settings > Integration > Generate API Key > Email Content and Templates.
4. Extract related premigration variables via Insider's API.
5. Migrate templates with the extracted variables via Insider's API.
This API allows you to migrate your promotional emails. Transactional email type is not supported in template migration.
Extract premigration variables
Before migrating your templates, you need to extract the premigration Dynamic Attributes variables.
Dynamic Attributes
The response for the request will include a list of all unique dynamic attributes found in the template.
Each attribute ID corresponds to an attribute name on your template. See the complete list of System Fields and Their IDs.
To migrate your template, you must replace the attribute name with the corresponding Insider attribute name. See Insider's Default Attributes.
To replace these attribute names with Insider attributes, you can use the attribute names in the {{my_attribute_name}} format. If you want to replace a custom attribute, the format should be {{c_subscription_expiry_date}}.
For example, the response for extracting variables returns dynamic attributes [“name”, “em”]. You should replace them with Insider's corresponding attributes when sending the request to migrate your template. In this case, they will be replaced with name and email respectively in the request as follows:
"dynamic_attributes": {"em": "email", "name": "name"}Endpoint and Headers
POST https://mail.useinsider.com/content/v1/template-migration/{vendorname}/extract-premigration-variables
Headers
| Header | Sample Value | Description |
|---|---|---|
| X-INS-AUTH-KEY | 1a2b3c4d5e6f | This Email Template key is required to authorize your request. Refer to API Authentication Tokens to generate your token. |
| Content-Type | application/json | This header specifies the media type of the resource. |
Body Parameters
Before sending your request, make sure you create it within the following criteria:
- Your template html should be in base64 format.
- Your template html should not contain any “view-in-browser” component, display conditions, email recommendations, coupon(s), or any other customized component.
| Parameter | Description | Data Type | Required |
|---|---|---|---|
| html | Your template HTML in base64 format | String | Yes |
Sample Request
Every request made to the request endpoint requires a request body formatted in JSON
The following is a sample request to extract the premigration variables.
curl --location --request POST 'https://mail.useinsider.com/content/v1/template-migration/{vendorname}/extract-premigration-variables' \
--header 'x-ins-auth-key: 1a2b3c4d5e6f' \
--header 'Content-Type: application/json' \
--data-raw '{
"html": "VGhpcyBpcyBhbiBleGFtcGxlIGh0bWwgY29udGVudA=="
}'The following is a sample response.
{
"dynamic_attributes": ["em", "name"]
}Migrate your template with extracted variables
To migrate your templates, you need to send them with the dynamic attributes if any.
Endpoint and Headers
POST https://mail.useinsider.com/content/v1/template-migration/{vendorname}/migrate
Headers
| Header | Sample Value | Description |
|---|---|---|
| X-INS-AUTH-KEY | 1a2b3c4d5e6f | This Email Template key is required to authorize your request. Refer to API Authentication Tokens to generate your token. |
| Content-Type | application/json | This header specifies the media type of the resource. |
Body Parameters
Before sending your request, make sure you create it within the following criteria:
- Your template html should be in base64 format.
- Your template html should not contain any “view-in-browser” component, display conditions, email recommendations, coupon(s), or any other customized component.
- Your dynamic attribute IDs should have a corresponding Insider attribute name as explained in "Dynamic Attributes" section.
| Parameter | Description | Data Type | Required |
|---|---|---|---|
| template_name | The name your template will have | String | Yes |
| html | Your template HTML in base64 format | String | Yes |
| dynamic_attributes | The extracted attributes along with their corresponding attribute names at Insider | Object | Yes |
Sample Request
The following is a sample request to migrate your template with dynamic attributes.
curl --location --request POST 'https://mail.useinsider.com/content/v1/template-migration/{vendorname}/migrate' \
--header 'x-ins-auth-key: 1a2b3c4d5e6f' \
--header 'Content-Type: application/json' \
--data-raw '{
"template_name": "My migrated template",
"html": "VGhpcyBpcyBhbiBleGFtcGxlIGh0bWwgY29udGVudA==",
"dynamic_attributes": {"name": "name", "em": "email"}
}'The request above migrates a template with the "My migrated template" name. The attribute name and em have Insider's corresponding attribute names as name and email.
If your request is successful, your migrated template will be listed in Email Design > Choose Template > Custom Templates. You can select your template, and use the Drag & Drop Editor to edit it.

Limitations
- All functions must be executed with a simple HTTPS POST request.
- The API Key should be provided as the authorization key on the request header. If the key is incorrect, the operation will not be executed.
- The rate limit is 60 requests per minute.
- Templates with "view-in-browser" component at the top are not supported for migration.
- Templates with display conditions are not supported for migration.
- Templates with email recommendation and coupon functionalities are not supported for migration.