Transactional

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.

put/v1/transactional/{transactional_id}/content/{content_id}

Request

  • Base URL
    https://api.customer.io
  • URL
    https://api.customer.io/v1/transactional/{transactional_id}/content/{content_id}
  • Auth
    HTTP bearer

Request body

idinteger

The identifier for an action.

namestring

The name of the transactional message.

createdinteger

The date time when the referenced ID was created.

updatedinteger

The date time when the referenced ID was last updated.

bodystring

The body of the transactional message. You cannot modify the body if you created it with our drag-and-drop editor.

languagestring

The language variant for your message. If you don't use our localization feature, or this is the default message, this value is an empty string.

type'email' | 'push'

The type of message.

fromstring

The address that the message is from, relevant if the action type is email.

from_idinteger

The identifier of the from address, commonly known as the "sender". Use List sender identities to find valid IDs.

reply_tostring

The address that receives replies for the message, if applicable.

reply_to_idinteger nullable

The identifier for the reply_to address, if applicable. Use List sender identities to find valid IDs.

preprocessor'premailer'

If CSS pre-processing is enabled, this key is populated with premailer. Note, Juice replaced Premailer as the pre-processor, but you will only see premailer as the value.

recipientstring

The recipient address for an action.

subjectstring

The subject line for an email action.

ccstring

The carbon-copy address(es) for this action.

bccstring

The blind-copy address(es) for this action.

fake_bccboolean

If true, rather than sending true copies to BCC addresses, Customer.io sends a copy of the message with the subject line containing the recipient address(es).

preheader_textstring

Also known as "preview text", this is the small block of text shown in an email inbox next to or underneath the subject line.

body_ampstring

AMP-enabled content for your email. If a recipient's email client doesn't support AMP, they receive your body content instead. Make sure you're set up to send AMP first.

Example request

{
  "id": 96,
  "name": "Receipt",
  "created": 1552341937,
  "updated": 1552341937,
  "language": "fr",
  "from": "sentFrom@example.com",
  "from_id": 1,
  "reply_to": "replyto@example.com",
  "reply_to_id": 38,
  "recipient": "{{customer.email}}",
  "subject": "Did you get that thing I sent you?"
}

Response

Returns the updated transactional message.

Example response

{
  "content": [
    {
      "id": 96,
      "name": "Receipt",
      "created": 1552341937,
      "updated": 1552341937,
      "language": "fr",
      "from": "sentFrom@example.com",
      "from_id": 1,
      "reply_to": "replyto@example.com",
      "reply_to_id": 38,
      "recipient": "{{customer.email}}",
      "subject": "Did you get that thing I sent you?",
      "headers": "[{\"name\":\"X-Mailgun-Tag\",\"value\":\"my-cool-tag\"},{\"name\":\"X-Custom-Header\",\"value\":\"custom-value\"}]"
    }
  ]
}

Changes

No recorded changes to this operation across all 30 revisions of this API.