v1.0.0
OpenAPI 3.1.0

Create an A/B test group for a newsletter

US region

Client Libraries

Create an A/B test group for a newsletter

Create a new A/B test group for a newsletter. This duplicates the existing newsletter content into a new test group, allowing you to test different versions of your message.

This endpoint does not require a request body. The new test group is created as a copy of the existing content.

You cannot add test groups to a newsletter that has already been sent.

Path Parameters
  • newsletter_id
    Type: integer
    required

    The identifier of a newsletter.

Body
application/json
Empty object
Responses
  • application/json
  • 400

    The newsletter has already been sent. You cannot add test groups to a sent newsletter.

  • 404

    The newsletter does not exist.

  • 429

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

Request Example for post/v1/newsletters/{newsletter_id}/test_groups
curl https://api.customer.io/v1/newsletters/1/test_groups \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{}'
{
  "newsletter": {
    "id": 128275,
    "deduplicate_id": "128275:1484870424",
    "type": "email",
    "content_ids": [
      45
    ],
    "name": "Weekly Product Update",
    "sent_at": 1481653929,
    "created": 1481653919,
    "updated": 1481653929,
    "recipient_segment_ids": [
      42,
      99
    ],
    "tags": [
      "Product Updates"
    ],
    "subscription_topic_id": 5
  }
}