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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.