Update an automation action
Update the contents of an automation action, including the body of messages and HTTP requests.
NOTE: You can't manage content made with Design Studio with this endpoint. Use the Design Studio APIs instead.
- Type: integercampaign
_id requiredThe ID of the automation that you want to trigger or return information about.
- Type: integeraction
_id requiredThe action you want to lookup or act on.
- Type: stringbody
The body of the action. You cannot modify the body if you created it with our drag-and-drop editor.
- Type: stringbody
_amp AMP-enabled content for your email. If a recipient's email client doesn't support AMP, they receive your
bodycontent instead. Make sure you're set up to send AMP first. - Type: integerbroadcast
_id The identifier for a broadcast.
- Type: integercampaign
_id The identifier for an automation.
- Type: integerfrom
_id The identifier of the
fromaddress, commonly known as the "sender". Use List sender identities to find valid IDs. - Type: array object[]headers
Headers you want to add or update. Names and values must be strings, with no non-ASCII characters or spaces. You can't overwrite reserved headers.
- Type: stringpreheader
_text Also known as "preview text", this is the small block of text shown in an email inbox next to or underneath the subject line.
- Type: stringrecipient
The recipient address for an action.
- Type: integer | nullreply
_to _id The identifier for the
reply_toaddress, if applicable. Use List sender identities to find valid IDs. - Type: string enumsending
_state Determines the sending behavior for the action.
automaticsends the action automatically when triggered;draftqueues drafts when the action is triggered; oroffto disable the action.values- automatic
- draft
- off
- Type: stringsubject
The subject line for an
emailaction.
- application/json
- 400
The
campaignIDoractionIDis invalid. It could also be that thelanguagerequested does not exist for this action. - 404
The automation and/or action do not exist.
- application/json
{
"body": "",
"body_amp": "",
"broadcast_id": 2,
"campaign_id": 5,
"from_id": 1,
"headers": [
[
{
"name": "X-Mailgun-Tag",
"value": "my-cool-tag"
}
]
],
"preheader_text": "",
"recipient": "{{customer.email}}",
"reply_to_id": 38,
"sending_state": "automatic",
"subject": "Did you get that thing I sent you?"
}
{
"action": {
"bcc": "string",
"body": "string",
"body_amp": "string",
"broadcast_id": 2,
"campaign_id": 5,
"cc": "string",
"created": 1552341937,
"deduplicate_id": "15:1492548073",
"fake_bcc": true,
"from": "sentFrom@example.com",
"from_id": 1,
"headers": "[{\"name\":\"X-Mailgun-Tag\",\"value\":\"my-cool-tag\"},{\"name\":\"X-Custom-Header\",\"value\":\"custom-value\"}]",
"id": 96,
"language": "fr",
"layout": "string",
"multi_language_branch_action_id": 23,
"name": "Opening Message",
"parent_action_id": 1,
"preheader_text": "string",
"preprocessor": "premailer",
"recipient": "{{customer.email}}",
"reply_to": "replyto@example.com",
"reply_to_id": 38,
"sending_state": "automatic",
"subject": "Did you get that thing I sent you?",
"type": "email",
"updated": 1552341937
}
}Returns the updated automation action.