Constant Contact Email Campaigns AB Tests API

Use email campaigns A/B Test endpoints and methods to get, create, delete and update A/B tests.

Operations 3

GET /emails/activities/{campaign_activity_id}/abtest GET A/B Test Details for an Email Campaign Activity #
POST /emails/activities/{campaign_activity_id}/abtest POST (Create) an A/B Test for an Email Campaign Activity #
DELETE /emails/activities/{campaign_activity_id}/abtest DELETE an A/B Test for an Email Campaign Activity #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/constant-contact-email-campaigns-ab-tests-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

constant-contact-email-campaigns-ab-tests-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: The Constant Contact, Inc. V3 public API, for building integrations with Constant Contact, the leading small-business email marketing platform.
  version: 3.0.178
  title: AppConnect V3 Email Campaigns AB Tests API
  contact:
    name: webservices@constantcontact.com
  license:
    name: Private
    url: https://www.constantcontact.com/legal/terms-of-use
servers:
- url: https://api.cc.email/v3
tags:
- name: Email Campaigns AB Tests
  description: Use email campaigns A/B Test endpoints and methods to get, create, delete and update A/B tests.
paths:
  /emails/activities/{campaign_activity_id}/abtest:
    get:
      tags:
      - Email Campaigns AB Tests
      summary: GET A/B Test Details for an Email Campaign Activity
      description: Use this method to get A/B test details for a primary email campaign activity, such as the alternate email subject line, the contact test percentage size, and the number of hours to wait to determine the winning subject line to use. Currently, A/B tests support subject line only.
      operationId: retrieveEmailCampaignABTestUsingGET
      parameters:
      - name: campaign_activity_id
        in: path
        description: The unique ID for the primary email campaign activity.
        required: true
        x-example: 91569d46-00e4-4a4d-9a4c-d17d98740d04
        schema:
          type: string
      responses:
        '200':
          description: Request successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ABTestData'
        '400':
          description: Bad request. Either the JSON was malformed or there was a data validation error.
        '401':
          description: The Access Token used is invalid.
        '403':
          description: Forbidden request. You lack the necessary scopes, you lack the necessary user privileges, or the application is deactivated.
        '404':
          description: The requested resource was not found.
        '409':
          description: Conflict. The resource you are creating or updating conflicts with an existing resource.
        '429':
          description: Too many requests. You exceeded the request rate limit.
        '500':
          description: There was a problem with our internal service.
      security:
      - oauth2_implicit:
        - campaign_data
      - oauth2_access_code:
        - campaign_data
      x-authorization-privileges:
      - campaign:read
      x-sdk-methodName: getABTestEmailCampaign
    post:
      tags:
      - Email Campaigns AB Tests
      summary: POST (Create) an A/B Test for an Email Campaign Activity
      description: Use this method to create a new A/B test for a primary email campaign activity. You must specify an alternative subject line, the percentage of contact to use for the A/B test, and the number of hours to wait after the A/B test is sent before determining the winning subject line. To create an A/B test, the campaign must have a `current_status` of `DRAFT`. When you create an A/B test, the `type` changes from Newsletter (code= `10`) to A/B Test (code= `57`).
      operationId: createEmailCampaignABTestUsingPOST
      parameters:
      - name: campaign_activity_id
        in: path
        description: The unique ID for the primary email campaign activity.
        required: true
        x-example: 91569d46-00e4-4a4d-9a4c-d17d98740d04
        schema:
          type: string
      responses:
        '201':
          description: Request successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ABTestData'
        '400':
          description: Bad request. Either the JSON was malformed or there was a data validation error.
        '401':
          description: The Access Token used is invalid.
        '403':
          description: Forbidden request. You lack the necessary scopes, you lack the necessary user privileges, or the application is deactivated.
        '404':
          description: The requested resource was not found.
        '409':
          description: Conflict. The resource you are creating or updating conflicts with an existing resource.
        '429':
          description: Too many requests. You exceeded the request rate limit.
        '500':
          description: There was a problem with our internal service.
      security:
      - oauth2_implicit:
        - campaign_data
      - oauth2_access_code:
        - campaign_data
      x-authorization-privileges:
      - campaign:write
      x-sdk-methodName: createABTestEmailCampaign
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ABTestData'
        description: Specify the `alternative_subject` line, `test_size` percentage of contacts (value must from `5` to `50` inclusively), and the `winner_wait_duration` (value must be `6`, `12`, `24`, or `48` hours).
        required: true
    delete:
      tags:
      - Email Campaigns AB Tests
      summary: DELETE an A/B Test for an Email Campaign Activity
      description: Deletes an A/B Test on an primary email campaign activity. You can only delete A/B tests that have a `current_status` of `Draft`. Deleting an A/B tests reverts the email campaign activity `type` from A/B Test (code= `57`) back to NewsLetter (code= `10`). Constant Contact uses the original subject line, rather than the alternate A/B test subject line, when an A/B test is deleted.
      operationId: deleteEmailCampaignABTestUsingDELETE
      parameters:
      - name: campaign_activity_id
        in: path
        description: The unique ID for the primary email campaign activity.
        required: true
        x-example: 91569d46-00e4-4a4d-9a4c-d17d98740d04
        schema:
          type: string
      responses:
        '204':
          description: A/B test successfully deleted.
        '400':
          description: Bad request. Either the JSON was malformed or there was a data validation error.
        '401':
          description: The Access Token used is invalid.
        '403':
          description: Forbidden request. You lack the necessary scopes, you lack the necessary user privileges, or the application is deactivated.
        '404':
          description: The requested resource was not found.
        '409':
          description: Conflict. The resource you are creating or updating conflicts with an existing resource.
        '429':
          description: Too many requests. You exceeded the request rate limit.
        '500':
          description: There was a problem with our internal service.
      security:
      - oauth2_implicit:
        - campaign_data
      - oauth2_access_code:
        - campaign_data
      x-authorization-privileges:
      - campaign:write
      x-sdk-methodName: deleteABTestEmailCampaign
