Update a translation of a one-time send
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.
- Type: integernewsletter
_id requiredThe identifier of a one-time send.
- Type: stringlanguagerequired
A language tag of a language variant. If you don't provide a language (an empty string), we'll use your default language. If the language variant does not exist, we'll return an error.
Update the contents of an email one-time send variant. You can set the sender with
from_id. If you don't provide it, the existing sender is preserved.- Type: stringbody
The HTML body of the email. You cannot modify the body if you created the one-time send with Design Studio or the 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: stringbody
_plain By default, your workspace generates a plaintext version of your message body for each delivery. Use this key to override the default plain text body.
- Type: integerfrom
_id The identifier of the
fromaddress, commonly known as the "sender". Use List sender identities to find valid IDs. - 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 the one-time send. By default, it's
{{customer.email}}. - 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
- 400
The
languagedoes not exist. - 404
The one-time send or variant does not exist.
- application/json
{
"body": "",
"body_amp": "",
"body_plain": "",
"from_id": 1,
"preheader_text": "",
"recipient": "",
"reply_to_id": 38,
"subject": "Did you get that thing I sent you?"
}
{
"content": {
"bcc": "string",
"body": "<strong>Hello from the API</strong>",
"body_amp": "string",
"cc": "string",
"deduplicate_id": "15:1492548073",
"fake_bcc": true,
"from": "sentFrom@example.com",
"from_id": 1,
"headers": "[{\"name\":\"X-Mailgun-Tag\",\"value\":\"my-cool-tag\"},{\"name\":\"X-Custom-Header\",\"value\":\"custom-value\"}]",
"id": 1,
"language": "fr",
"layout": "<html><body>{{ content }}</body></html>",
"name": "one-time send variant A",
"newsletter_id": 10,
"preheader_text": "string",
"preprocessor": "premailer",
"recipient": "{{customer.email}}",
"reply_to": "replyto@example.com",
"reply_to_id": 38,
"subject": "Did you get that thing I sent you?",
"type": "email"
}
}Returns the updated one-time send variant.