v1.0.0
OpenAPI 3.1.0

Get a newsletter variant

US region

Client Libraries

Get a newsletter variant

Returns information about a specific variant of a newsletter, where a variant is either a language in a multi-language newsletter or a part of an A/B test.

Path Parameters
  • newsletter_id
    Type: integer
    required

    The identifier of a newsletter.

  • content_id
    Type: integer
    required

    The identifier of a message in a newsletter. If your newsletter has an A/B test group or includes multiple languages, each variant has its own content_id, separate from the newsletter_id.

    Use List variants of a newsletter to find the content_id associated with the right variant.

Responses
  • application/json
  • 404

    The newsletter or variant does not exist.

  • 429

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

Request Example for get/v1/newsletters/{newsletter_id}/contents/{content_id}
curl https://api.customer.io/v1/newsletters/1/contents/1 \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "content": {
    "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\"}]"
  }
}