Newsletter Variants

Update a translation of a one-time send

Changed on

Update the translation of a one-time send (referred to as a "newsletter" in our APIs) variant. If it includes A/B tests, use Update a translation in a one-time send test group.

NOTE: You cannot manage content made with Design Studio with this endpoint. Use the Design Studio APIs instead. You also can't update in-app or inbox message content through the API—change it in the message editor.

put/v1/newsletters/{newsletter_id}/language/{language}

Request

  • Base URL
    https://api.customer.io
  • URL
    https://api.customer.io/v1/newsletters/{newsletter_id}/language/{language}
  • Auth
    HTTP bearer

Request body

OR
OR
OR
OR
OR

Example request

{
  "type": "email",
  "deduplicate_id": "15:1492548073",
  "subject": "Did you get that thing I sent you?",
  "from_id": 1,
  "reply_to_id": 38
}

Response

Returns the updated one-time send variant.

Example response

{
  "content": {
    "newsletter_id": 10,
    "deduplicate_id": "15:1492548073",
    "name": "one-time send variant A",
    "layout": "<html><body>{{ content }}</body></html>",
    "body": "<strong>Hello from the API</strong>",
    "language": "fr",
    "type": "email",
    "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