Experiments

Create, list, update, start, stop, pause, resume, and inspect on-page A/B tests and personalization experiments. Variants are managed via the Experiment Variants endpoints. Account-level bootstrap configuration lives on the Experiment Settings endpoints.

GET
/rest/v1/experiments
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

limit?|

Maximum number of items to return. Defaults to 25; values below 1 are clamped to 1 and values above 100 are clamped to 100.

cursor?string

Opaque pagination cursor from pagination.nextCursor in the previous response. Do not decode or modify it. Malformed cursors return 400 Bad Request.

status?string

Optional lifecycle-state filter.

Value in"completed" | "draft" | "paused" | "running"
type?string

Optional experiment-type filter.

Value in"ab" | "multivariate" | "personalization"
search?string

Optional case-insensitive text search matched against experiment ID, name, and description.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://app.oursprivacy.com/rest/v1/experiments"
{
  "entities": [
    {
      "id": "exp_01HZX8TK6TSN91C5XWZP3N1M4E",
      "key": "homepage-hero-headline-test",
      "name": "Homepage Hero Headline Test",
      "description": "Test whether benefit-led copy increases demo requests.",
      "type": "ab",
      "status": "completed",
      "createdAt": "2026-04-30T18:42:11.219Z",
      "updatedAt": "string",
      "startedAt": "string",
      "stoppedAt": "string",
      "trafficAllocation": 100,
      "includeQueryString": false,
      "winnerVariantId": "var_01HZX8YJH3Z3W1R2Q4M5N6P7Q8",
      "targetingRules": {
        "urlPatterns": [
          "/pricing*",
          "/enterprise"
        ],
        "audienceId": "string",
        "visitorProperties": {},
        "visitorStatus": "string",
        "queryParams": [
          {
            "key": "utm_campaign",
            "operator": "contains",
            "value": "spring-launch"
          }
        ]
      },
      "metrics": {
        "primary": {},
        "secondary": [
          {
            "eventName": "demo_requested",
            "funnelId": "string"
          }
        ]
      }
    }
  ],
  "pagination": {
    "nextCursor": "string",
    "hasMore": true
  }
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
POST
/rest/v1/experiments
*object
AuthorizationBearer <token>

Ours Privacy API key

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://app.oursprivacy.com/rest/v1/experiments" \  -H "Content-Type: application/json" \  -d '{    "experimentSettingsId": "settings_01HZX9BB73EY2Q37VGK5A0VW7A",    "name": "Homepage Hero Headline Test"  }'
{
  "id": "exp_01HZX8TK6TSN91C5XWZP3N1M4E",
  "key": "homepage-hero-headline-test",
  "name": "Homepage Hero Headline Test",
  "description": "Test whether benefit-led copy increases demo requests.",
  "type": "ab",
  "status": "completed",
  "createdAt": "2026-04-30T18:42:11.219Z",
  "updatedAt": "string",
  "startedAt": "string",
  "stoppedAt": "string",
  "trafficAllocation": 100,
  "includeQueryString": false,
  "winnerVariantId": "var_01HZX8YJH3Z3W1R2Q4M5N6P7Q8",
  "targetingRules": {
    "urlPatterns": [
      "/pricing*",
      "/enterprise"
    ],
    "audienceId": "string",
    "visitorProperties": {},
    "visitorStatus": "string",
    "queryParams": [
      {
        "key": "utm_campaign",
        "operator": "contains",
        "value": "spring-launch"
      }
    ]
  },
  "metrics": {
    "primary": {},
    "secondary": [
      {
        "eventName": "demo_requested",
        "funnelId": "string"
      }
    ]
  },
  "variants": [
    {
      "id": "var_01HZX8YJH3Z3W1R2Q4M5N6P7Q8",
      "experimentId": "exp_01HZX8TK6TSN91C5XWZP3N1M4E",
      "name": "Headline Variant B",
      "isControl": false,
      "weight": 50,
      "variantType": "string",
      "redirectUrl": "https://www.example.com/pricing-v2",
      "domModifications": [
        {
          "selector": "h1.hero-title",
          "action": "customCss",
          "value": "Start your free trial",
          "styles": [
            {
              "property": "background-color",
              "value": "#10B981"
            }
          ],
          "attribute": {}
        }
      ]
    }
  ]
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
GET
/rest/v1/experiments/{id}
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://app.oursprivacy.com/rest/v1/experiments/string"
{
  "id": "exp_01HZX8TK6TSN91C5XWZP3N1M4E",
  "key": "homepage-hero-headline-test",
  "name": "Homepage Hero Headline Test",
  "description": "Test whether benefit-led copy increases demo requests.",
  "type": "ab",
  "status": "completed",
  "createdAt": "2026-04-30T18:42:11.219Z",
  "updatedAt": "string",
  "startedAt": "string",
  "stoppedAt": "string",
  "trafficAllocation": 100,
  "includeQueryString": false,
  "winnerVariantId": "var_01HZX8YJH3Z3W1R2Q4M5N6P7Q8",
  "targetingRules": {
    "urlPatterns": [
      "/pricing*",
      "/enterprise"
    ],
    "audienceId": "string",
    "visitorProperties": {},
    "visitorStatus": "string",
    "queryParams": [
      {
        "key": "utm_campaign",
        "operator": "contains",
        "value": "spring-launch"
      }
    ]
  },
  "metrics": {
    "primary": {},
    "secondary": [
      {
        "eventName": "demo_requested",
        "funnelId": "string"
      }
    ]
  },
  "variants": [
    {
      "id": "var_01HZX8YJH3Z3W1R2Q4M5N6P7Q8",
      "experimentId": "exp_01HZX8TK6TSN91C5XWZP3N1M4E",
      "name": "Headline Variant B",
      "isControl": false,
      "weight": 50,
      "variantType": "string",
      "redirectUrl": "https://www.example.com/pricing-v2",
      "domModifications": [
        {
          "selector": "h1.hero-title",
          "action": "customCss",
          "value": "Start your free trial",
          "styles": [
            {
              "property": "background-color",
              "value": "#10B981"
            }
          ],
          "attribute": {}
        }
      ]
    }
  ]
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
PATCH
/rest/v1/experiments/{id}
*object
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://app.oursprivacy.com/rest/v1/experiments/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "exp_01HZX8TK6TSN91C5XWZP3N1M4E",
  "key": "homepage-hero-headline-test",
  "name": "Homepage Hero Headline Test",
  "description": "Test whether benefit-led copy increases demo requests.",
  "type": "ab",
  "status": "completed",
  "createdAt": "2026-04-30T18:42:11.219Z",
  "updatedAt": "string",
  "startedAt": "string",
  "stoppedAt": "string",
  "trafficAllocation": 100,
  "includeQueryString": false,
  "winnerVariantId": "var_01HZX8YJH3Z3W1R2Q4M5N6P7Q8",
  "targetingRules": {
    "urlPatterns": [
      "/pricing*",
      "/enterprise"
    ],
    "audienceId": "string",
    "visitorProperties": {},
    "visitorStatus": "string",
    "queryParams": [
      {
        "key": "utm_campaign",
        "operator": "contains",
        "value": "spring-launch"
      }
    ]
  },
  "metrics": {
    "primary": {},
    "secondary": [
      {
        "eventName": "demo_requested",
        "funnelId": "string"
      }
    ]
  }
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
DELETE
/rest/v1/experiments/{id}
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://app.oursprivacy.com/rest/v1/experiments/string"
true
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
POST
/rest/v1/experiments/{id}/start
*object
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://app.oursprivacy.com/rest/v1/experiments/string/start" \  -H "Content-Type: application/json" \  -d '{}'
{
  "publishStatus": "pending_publish",
  "concurrentVersionChanges": 1,
  "experiment": {
    "id": "exp_01HZX8TK6TSN91C5XWZP3N1M4E",
    "key": "homepage-hero-headline-test",
    "name": "Homepage Hero Headline Test",
    "description": "Test whether benefit-led copy increases demo requests.",
    "type": "ab",
    "status": "completed",
    "createdAt": "2026-04-30T18:42:11.219Z",
    "updatedAt": "string",
    "startedAt": "string",
    "stoppedAt": "string",
    "trafficAllocation": 100,
    "includeQueryString": false,
    "winnerVariantId": "var_01HZX8YJH3Z3W1R2Q4M5N6P7Q8",
    "targetingRules": {
      "urlPatterns": [
        "/pricing*",
        "/enterprise"
      ],
      "audienceId": "string",
      "visitorProperties": {},
      "visitorStatus": "string",
      "queryParams": [
        {
          "key": "utm_campaign",
          "operator": "contains",
          "value": "spring-launch"
        }
      ]
    },
    "metrics": {
      "primary": {},
      "secondary": [
        {
          "eventName": "demo_requested",
          "funnelId": "string"
        }
      ]
    }
  }
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
POST
/rest/v1/experiments/{id}/stop
*object
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

winnerVariantId?string

Optional winning variant ID to persist when completing the experiment.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://app.oursprivacy.com/rest/v1/experiments/string/stop" \  -H "Content-Type: application/json" \  -d '{}'
{
  "publishStatus": "pending_publish",
  "concurrentVersionChanges": 1,
  "experiment": {
    "id": "exp_01HZX8TK6TSN91C5XWZP3N1M4E",
    "key": "homepage-hero-headline-test",
    "name": "Homepage Hero Headline Test",
    "description": "Test whether benefit-led copy increases demo requests.",
    "type": "ab",
    "status": "completed",
    "createdAt": "2026-04-30T18:42:11.219Z",
    "updatedAt": "string",
    "startedAt": "string",
    "stoppedAt": "string",
    "trafficAllocation": 100,
    "includeQueryString": false,
    "winnerVariantId": "var_01HZX8YJH3Z3W1R2Q4M5N6P7Q8",
    "targetingRules": {
      "urlPatterns": [
        "/pricing*",
        "/enterprise"
      ],
      "audienceId": "string",
      "visitorProperties": {},
      "visitorStatus": "string",
      "queryParams": [
        {
          "key": "utm_campaign",
          "operator": "contains",
          "value": "spring-launch"
        }
      ]
    },
    "metrics": {
      "primary": {},
      "secondary": [
        {
          "eventName": "demo_requested",
          "funnelId": "string"
        }
      ]
    }
  }
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
POST
/rest/v1/experiments/{id}/pause
*object
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://app.oursprivacy.com/rest/v1/experiments/string/pause" \  -H "Content-Type: application/json" \  -d '{}'
{
  "publishStatus": "pending_publish",
  "concurrentVersionChanges": 1,
  "experiment": {
    "id": "exp_01HZX8TK6TSN91C5XWZP3N1M4E",
    "key": "homepage-hero-headline-test",
    "name": "Homepage Hero Headline Test",
    "description": "Test whether benefit-led copy increases demo requests.",
    "type": "ab",
    "status": "completed",
    "createdAt": "2026-04-30T18:42:11.219Z",
    "updatedAt": "string",
    "startedAt": "string",
    "stoppedAt": "string",
    "trafficAllocation": 100,
    "includeQueryString": false,
    "winnerVariantId": "var_01HZX8YJH3Z3W1R2Q4M5N6P7Q8",
    "targetingRules": {
      "urlPatterns": [
        "/pricing*",
        "/enterprise"
      ],
      "audienceId": "string",
      "visitorProperties": {},
      "visitorStatus": "string",
      "queryParams": [
        {
          "key": "utm_campaign",
          "operator": "contains",
          "value": "spring-launch"
        }
      ]
    },
    "metrics": {
      "primary": {},
      "secondary": [
        {
          "eventName": "demo_requested",
          "funnelId": "string"
        }
      ]
    }
  }
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
POST
/rest/v1/experiments/{id}/resume
*object
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://app.oursprivacy.com/rest/v1/experiments/string/resume" \  -H "Content-Type: application/json" \  -d '{}'
{
  "publishStatus": "pending_publish",
  "concurrentVersionChanges": 1,
  "experiment": {
    "id": "exp_01HZX8TK6TSN91C5XWZP3N1M4E",
    "key": "homepage-hero-headline-test",
    "name": "Homepage Hero Headline Test",
    "description": "Test whether benefit-led copy increases demo requests.",
    "type": "ab",
    "status": "completed",
    "createdAt": "2026-04-30T18:42:11.219Z",
    "updatedAt": "string",
    "startedAt": "string",
    "stoppedAt": "string",
    "trafficAllocation": 100,
    "includeQueryString": false,
    "winnerVariantId": "var_01HZX8YJH3Z3W1R2Q4M5N6P7Q8",
    "targetingRules": {
      "urlPatterns": [
        "/pricing*",
        "/enterprise"
      ],
      "audienceId": "string",
      "visitorProperties": {},
      "visitorStatus": "string",
      "queryParams": [
        {
          "key": "utm_campaign",
          "operator": "contains",
          "value": "spring-launch"
        }
      ]
    },
    "metrics": {
      "primary": {},
      "secondary": [
        {
          "eventName": "demo_requested",
          "funnelId": "string"
        }
      ]
    }
  }
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
GET
/rest/v1/experiments/{id}/results
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Query Parameters

eventName?string

Optional override for the conversion event name. When omitted, the experiment primary metric event is used.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://app.oursprivacy.com/rest/v1/experiments/string/results"
{
  "variants": [
    {
      "id": "string",
      "name": "Treatment",
      "isControl": false,
      "impressions": 1842,
      "conversions": 213,
      "conversionRate": 0.1156,
      "probabilityToBeBest": 0.87
    }
  ]
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
GET
/rest/v1/experiments/{id}/results-time-series
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Query Parameters

eventName?string

Optional override for the conversion event name. When omitted, the experiment primary metric event is used.

startDate?string

Inclusive lower bound of the response window, as a UTC calendar day in YYYY-MM-DD format. Defaults to the experiment start date when omitted. Values before the experiment started are silently clamped to the experiment start.

Match^\d{4}-\d{2}-\d{2}$
endDate?string

Inclusive upper bound of the response window, as a UTC calendar day in YYYY-MM-DD format. Defaults to the experiment stop date for completed experiments, or today for running experiments. Values after that are silently clamped. The window between startDate and endDate must be 366 days or fewer.

Match^\d{4}-\d{2}-\d{2}$

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://app.oursprivacy.com/rest/v1/experiments/string/results-time-series"
{
  "days": [
    {
      "date": "2026-04-30",
      "variants": [
        {
          "id": "string",
          "impressions": 0,
          "conversions": 0,
          "conversionRate": 0
        }
      ]
    }
  ]
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}

How is this guide?