Actions

The Action object is used to represent an action executed within an automation.

The Action object

Properties


emailsArray
Required
The marketing emails sent by this action.

messagesArray
Required
The messages sent by this action.

nameString
Optional
The action's name.

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

idString
Required

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

The Action object
JSON
{
"name": "Welcome Email",
"emails": [
"2634cbc6-6040-430a-475r-aafacbadf9he"
],
"messages": [
"3734cbc6-6040-430a-475r-aafacbadr6wq"
],
"type": "EMAIL",
"id": "52ce940b-ecfe-43a6-955f-629f799f7f73",
"remote_id": "1234"
}

GET

/actions

Returns a list of Action 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, will only return objects modified after this datetime.

modified_beforeString
Optional
If provided, will only return objects modified before this datetime.

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",
"emails": [
"2634cbc6-6040-430a-475r-aafacbadf9he"
],
"messages": [
"3734cbc6-6040-430a-475r-aafacbadr6wq"
],
"type": "EMAIL",
"id": "52ce940b-ecfe-43a6-955f-629f799f7f73",
"remote_id": "1234"
}
]
}
POST

/actions

Creates an Action 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 action's name.

emailsArray
The marketing emails sent by this action.

messagesArray
The messages sent by this action.

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

integration_paramsObject

linked_account_paramsObject

POST v1/actions
JSON
{
"model": {
"name": "Welcome Email",
"emails": [
"2634cbc6-6040-430a-475r-aafacbadf9he"
],
"messages": [
"3734cbc6-6040-430a-475r-aafacbadr6wq"
],
"type": "EMAIL"
}
}
Response
JSON
{
"model": {
"name": "Welcome Email",
"emails": [
"2634cbc6-6040-430a-475r-aafacbadf9he"
],
"messages": [
"3734cbc6-6040-430a-475r-aafacbadr6wq"
],
"type": "EMAIL",
"id": "52ce940b-ecfe-43a6-955f-629f799f7f73",
"remote_id": "1234"
},
"warnings": [
{
"source": {
"pointer": "/age"
},
"title": "Unrecognized Field",
"detail": "An unrecognized field, age, was passed in with request data.",
"problem_type": "UNRECOGNIZED_FIELD"
}
],
"errors": [
{
"source": {
"pointer": "/model/custom_fields"
},
"title": "Missing Required Field",
"detail": "custom_fields is a required field on model.",
"problem_type": "MISSING_REQUIRED_FIELD"
}
],
"logs": [
{
"log_id": "99433219-8017-4acd-bb3c-ceb23d663832",
"dashboard_view": "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832",
"log_summary": {
"url": "https://harvest.greenhouse.io/v1/candidates/",
"method": "POST",
"status_code": 200
}
}
]
}
GET

/actions/{id}

Returns an Action 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",
"emails": [
"2634cbc6-6040-430a-475r-aafacbadf9he"
],
"messages": [
"3734cbc6-6040-430a-475r-aafacbadr6wq"
],
"type": "EMAIL",
"id": "52ce940b-ecfe-43a6-955f-629f799f7f73",
"remote_id": "1234"
}
GET

/actions/meta/post

Returns metadata for MKTGAction 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
}