Update a broadcast action
Update the contents of a broadcast action, including the body of messages or HTTP requests.
SMS and Design Studio: The first time you update an SMS action's body, Customer.io copies the message into Design Studio as a new SMS, the same kind you'd create from the Design Studio dashboard, and links the action to it. From then on, the action sends whatever the linked SMS contains, and you can also edit that SMS in Design Studio. When you update body, recipient, from_id, or image_url, Customer.io saves your changes to the linked SMS and publishes them to the action. Customer.io doesn't link a message that has translations or an action in a multi-language branch. You can't set body to an empty string, and you must send image_url together with body. If the linked SMS has edits in Design Studio that nobody has published, the request fails with a 409 until someone publishes them or restores the last published version.
NOTE Apart from SMS, you cannot manage content made with Design Studio with this endpoint. Use the Design Studio APIs instead.
- Type: integerbroadcast
_id requiredThe identifier of a broadcast.
- 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: 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
broadcastID,actionIDortriggerIDis invalid. Or thelanguagedoes not exist for this action. - 404
The broadcast, action, and/or trigger do not exist.
- 409
The SMS has edits in Design Studio that nobody has published.
- 422
The request isn't valid for an SMS linked to Design Studio.
- application/json
{
"body": "",
"body_amp": "",
"broadcast_id": 2,
"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,
"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",
"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 broadcast action.