Update a broadcast action
Update the contents of a broadcast action, including the body of messages or HTTP requests.
NOTE 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.
- bodyType: string
The body of the action. You cannot modify the body if you created it with our drag-and-drop editor.
- bodyType: string
_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. - broadcastType: integer
_id The identifier for a broadcast.
- fromType: integer
_id The identifier of the
fromaddress, commonly known as the "sender". Use List sender identities to find valid IDs. - headersType: array object[]
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.
- preheaderType: string
_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.
- recipientType: string
The recipient address for an action.
- replyType: integer | null
_to _id The identifier for the
reply_toaddress, if applicable. Use List sender identities to find valid IDs. - sendingType: stringenum
_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
- subjectType: string
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.
- 429
Your request is over the 10-per-second limit.
curl https://api.customer.io/v1/broadcasts/1/actions/1 \
--request PUT \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"broadcast_id": 2,
"body": "",
"sending_state": "automatic",
"from_id": 1,
"reply_to_id": 38,
"recipient": "{{customer.email}}",
"subject": "Did you get that thing I sent you?",
"preheader_text": "",
"body_amp": "",
"headers": [
[
{
"name": "X-Mailgun-Tag",
"value": "my-cool-tag"
}
]
]
}'
{
"action": {
"id": 96,
"broadcast_id": 2,
"deduplicate_id": "15:1492548073",
"name": "Opening Message",
"layout": "string",
"created": 1552341937,
"updated": 1552341937,
"body": "string",
"type": "email",
"sending_state": "automatic",
"language": "fr",
"from": "sentFrom@example.com",
"from_id": 1,
"reply_to": "replyto@example.com",
"reply_to_id": 38,
"preprocessor": "premailer",
"recipient": "{{customer.email}}",
"subject": "Did you get that thing I sent you?",
"cc": "string",
"bcc": "string",
"fake_bcc": true,
"preheader_text": "string",
"body_amp": "string",
"headers": "[{\"name\":\"X-Mailgun-Tag\",\"value\":\"my-cool-tag\"},{\"name\":\"X-Custom-Header\",\"value\":\"custom-value\"}]"
}
}Returns the updated broadcast action.