Automations
The Automation
object is used to represent an automation, workflow or custom event in the remote system.The Automation object
Properties
actions
ArrayRequired
The actions performed by this automation.
name
StringOptional
The automation's name.
trigger_type
EnumOptional
The trigger type for running this automation. Possible values include:
TRIGGER_EVENT
, RECURRENCE
, or -
in cases where there is no clear mapping - the original value passed through.start_date
StringOptional
The automation's start date.
end_date
StringOptional
The automation's end date.
description
StringOptional
The automation’s description.
status
StringOptional
The automation's status.
automation_trigger
ObjectOptional
The trigger configuraton for the automation.
remote_was_deleted
BooleanRequired
Indicates whether or not this object has been deleted by third party webhooks.
id
StringRequired
remote_id
StringOptional
The third-party API ID of the matching object.
field_mappings
ObjectOptional
modified_at
StringRequired
This is the datetime that this object was last updated by Merge
remote_data
ArrayOptional
The Automation object
JSON
{"name": "Welcome Email","trigger_type": "RECURRENCE","start_date": "2022-12-23T00:00:00Z","end_date": "2022-12-23T00:00:00Z","description": "This sends a welcome email to new customers.","status": "Published","automation_trigger": {"recurrence_schedule": {"days": ["Sunday"],"hours": {"type": "send_asap"}},"trigger_settings": {"trigger_event": "NEW_CUSTOMER"}},"actions": ["52ce940b-ecfe-43a6-955f-629f799f7f73"],"remote_was_deleted": true,"id": "45ce474c-dhcj-43a6-754r-629f799f7d68","remote_id": "12",Show advanced fields}
GET
/automations
Returns a list of Automation
objects.
Header Parameters
Authorization
StringRequired
Token-based authentication with required prefix "Bearer"
X-Account-Token
StringRequired
Token identifying the end user.
Query & Path Parameters
created_after
StringOptional
If provided, will only return objects created after this datetime.
created_before
StringOptional
If provided, will only return objects created before this datetime.
cursor
StringOptional
The pagination cursor value.
include_deleted_data
BooleanOptional
Whether to include data that was marked as deleted by third party webhooks.
include_remote_data
BooleanOptional
Whether to include the original data Merge fetched from the third-party to produce these models.
modified_after
StringOptional
If provided, only objects synced by Merge after this date time will be returned.
modified_before
StringOptional
If provided, only objects synced by Merge before this date time will be returned.
page_size
IntegerOptional
Number of results to return per page.
remote_id
StringOptional
The API provider's ID for the given object.
Response
JSON
{"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw","previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ","results": [{"name": "Welcome Email","trigger_type": "RECURRENCE","start_date": "2022-12-23T00:00:00Z","end_date": "2022-12-23T00:00:00Z","description": "This sends a welcome email to new customers.","status": "Published","automation_trigger": {"recurrence_schedule": {"days": ["Sunday"],"hours": {"type": "send_asap"}},"trigger_settings": {"trigger_event": "NEW_CUSTOMER"}},"actions": ["52ce940b-ecfe-43a6-955f-629f799f7f73"],"remote_was_deleted": true,"id": "45ce474c-dhcj-43a6-754r-629f799f7d68","remote_id": "12",Show advanced fields}]}
POST
/automations
Creates an Automation
object with the given values.
Header Parameters
Authorization
StringRequired
Token-based authentication with required prefix "Bearer"
X-Account-Token
StringRequired
Token identifying the end user.
Query & Path Parameters
is_debug_mode
BooleanOptional
Whether to include debug fields (such as log file links) in the response.
run_async
BooleanOptional
Whether or not third-party updates should be run asynchronously.
Body Parameters
model
ObjectRequired
Find available fields below under “Model Parameters”.
Model Parameters
View app-specific writable fields under “Field support by platform” in this section.name
StringThe automation's name.
trigger_type
EnumThe trigger type for running this automation. Must pass in one of the following choices:
TRIGGER_EVENT
, RECURRENCE
.start_date
StringThe automation's start date.
end_date
StringThe automation's end date.
description
StringThe automation’s description.
status
StringThe automation's status.
automation_trigger
ObjectThe trigger configuraton for the automation.
actions
ArrayThe actions performed by this automation.
integration_params
Objectlinked_account_params
ObjectPOST v1/automations
JSON
{"model": {"name": "Welcome Email","trigger_type": "RECURRENCE","start_date": "2022-12-23T00:00:00Z","end_date": "2022-12-23T00:00:00Z","description": "This sends a welcome email to new customers.","status": "Published","automation_trigger": {"recurrence_schedule": {"days": ["Sunday"],"hours": {"type": "send_asap"}},"trigger_settings": {"trigger_event": "NEW_CUSTOMER"}},"actions": ["52ce940b-ecfe-43a6-955f-629f799f7f73"]}}
Response
JSON
{"model": {"name": "Welcome Email","trigger_type": "RECURRENCE","start_date": "2022-12-23T00:00:00Z","end_date": "2022-12-23T00:00:00Z","description": "This sends a welcome email to new customers.","status": "Published","automation_trigger": {"recurrence_schedule": {"days": ["Sunday"],"hours": {"type": "send_asap"}},"trigger_settings": {"trigger_event": "NEW_CUSTOMER"}},"actions": ["52ce940b-ecfe-43a6-955f-629f799f7f73"],"remote_was_deleted": true,"id": "45ce474c-dhcj-43a6-754r-629f799f7d68","remote_id": "12",Show advanced fields}}
GET
/automations/{id}
Returns an Automation
object with the given id
.
Header Parameters
Authorization
StringRequired
Token-based authentication with required prefix "Bearer"
X-Account-Token
StringRequired
Token identifying the end user.
Query & Path Parameters
id
StringRequired
include_remote_data
BooleanOptional
Whether to include the original data Merge fetched from the third-party to produce these models.
Response
JSON
{"name": "Welcome Email","trigger_type": "RECURRENCE","start_date": "2022-12-23T00:00:00Z","end_date": "2022-12-23T00:00:00Z","description": "This sends a welcome email to new customers.","status": "Published","automation_trigger": {"recurrence_schedule": {"days": ["Sunday"],"hours": {"type": "send_asap"}},"trigger_settings": {"trigger_event": "NEW_CUSTOMER"}},"actions": ["52ce940b-ecfe-43a6-955f-629f799f7f73"],"remote_was_deleted": true,"id": "45ce474c-dhcj-43a6-754r-629f799f7d68","remote_id": "12",Show advanced fields}
GET
/automations/{parent_id}/recipients
Returns a list of Contact
objects.
Header Parameters
Authorization
StringRequired
Token-based authentication with required prefix "Bearer"
X-Account-Token
StringRequired
Token identifying the end user.
Query & Path Parameters
cursor
StringOptional
The pagination cursor value.
include_deleted_data
BooleanOptional
Whether to include data that was marked as deleted by third party webhooks.
include_remote_data
BooleanOptional
Whether to include the original data Merge fetched from the third-party to produce these models.
page_size
IntegerOptional
Number of results to return per page.
parent_id
StringRequired
Response
JSON
{"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw","previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ","results": [{"first_name": "Gil","last_name": "Feig","email": "[email protected]","phone": "+13785579223","state": "NY","country": "USA","postal_code": "string","remote_created_at": "2022-12-23T00:00:00Z","remote_updated_at": "2022-12-23T00:00:00Z","remote_was_deleted": true,"id": "5858cbc6-6040-430a-475r-aafacbadrg64","remote_id": "35",Show advanced fields}]}
GET
/automations/meta/post
Returns metadata for MKTGAutomation
POSTs.
Header Parameters
Authorization
StringRequired
Token-based authentication with required prefix "Bearer"
X-Account-Token
StringRequired
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}