MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our public API.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_ACCESS_TOKEN}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your API Key by visiting Team settings -> API Keys and clicking the Create button.

To generate an access token, make a POST request to the /oauth/token endpoint with the authentication request.

Example request:

POST /oauth/token
{
    "grant_type": "client_credentials",
    "client_id": "Team's Client ID",
    "client_secret": "Team's API Key",
    "scope": "*"
}

Public API

GET papi/clients

requires authentication

Example request:
curl --request GET \
    --get "http://app.varify.io/papi/clients" \
    --header "Authorization: Bearer {YOUR_ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://app.varify.io/papi/clients"
);

const headers = {
    "Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
 

{
    "message": "Unauthenticated."
}
 

Request      

GET papi/clients

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

GET papi/experiments

requires authentication

Example request:
curl --request GET \
    --get "http://app.varify.io/papi/experiments" \
    --header "Authorization: Bearer {YOUR_ACCESS_TOKEN}" \
    --header "X-Client-Id: 1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"page_id\": 19,
    \"order_by\": \"deleniti\",
    \"order_direction\": \"desc\",
    \"filter_by_status\": \"initial\",
    \"filter_by_name\": \"aut\",
    \"per_page\": 12
}"
const url = new URL(
    "http://app.varify.io/papi/experiments"
);

const headers = {
    "Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
    "X-Client-Id": "1",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "page_id": 19,
    "order_by": "deleniti",
    "order_direction": "desc",
    "filter_by_status": "initial",
    "filter_by_name": "aut",
    "per_page": 12
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
 

{
    "message": "Unauthenticated."
}
 

Request      

GET papi/experiments

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

X-Client-Id      

Example: 1

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

page_id   integer  optional  

Example: 19

order_by   string  optional  

Example: deleniti

order_direction   string  optional  

Example: desc

Must be one of:
  • asc
  • desc
filter_by_status   string  optional  

Example: initial

Must be one of:
  • initial
  • active
  • paused
  • archived
filter_by_name   string  optional  

Example: aut

per_page   integer  optional  

Example: 12

POST papi/experiments

requires authentication

Example request:
curl --request POST \
    "http://app.varify.io/papi/experiments" \
    --header "Authorization: Bearer {YOUR_ACCESS_TOKEN}" \
    --header "X-Client-Id: 1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"page\": {
        \"name\": \"gsjiqdmdacj\",
        \"url\": \"http:\\/\\/pfannerstill.info\\/nobis-consequatur-totam-consequatur-veritatis.html\"
    },
    \"name\": \"hxheutbenddstnqvtibjv\",
    \"tracking_enabled\": false,
    \"ga4_audience_id\": \"twtkqmagurrfmqohjduv\",
    \"url_targeting\": {
        \"condition\": \"any\",
        \"routes\": [
            {
                \"route\": \"etgakha\",
                \"match_type\": \"contains\"
            }
        ]
    },
    \"variations\": [
        {
            \"name\": \"oozigctcperifnbxytvbgr\",
            \"traffic_allocation\": 1,
            \"javascript\": \"quidem\",
            \"javascript_reset\": \"dolore\",
            \"css\": \"repellat\",
            \"redirect_url\": \"http:\\/\\/kuphal.biz\\/qui-placeat-et-libero-id-nam-quo\",
            \"ga4_audience_id\": \"keu\"
        }
    ]
}"
const url = new URL(
    "http://app.varify.io/papi/experiments"
);

