Skip to main content
TemplatesVersion: v3New

Import an email template

POST/emails/locations/{locationId}/templates/import

Import a template from a provider URL

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your access token.

Scope:emails/templates.write
Auth methods:OAuthPrivate Integration
Token type:Sub-Account Token

Request​

Headers

Idempotency-Keystring

Unique key per intended write (max 255 chars). Retrying with the same key and body within 24 hours returns the first response instead of creating another resource. Reusing the key with a different body returns 422; a retry while the first request is still running returns 409.

Example:0f8fad5b-d9cb-469f-a165-70867728950e
Versionstringrequired

API Version

Available optionsv3
Example:v3

Path Parameters

locationIdstringrequired

Location ID

Example:ve9EPM428h8vShlRW1KT

Body

importProviderstringrequired

Import provider (URL-based providers only)

Available optionsmailchimpactive_campaign
Example:mailchimp
importUrlstringrequired

Public import URL

Example:https://templates.example.com/public/template-123
namestring

Template name

Example:Imported Template
parentFolderIdstring

Parent folder ID

Example:67f15c2ae99226d5bcccb8f0
userIdstring

ID of the user performing this action

Example:507f1f77bcf86cd799439011

Response

Success

idstringrequired

Template ID

Example:507f1f77bcf86cd799439011
namestringrequired

Template name

Example:Newsletter Template
editorTypestringrequired

Editor type. html = code editor (raw HTML string), text = plain-text email (string), builder = design (drag-and-drop) editor (JSON, see BuilderEditorContentPublicV2Dto). Merge fields are Handlebars: {{contact.first_name}}, a fallback is {{default contact.first_name "there"}}, a condition is {{#if contact.city}}...{{/if}}. Liquid filters such as {{contact.first_name | default: "there"}} are not supported and block the send.

Available optionshtmlbuildertext
Example:html
isPlainTextbooleanrequired

Whether template is plain text

Example:false
parentFolderIdstring

Parent folder ID

Example:67f15c2ae99226d5bcccb8f0
fromNamestring

Sender name

Example:John Doe
fromEmailstring

Sender email address

subjectLinestring

Email subject line

Example:Welcome to our newsletter
previewTextstring

Preview text

Example:Email preview text
previewUrlstring

Preview URL

Example:https://example.com/preview/template123
createdAtstring

Created timestamp

Example:2025-07-24T11:55:43.598Z
updatedAtstring

Updated timestamp

Example:2025-07-24T11:55:43.598Z
traceIdstring

Trace ID of request

Example:019e4ef5-a65e-4198-8cf9-8e93dca9bda4