v1.0.0
OpenAPI 3.1.0

List newsletter variants

US region

Client Libraries

List newsletter variants

Returns a newsletter's content variants—these are either different languages in a multi-language newsletter or A/B tests.

Path Parameters
  • newsletter_id
    Type: integer
    required

    The identifier of a newsletter.

Responses
  • application/json
  • 404

    The newsletter you requested does not exist.

  • 429

    Your request is over the 10-per-second limit.

Request Example for get/v1/newsletters/{newsletter_id}/contents
curl https://api.customer.io/v1/newsletters/1/contents \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "contents": [
    {
      "id": 1,
      "newsletter_id": 10,
      "deduplicate_id": "15:1492548073",
      "name": "newsletter variant A",
      "layout": "<html><body>{{ content }}</body></html>",
      "body": "<strong>Hello from the API</strong>",
      "body_amp": "string",
      "language": "fr",
      "type": "email",
      "from": "sentFrom@example.com",
      "from_id": 1,
      "reply_to": "replyto@example.com",
      "reply_to_id": 38,
      "preprocessor": "premailer",
      "recipient": "{{customer.email}}",
      "subject": "Did you get that thing I sent you?",
      "cc": "string",
      "bcc": "string",
      "fake_bcc": true,
      "preheader_text": "string",
      "headers": "[{\"name\":\"X-Mailgun-Tag\",\"value\":\"my-cool-tag\"},{\"name\":\"X-Custom-Header\",\"value\":\"custom-value\"}]"
    }
  ]
}