components:
  schemas:
    ABTestData:
      type: object
      required:
      - alternative_subject
      - test_size
      - winner_wait_duration
      properties:
        alternative_subject:
          type: string
          example: 'Reminder: Our Biggest Sale of the Year is Coming Soon!'
          description: The alternate email subject line to use for A/B testing.
        test_size:
          type: integer
          format: int32
          example: 30
          description: The percentage of contact recipients to participate in the A/B Test. For example, if the value is 30, then 30% of contacts will receive the email campaign with subject line A, and 30% of contacts will receive the email campaign with subject line B. Valid values include <code>5</code> to <code>50</code> percent. Currently, A/B tests support subject line only.
        winner_wait_duration:
          type: integer
          format: int32
          example: 24
          description: The number of hours Constant Contact waits after the A/B test is sent before determining the winning subject line. The winner is the subject line with the highest number of contact opens. Valid values include <code>6</code>, <code>12</code>, <code>24</code>, and <code>48</code>. After the winner is determined, Constant Contact automatically sends the email campaign with the winning subject line to all the remaining contacts, which did not participate in the A/B test.
  securitySchemes:
    oauth2_implicit:
      type: oauth2
      flows:
        implicit:
          scopes:
            contact_data: Read or modify contact data.
            campaign_data: Read or modify email campaign data.
            account_read: Read account data.
            account_update: Modify account data.
            billing_data: Read or modify billing data.
          authorizationUrl: https://authz.constantcontact.com/oauth2/default/v1/authorize
    oauth2_access_code:
      type: oauth2
      flows:
        authorizationCode:
          scopes:
            contact_data: Read or modify contact data.
            campaign_data: Read or modify email campaign data.
            account_read: Read account data.
            account_update: Modify account data.
            billing_data: Read or modify billing data.
          authorizationUrl: https://authz.constantcontact.com/oauth2/default/v1/authorize
          tokenUrl: https://authz.constantcontact.com/oauth2/default/v1/token
    ctctPartnerAuthorizer:
      type: oauth2
      flows:
        implicit:
          scopes:
            v3api/general.partner: Access to general partner API methods
          authorizationUrl: https://v3api-partner.auth.us-east-1.amazoncognito.com/oauth2/token
      description: Partner Authentication
    api_key:
      type: apiKey
      name: x-api-key
      in: header