GET /api/split.php


List of A/B split test campaigns are sorted by creation date in ascending order by default.



Request parameters


All parameters must be URL-encoded.


ParameterValue
statusFilter records by status. Possible values are - DRAFT, PENDING, COMPLETED, CANCELLED. To apply multiple status filters, include the parameter in query arguments as status[]=DRAFT&status[]=PENDING.
tagsFilter records by tags. To apply multiple tag filters, include the parameter in query arguments as tags[]=Tag1&tags[]=Tag2.
sort_bySort records by field. At the moment only value created_at is supported, which is also applied by default.
sort_orderSort direction. Possible values are - ASC, DESC. When parameter is omitted, records are sorted in ascending (ASC) order.
limitNumber of records to return per request. Maximum of 10 000 records are returned per request even when parameter is omitted or value exceeds 10 000.
offsetNumber of records to skip for request. Defaults to 0. Value of 0 returns records from 0 to 10 000, 1 returns records from 10 001 to 20 000, etc.



Response parameters


ParameterValue
idUnique ID of the campaign. Numeric.
nameCampaign name.
sectionsList of tests in the campaign. Read "Section object parameters" section for more information.
tagsList of campaign tags.
created_atCreation date. Formatted as YYYY-MM-DD HH:MM:SS.
completed_atCompletion date. Parameter has value only when campaign's status is COMPLETED. Formatted as YYYY-MM-DD HH:MM:SS.
statusStatus. Possible values: DRAFT, PENDING - sending still in progress, COMPLETED, CANCELLED.



Section object parameters


ParameterValue
idUnique ID of the section in the campaign. Numeric.
subjectTest section subject.
templateTemplate used in the section. Value can be either a object or DELETED. Read "Template object parameters" section for more information.



Template object parameters


ParameterValue
idTemplate ID. Numeric
nameTemplate name.
preview_urlURL to template preview.



Example request


$ curl -X GET -u '[username]:[password]' https://<subdomain>.sendsmaily.net/api/split.php



Example response


[
  {
    "id": 1,
    "name": "My first A/B test campaign",
    "sections": [
      {
        "id": 0,
        "subject": "My first A/B test campaign",
        "template": {
          "id": 25,
          "name": "Testing new Call to Action",
          "preview_url": "https://<subdomain>.sendsmaily.net/template/preview/id/25"
        }
      },
      {
        "id": 1,
        "subject": "Old Call to Action test",
        "template": {
          "id": 19,
          "name": "Old template",
          "preview_url": "https://<subdomain>.sendsmaily.net/template/preview/id/19"
        }
      }
    ],
    "tags": ["Men"],
    "created_at": "2021-01-21 10:00:00",
    "completed_at": "2021-01-21 10:05:00",
    "status": "COMPLETED"
  },
  {
    "id": 3,
    "name": "A/B test campaign name",
    "sections": [
      {
        "id": 0,
        "subject": "Name of the first section",
        "template": {
          "id": 25,
          "name": "Testing new Call to Action",
          "preview_url": "https://<subdomain>.sendsmaily.net/template/preview/id/25"
        }
      },
      {
        "id": 1,
        "subject": "Name of the second section",
        "template": {
          "id": 19,
          "name": "Old template",
          "preview_url": "https://<subdomain>.sendsmaily.net/template/preview/id/19"
        }
      }
    ],
    "tags": ["Women"],
    "created_at": "2021-01-21 10:00:00",
    "completed_at": null,
    "status": "PENDING"
  }
]