Templates
The Template object is used to represent a template for a marketing asset in the remote system.
The Template object
Properties

nameString
Optional
The template's name.

typeEnum
Optional
The template's type. Possible values include: EMAIL, MESSAGE, or - in cases where there is no clear mapping - the original value passed through.

contentsString
Optional
The template contents.

ownerString
Optional
The template's owner.

remote_created_atString
Optional
When the template was created in the remote system.

remote_updated_atString
Optional
When the template was last updated in the remote system.

remote_was_deletedBoolean
Required
Indicates whether or not this object has been deleted by third party webhooks.

idString
Required

remote_idString
Optional
The third-party API ID of the matching object.

field_mappingsObject
Optional

modified_atString
Required
This is the datetime that this object was last updated by Merge

remote_dataRemoteData[]
Optional

The Template object
JSON
{
"name": "Welcome Email Template",
"type": "Email",
"contents": "Welcome onboard! Stay connected and find out more.",
"owner": "3756cbc6-6040-430a-475r-aafacbadf4sd",
"remote_created_at": "2022-12-23T00:00:00Z",
"remote_updated_at": "2022-12-23T00:00:00Z",
"remote_was_deleted": true,
"id": "4958cbc6-4874-430a-475r-aafacbadd5ty",
"remote_id": "40",
Show advanced fields
}

GET
/templates

Returns a list of Template objects.


Header Parameters

AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.
Query & Path Parameters

created_afterString
Optional
If provided, will only return objects created after this datetime.

created_beforeString
Optional
If provided, will only return objects created before this datetime.

cursorString
Optional
The pagination cursor value.

include_deleted_dataBoolean
Optional
Whether to include data that was marked as deleted by third party webhooks.

include_remote_dataBoolean
Optional
Whether to include the original data Merge fetched from the third-party to produce these models.

modified_afterString
Optional
If provided, only objects synced by Merge after this date time will be returned.

modified_beforeString
Optional
If provided, only objects synced by Merge before this date time will be returned.

page_sizeInteger
Optional
Number of results to return per page.

remote_idString
Optional
The API provider's ID for the given object.

Response
JSON
{
"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
"previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ",
"results": [
{
"name": "Welcome Email Template",
"type": "Email",
"contents": "Welcome onboard! Stay connected and find out more.",
"owner": "3756cbc6-6040-430a-475r-aafacbadf4sd",
"remote_created_at": "2022-12-23T00:00:00Z",
"remote_updated_at": "2022-12-23T00:00:00Z",
"remote_was_deleted": true,
"id": "4958cbc6-4874-430a-475r-aafacbadd5ty",
"remote_id": "40",
Show advanced fields
}
]
}
Field support by platform
ActiveCampaign
ActiveCampaign

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


contentsString

nameString

ownerString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

remote_updated_atString
Customer.io
Customer.io

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


contentsString

nameString

remote_created_atString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

typeEnum
Hubspot Marketing Hub
Hubspot Marketing Hub

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


nameString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

remote_updated_atString

typeEnum
Klaviyo
Klaviyo

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


contentsString

nameString

remote_created_atString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

remote_updated_atString
Mailchimp
Mailchimp

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


nameString

remote_created_atString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

remote_updated_atString

typeEnum
Podium
Podium

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


contentsString

nameString

ownerString

remote_created_atString

remote_idString

remote_updated_atString

typeEnum
SendGrid
SendGrid

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


contentsString

nameString

ownerString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

remote_updated_atString

typeEnum
Hint: Use the /linked-accounts endpoint to pull platform support information.
POST
/templates

Creates a Template object with the given values.


Header Parameters

AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.
Query & Path Parameters

is_debug_modeBoolean
Optional
Whether to include debug fields (such as log file links) in the response.

run_asyncBoolean
Optional
Whether or not third-party updates should be run asynchronously.
Body Parameters

modelObject
Required
Find available fields below under “Model Parameters”.
Model Parameters
View app-specific writable fields under “Field support by platform” in this section.

nameString
The template's name.

typeEnum
The template's type. Must pass in one of the following choices: EMAIL, MESSAGE.

contentsString
The template contents.

