Newsletter Variants

Add a translation to a one-time send

Changed on

Add a language variant to a one-time send (referred to as a "newsletter" in our APIs).

If you omit optional fields, the values from the default template are copied over untranslated. Make sure you translate all aspects of your default template.

You can't add language variants to a one-time send that has already been sent. You can't manage emails created with the drag-and-drop editor or Design Studio via this endpoint—use Create an email translation for Design Studio emails.

If it has A/B tests, use Add a translation to a one-time send test group instead.

post/v1/newsletters/{newsletter_id}/language

Request

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

Request body

OR
OR
OR
OR

Example request

{
  "language": "es",
  "subject": "¡Hola, {{ customer.name }}!",
  "preheader_text": "Mira nuestras últimas novedades",
  "body": "<html><body><h1>¡Hola!</h1></body></html>"
}

Response

Returns the updated one-time send, including new content_ids.

Example response

{
  "newsletter": {
    "id": 128275,
    "deduplicate_id": "128275:1481653929",
    "type": "email",
    "content_ids": [
      45
    ],
    "name": "Weekly Product Update",
    "sent_at": 1481653929,
    "send_state": "sent",
    "scheduled_at": null,
    "created": 1481653919,
    "updated": 1481653929,
    "recipient_segment_ids": [
      42,
      99
    ],
    "tags": [
      "Product Updates"
    ],
    "subscription_topic_id": 5
  }
}

Changes

    • breaking

      the response property / became nullable for the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status