Update a transactional message
Update the body of a transactional email. This fully overwrites your existing transactional message. We'll use your updated content for any future transactional requests (/v1/send/email), so make sure that you test your message before you update it.
NOTE: You cannot manage content made with Design Studio with this endpoint. Use the Design Studio APIs instead.
- Type: integertransactional
_id requiredThe identifier of your transactional message. You'll find this in the UI or URL of your transactional message. For example, if this is the path of a transactional message URL -
/transactional/3/templates/139- thetransactional_idis 3. - Type: integercontent
_id requiredThe content variant of your transactional message. You'll find the id in the URL of your transactional message. For example, if this is the path of a transactional message URL -
/transactional/3/templates/139- thecontent_idis 139.
- Type: stringbody
The body of the transactional message. 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: 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: stringsubject
The subject line for an
emailaction.
- application/json
- application/json
- 404
The
transactional_idorcontent_idin your request do not exist
curl https://api.customer.io/v1/transactional/1/content/1 \
--request PUT \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"body": "",
"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"
}
]
]
}'
{
"content": [
{
"id": 96,
"name": "Receipt",
"created": 1552341937,
"updated": 1552341937,
"body": "string",
"language": "fr",
"type": "email",
"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 transactional message.