ownerString
The template's owner. Must pass in a valid Merge ID, which can be obtained from the id field in the Owner object.

integration_paramsObject

linked_account_paramsObject

POST v1/templates
JSON
{
"model": {
"name": "Welcome Email Template",
"type": "Email",
"contents": "Welcome onboard! Stay connected and find out more.",
"owner": "3756cbc6-6040-430a-475r-aafacbadf4sd"
}
}
Response
JSON
{
"model": {
"name": "Welcome Email Template",
"type": "Email",
"contents": "Welcome onboard! Stay connected and find out more.",
"owner": "3756cbc6-6040-430a-475r-aafacbadf4sd",
"remote_created_at": "2022-12-23T00:00:00Z",
"remote_updated_at": "2022-12-23T00:00:00Z",
"remote_was_deleted": true,
"id": "4958cbc6-4874-430a-475r-aafacbadd5ty",
"remote_id": "40",
Show advanced fields
}
}
Field support by platform
Mailchimp
Mailchimp

Merge supports Passthrough Requests to this platform's API

Supported POST Model Parameters


nameString
Required

remote_created_atString
Optional

remote_idString
Optional

remote_updated_atString
Optional

typeEnum
Optional

Additional POST Parameters


contentsString
Required
Hint: Use the /linked-accounts endpoint to pull platform support information.
GET
/templates/{id}

Returns a Template object with the given id.


Header Parameters

AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.
Query & Path Parameters

idString
Required

include_remote_dataBoolean
Optional
Whether to include the original data Merge fetched from the third-party to produce these models.
Response
JSON
{
"name": "Welcome Email Template",
"type": "Email",
"contents": "Welcome onboard! Stay connected and find out more.",
"owner": "3756cbc6-6040-430a-475r-aafacbadf4sd",
"remote_created_at": "2022-12-23T00:00:00Z",
"remote_updated_at": "2022-12-23T00:00:00Z",
"remote_was_deleted": true,
"id": "4958cbc6-4874-430a-475r-aafacbadd5ty",
"remote_id": "40",
Show advanced fields
}
Field support by platform
ActiveCampaign
ActiveCampaign

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


contentsString

nameString

ownerString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

remote_updated_atString
Customer.io
Customer.io

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


contentsString

nameString

remote_created_atString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

typeEnum
Hubspot Marketing Hub
Hubspot Marketing Hub

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


nameString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

remote_updated_atString

typeEnum
Klaviyo
Klaviyo

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


contentsString

nameString

remote_created_atString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

remote_updated_atString
Mailchimp
Mailchimp

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


nameString

remote_created_atString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

remote_updated_atString

typeEnum
Podium
Podium

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


contentsString

nameString

ownerString

remote_created_atString

remote_idString

remote_updated_atString

typeEnum
SendGrid
SendGrid

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


contentsString

nameString

ownerString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

remote_updated_atString

typeEnum
Hint: Use the /linked-accounts endpoint to pull platform support information.
GET
/templates/meta/post

Returns metadata for MKTGTemplate POSTs.


Header Parameters

AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.
Response
JSON
{
"request_schema": {},
"remote_field_classes": {},
"status": {
"linked_account_status": "string",
"can_make_request": true
},
"has_conditional_params": true,
"has_required_linked_account_params": true
}
Field support by platform
ActiveCampaign
ActiveCampaign

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


contentsString

nameString

ownerString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

remote_updated_atString
Customer.io
Customer.io

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


contentsString

nameString

remote_created_atString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

typeEnum
Hubspot Marketing Hub
Hubspot Marketing Hub

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


nameString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

remote_updated_atString

typeEnum
Klaviyo
Klaviyo

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


contentsString

nameString

remote_created_atString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

remote_updated_atString
Mailchimp
Mailchimp

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


nameString

remote_created_atString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

remote_updated_atString

typeEnum
Podium
Podium

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


contentsString

nameString

ownerString

remote_created_atString

remote_idString

remote_updated_atString

typeEnum
SendGrid
SendGrid

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


contentsString

nameString

ownerString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

remote_updated_atString

typeEnum
Hint: Use the /linked-accounts endpoint to pull platform support information.