Add a translation to a one-time send
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.
- Type: integernewsletter
_id requiredThe identifier of a one-time send.
Add a language variant to a one-time send. The payload the endpoint accepts depends on the parent one-time send's channel type.
Add a language variant to an email one-time send. Requires
language,subject, andbody.- Type: stringbodyrequired
The HTML body content for the variant.
- Type: stringlanguagerequired
The language tag for the new variant, e.g.
es,fr,de. - Type: stringsubjectrequired
The subject line for the variant.
- Type: stringbody
_amp The AMP HTML body content for the variant.
- Type: stringbody
_plain The plaintext body content for the variant.
- Type: stringpreheader
_text The preheader text for the email variant.
- application/json
- 400
The request is invalid. Possible reasons include: the one-time send has already been sent, the one-time send has multiple test groups (add a translation to a test group instead), or the one-time send uses Design Studio or drag-and-drop editors.
- 404
The one-time send does not exist.
- 422
Validation error. Possible reasons:
languageis missing, required content fields are missing for the channel type, or the language variant already exists. - application/json
{
"body": "<html><body><h1>¡Hola!</h1></body></html>",
"language": "es",
"subject": "¡Hola, {{ customer.name }}!",
"body_amp": "",
"body_plain": "",
"preheader_text": "Mira nuestras últimas novedades"
}
{
"newsletter": {
"content_ids": [
45
],
"created": 1481653919,
"deduplicate_id": "128275:1484870424",
"id": 128275,
"name": "Weekly Product Update",
"recipient_segment_ids": [
42,
99
],
"sent_at": 1481653929,
"subscription_topic_id": 5,
"tags": [
"Product Updates"
],
"type": "email",
"updated": 1481653929
}
}Returns the updated one-time send, including new content_ids.