const headers = {
    "Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
    "X-Client-Id": "1",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "page": {
        "name": "gsjiqdmdacj",
        "url": "http:\/\/pfannerstill.info\/nobis-consequatur-totam-consequatur-veritatis.html"
    },
    "name": "hxheutbenddstnqvtibjv",
    "tracking_enabled": false,
    "ga4_audience_id": "twtkqmagurrfmqohjduv",
    "url_targeting": {
        "condition": "any",
        "routes": [
            {
                "route": "etgakha",
                "match_type": "contains"
            }
        ]
    },
    "variations": [
        {
            "name": "oozigctcperifnbxytvbgr",
            "traffic_allocation": 1,
            "javascript": "quidem",
            "javascript_reset": "dolore",
            "css": "repellat",
            "redirect_url": "http:\/\/kuphal.biz\/qui-placeat-et-libero-id-nam-quo",
            "ga4_audience_id": "keu"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST papi/experiments

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

X-Client-Id      

Example: 1

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

page   object   
name   string  optional  

Must not be greater than 255 characters. Example: gsjiqdmdacj

url   string   

Example: http://pfannerstill.info/nobis-consequatur-totam-consequatur-veritatis.html

name   string   

Must not be greater than 255 characters. Example: hxheutbenddstnqvtibjv

tracking_enabled   boolean   

Example: false

ga4_audience_id   string  optional  

Must not be greater than 255 characters. Example: twtkqmagurrfmqohjduv

url_targeting   object   
condition   string  optional  

This field is required when url_targeting is present. Example: any

Must be one of:
  • any
  • none
routes   object[]   
route   string   

Must not be greater than 1000 characters. Example: etgakha

match_type   string   

Example: contains

Must be one of:
  • simple
  • regex
  • contains
  • exact
variations   object[]   
name   string   

Must not be greater than 255 characters. Example: oozigctcperifnbxytvbgr

traffic_allocation   integer   

Must be between 0 and 100. Example: 1

extensions   object  optional  
javascript   string  optional  

Example: quidem

javascript_reset   string  optional  

Example: dolore

css   string  optional  

Example: repellat

changesets   object  optional  
redirect_url   string  optional  

Must not be greater than 255 characters. Example: http://kuphal.biz/qui-placeat-et-libero-id-nam-quo

ga4_audience_id   string  optional  

Must not be greater than 255 characters. Example: keu

GET papi/experiments/{experimentId}

requires authentication

Example request:
curl --request GET \
    --get "http://app.varify.io/papi/experiments/70" \
    --header "Authorization: Bearer {YOUR_ACCESS_TOKEN}" \
    --header "X-Client-Id: 1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://app.varify.io/papi/experiments/70"
);

const headers = {
    "Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
    "X-Client-Id": "1",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
 

{
    "message": "Unauthenticated."
}
 

Request      

GET papi/experiments/{experimentId}

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

X-Client-Id      

Example: 1

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

experimentId   string   

Example: 70

PATCH papi/experiments/{experimentId}

requires authentication

Example request:
curl --request PATCH \
    "http://app.varify.io/papi/experiments/5" \
    --header "Authorization: Bearer {YOUR_ACCESS_TOKEN}" \
    --header "X-Client-Id: 1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"page\": {
        \"name\": \"vmjibugizdwnh\",
        \"url\": \"https:\\/\\/wilkinson.com\\/quam-deserunt-eum-atque-ullam-deleniti-porro-sequi-quae.html\"
    },
    \"name\": \"dewxvzjztlvicftghxqba\",
    \"tracking_enabled\": false,
    \"ga4_audience_id\": \"mnbdemqtglsnpnldaz\",
    \"url_targeting\": {
        \"condition\": \"none\",
        \"routes\": [
            {
                \"id\": 7,
                \"route\": \"jwugqhtogywcnvjsdz\",
                \"match_type\": \"regex\"
            }
        ]
    },
    \"variations\": [
        {
            \"id\": 18,
            \"name\": \"xvtgacor\",
            \"traffic_allocation\": 1,
            \"javascript\": \"temporibus\",
            \"javascript_reset\": \"et\",
            \"css\": \"necessitatibus\",
            \"redirect_url\": \"https:\\/\\/www.larkin.info\\/et-sunt-non-molestias-id-et-quo\",
            \"ga4_audience_id\": \"fxygunbtorzd\"
        }
    ]
}"
const url = new URL(
    "http://app.varify.io/papi/experiments/5"
);

