Skip to main content
GET
/
experiments
/
api
List experiments
curl --request GET \
  --url https://api.pictify.io/experiments/api \
  --header 'Authorization: Bearer <token>'
{
  "experiments": [
    {
      "uid": "exp_abc123",
      "slug": "homepage-hero-test",
      "type": "ab_test",
      "name": "Homepage Hero A/B Test",
      "status": "draft",
      "variants": [
        {
          "id": "variant-a",
          "weight": 5000,
          "name": "New Design",
          "templateUid": "<string>",
          "variables": {},
          "isDefault": false,
          "conditions": {
            "type": "group",
            "operator": "AND",
            "children": "<array>",
            "property": "<string>",
            "ruleOperator": "equals",
            "value": "<unknown>"
          },
          "schedule": {
            "startAt": "2023-11-07T05:31:56Z",
            "endAt": "2023-11-07T05:31:56Z",
            "recurrence": {
              "type": "none",
              "cronExpression": "<string>",
              "timezone": "America/New_York"
            }
          },
          "impressions": 123,
          "clicks": 123
        }
      ],
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "templateUid": "tmpl_xyz789",
      "goalConfig": {
        "type": "impressions_only",
        "destinationUrl": "<string>"
      },
      "banditConfig": {
        "enabled": false,
        "algorithm": "thompson_sampling",
        "warmupImpressions": 50,
        "recomputeIntervalMinutes": 15
      },
      "hypothesis": "<string>",
      "minimumSampleSize": 1000,
      "confidenceThreshold": 0.95,
      "minimumRunDays": 7,
      "winnerVariantId": "<string>",
      "winnerDeclaredAt": "2023-11-07T05:31:56Z",
      "fallbackImageUrl": "<string>",
      "outputConfig": {
        "format": "png",
        "quality": 90
      }
    }
  ],
  "total": 123,
  "page": 123,
  "limit": 123
}

Experiments

Create and manage experiments to test image variants. Supports A/B tests with Thompson Sampling, smart links with condition-based routing, and scheduled variants.
For experiment types, lifecycle, and tracking details, see Experiments Concept.

Endpoints

MethodEndpointDescription
GET/experiments/apiList experiments
POST/experiments/apiCreate experiment
GET/experiments/api/{uid}Get experiment
PUT/experiments/api/{uid}Update experiment
DELETE/experiments/api/{uid}Delete experiment
POST/experiments/api/{uid}/startStart experiment
POST/experiments/api/{uid}/pausePause experiment
POST/experiments/api/{uid}/completeComplete experiment
GET/experiments/api/quotaCheck quota
POST/s/eventsTrack events
GET/s/{slug}/clickClick redirect
GET/s/{slug}/pixel.gifTracking pixel

Editable Fields by Status

StatusEditable Fields
draft / pausedAll fields
runningname, confidenceThreshold, minimumRunDays, goalConfig.destinationUrl
completedname only
Variant weights must sum to exactly 10,000 (basis points). A 50/50 split uses weights of 5000 and 5000.

Experiment Status

StatusDescription
draftCreated but not started
runningActively serving variants and tracking events
pausedTemporarily stopped, can be restarted
completedFinished with a declared winner
archivedSoft-deleted

Slug Requirements

RuleDetails
Length3-60 characters
FormatLowercase alphanumeric and hyphens
PatternMust start and end with alphanumeric
UniquenessMust be unique among active experiments
Reservedevents, api, admin, health, status, pixel, track, sdk

Best Practices

  1. Use descriptive slugs that identify the test (e.g., email-banner-cta-test)
  2. Start with a 50/50 split before enabling auto-optimization
  3. Set clear goals — use click_through when you want to measure engagement
  4. Check your quota before creating experiments with GET /experiments/api/quota
  5. Always send a write key with event tracking to prevent data tampering

Authorizations

Authorization
string
header
required

API key obtained from the Pictify dashboard

Query Parameters

type
enum<string>

Filter by experiment type

Available options:
ab_test,
smart_link,
scheduled
status
enum<string>

Filter by status

Available options:
draft,
running,
paused,
completed
page
integer
default:1

Page number

Required range: x >= 1
limit
integer
default:20

Number of results per page

Required range: 1 <= x <= 100

Response

List of experiments

experiments
object[]
total
integer

Total number of experiments matching filters

page
integer
limit
integer