Newsletter Variants
Update a one-time send variant
Changed onUpdate the content of a one-time send (referred to as a "newsletter" in our APIs): the default message, a test variant in an A/B test group, or a translation.
For an email, you can also update the envelope: from address, subject line, etc.
NOTE: You cannot manage content made with the drag-and-drop editor via API, and you cannot use this endpoint to update Design Studio emails. You can, however, manage Design Studio content with other endpoints. You also can't update in-app or inbox message content through the API—use the message editor instead.
put/v1/newsletters/{newsletter_id}/contents/{content_id}
Request
- Base URLhttps://api.customer.io
- URLhttps://api.customer.io/v1/newsletters/{newsletter_id}/contents/{content_id}
- AuthHTTP bearer
Request body
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
- info
added the media type
application/jsonfor the response with the status
- info