const headers = {
    "Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
    "X-Client-Id": "1",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "page": {
        "name": "vmjibugizdwnh",
        "url": "https:\/\/wilkinson.com\/quam-deserunt-eum-atque-ullam-deleniti-porro-sequi-quae.html"
    },
    "name": "dewxvzjztlvicftghxqba",
    "tracking_enabled": false,
    "ga4_audience_id": "mnbdemqtglsnpnldaz",
    "url_targeting": {
        "condition": "none",
        "routes": [
            {
                "id": 7,
                "route": "jwugqhtogywcnvjsdz",
                "match_type": "regex"
            }
        ]
    },
    "variations": [
        {
            "id": 18,
            "name": "xvtgacor",
            "traffic_allocation": 1,
            "javascript": "temporibus",
            "javascript_reset": "et",
            "css": "necessitatibus",
            "redirect_url": "https:\/\/www.larkin.info\/et-sunt-non-molestias-id-et-quo",
            "ga4_audience_id": "fxygunbtorzd"
        }
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH papi/experiments/{experimentId}

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

X-Client-Id      

Example: 1

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

experimentId   string   

Example: 5

Body Parameters

page   object  optional  
name   string  optional  

Must not be greater than 255 characters. Example: vmjibugizdwnh

url   string  optional  

Example: https://wilkinson.com/quam-deserunt-eum-atque-ullam-deleniti-porro-sequi-quae.html

name   string  optional  

Must not be greater than 255 characters. Example: dewxvzjztlvicftghxqba

tracking_enabled   boolean  optional  

Example: false

ga4_audience_id   string  optional  

Must not be greater than 255 characters. Example: mnbdemqtglsnpnldaz

url_targeting   object   
condition   string  optional  

Example: none

Must be one of:
  • any
  • none
routes   object[]   
id   integer  optional  

Example: 7

route   string  optional  

This field is required when url_targeting.routes.*.id is not present. Must not be greater than 1000 characters. Example: jwugqhtogywcnvjsdz

match_type   string  optional  

This field is required when url_targeting.routes.*.id is not present. Example: regex

Must be one of:
  • simple
  • regex
  • contains
  • exact
variations   object[]  optional  
id   integer  optional  

Example: 18

name   string  optional  

This field is required when variations.*.id is not present. Must not be greater than 255 characters. Example: xvtgacor

traffic_allocation   integer  optional  

This field is required when variations.*.id is not present. Must be between 0 and 100. Example: 1

extensions   object  optional  
javascript   string  optional  

Example: temporibus

javascript_reset   string  optional  

Example: et

css   string  optional  

Example: necessitatibus

changesets   object  optional  
redirect_url   string  optional  

Must not be greater than 255 characters. Example: https://www.larkin.info/et-sunt-non-molestias-id-et-quo

ga4_audience_id   string  optional  

Must not be greater than 255 characters. Example: fxygunbtorzd

POST papi/experiments/{experimentId}/status

requires authentication

Example request:
curl --request POST \
    "http://app.varify.io/papi/experiments/7976/status" \
    --header "Authorization: Bearer {YOUR_ACCESS_TOKEN}" \
    --header "X-Client-Id: 1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"initial\"
}"
const url = new URL(
    "http://app.varify.io/papi/experiments/7976/status"
);

const headers = {
    "Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
    "X-Client-Id": "1",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "status": "initial"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST papi/experiments/{experimentId}/status

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

X-Client-Id      

Example: 1

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

experimentId   string   

Example: 7976

Body Parameters

status   string   

Example: initial

Must be one of:
  • initial
  • active
  • paused
  • archived

POST papi/experiments/{experimentId}/duplicate

requires authentication

Example request:
curl --request POST \
    "http://app.varify.io/papi/experiments/6/duplicate" \
    --header "Authorization: Bearer {YOUR_ACCESS_TOKEN}" \
    --header "X-Client-Id: 1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://app.varify.io/papi/experiments/6/duplicate"
);

const headers = {
    "Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
    "X-Client-Id": "1",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST papi/experiments/{experimentId}/duplicate

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

X-Client-Id      

Example: 1

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

experimentId   string   

Example: 6

POST papi/experiments/{experimentId}/traffic-allocation

requires authentication

Example request:
curl --request POST \
    "http://app.varify.io/papi/experiments/2/traffic-allocation" \
    --header "Authorization: Bearer {YOUR_ACCESS_TOKEN}" \
    --header "X-Client-Id: 1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"variations\": [
        {
            \"id\": 11,
            \"value\": 10
        }
    ]
}"
const url = new URL(
    "http://app.varify.io/papi/experiments/2/traffic-allocation"
);

const headers = {
    "Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
    "X-Client-Id": "1",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "variations": [
        {
            "id": 11,
            "value": 10
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST papi/experiments/{experimentId}/traffic-allocation

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

X-Client-Id      

Example: 1

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

experimentId   string   

Example: 2

Body Parameters

variations   object[]  optional  
id   integer   

Example: 11

value   integer   

Example: 10

POST papi/experiments/{experiment_id}/toggle-tracking

requires authentication

Example request:
curl --request POST \
    "http://app.varify.io/papi/experiments/1/toggle-tracking" \
    --header "Authorization: Bearer {YOUR_ACCESS_TOKEN}" \
    --header "X-Client-Id: 1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://app.varify.io/papi/experiments/1/toggle-tracking"
);

const headers = {
    "Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
    "X-Client-Id": "1",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST papi/experiments/{experiment_id}/toggle-tracking

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

X-Client-Id      

Example: 1

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

experiment_id   integer   

The ID of the experiment. Example: 1