experiments
GET
https://linkyhub.net/api/v3 /experiments Scope pages:readA/B tests on the main page, each variant with impressions, conversions and rate.
Code samples
cURL
curl -X GET "https://linkyhub.net/api/v3/experiments" \
-H "Authorization: Bearer $LINKYHUB_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Done.
Example
{
"data": [
{}
]
}Schema
dataobject[]requiredHeaders
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Example
{
"error": "string",
"message": "string"
}Schema
errorstringrequiredA stable code to branch on, e.g. insufficient_scope.
messagestringrequiredA sentence to show a person.
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
POST
https://linkyhub.net/api/v3 /experiments Scope pages:writeStart an A/B test on a block (stopped until started). Both variants begin as the block’s current settings.
Request body
application/json
blockIdstringrequiredThe block id.
namestringrequired{
"blockId": "string",
"name": "string"
}Code samples
cURL
curl -X POST "https://linkyhub.net/api/v3/experiments" \
-H "Authorization: Bearer $LINKYHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"blockId":"string","name":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201 Done.
{}Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /experiments
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
PATCH
https://linkyhub.net/api/v3 /experiments/variants/{variantId} Scope pages:writeChange a variant’s block settings and its share of traffic.
Parameters
variantIdstringpathrequiredRequest body
application/json
settingsobjectrequiredThe full block settings; checked against the block type’s schema.
weightintegerrequired{
"settings": {},
"weight": 0
}Code samples
cURL
curl -X PATCH "https://linkyhub.net/api/v3/experiments/variants/{variantId}" \
-H "Authorization: Bearer $LINKYHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"settings":{},"weight":0}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Done.
{}Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /experiments
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
POST
https://linkyhub.net/api/v3 /experiments/{experimentId}/start Scope pages:writeStart (or resume) showing the variants to visitors.
Parameters
experimentIdstringpathrequiredCode samples
cURL
curl -X POST "https://linkyhub.net/api/v3/experiments/{experimentId}/start" \
-H "Authorization: Bearer $LINKYHUB_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Done.
{}Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /experiments
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
POST
https://linkyhub.net/api/v3 /experiments/{experimentId}/stop Scope pages:writeStop the test; every visitor sees the block as it is.
Parameters
experimentIdstringpathrequiredCode samples
cURL
curl -X POST "https://linkyhub.net/api/v3/experiments/{experimentId}/stop" \
-H "Authorization: Bearer $LINKYHUB_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Done.
{}Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /experiments
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
POST
https://linkyhub.net/api/v3 /experiments/{experimentId}/promote Scope pages:writeMake a variant the block’s real settings and stop the test.
Parameters
experimentIdstringpathrequiredRequest body
application/json
variantIdstringrequiredThe variant id.
{
"variantId": "string"
}Code samples
cURL
curl -X POST "https://linkyhub.net/api/v3/experiments/{experimentId}/promote" \
-H "Authorization: Bearer $LINKYHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"variantId":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Done.
{}Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /experiments
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
DELETE
https://linkyhub.net/api/v3 /experiments/{experimentId} Scope pages:writeDelete a test and its numbers. The block keeps its current settings.
Parameters
experimentIdstringpathrequiredCode samples
cURL
curl -X DELETE "https://linkyhub.net/api/v3/experiments/{experimentId}" \
-H "Authorization: Bearer $LINKYHUB_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Done.
{}Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /experiments
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
Updated