Get Surveys
Returns a list of surveys that are available for the current user. This is the endpoint that should be used to display surveys to the user. If a simple integration flow is desired, this is the only endpoint that must be implemented. Redirecting to the click_url
property of the returned surveys will open the survey in the BitLabs.
Query parameters
-
Platform/Device type of the user
Values are
MOBILE
,TABLET
, orWEB
. -
Operating System of the user
Values are
ANDROID
,IOS
, orDESKTOP
. -
sdk string
SDK the user is using
Values are
CUSTOM
,IFRAME
,TAB
,NATIVE
,UNITY
,REACT
, orFLUTTER
. -
client_country string(ISO 3166-1 alpha-2)
Allows overriding the country that is used for this request. This feature must be enabled by your account manager! If set, all other
client_
parameters must be set as well. -
client_ip string
Allows overriding the ip that is used for this request. This feature must be enabled by your account manager! If set, all other
client_
parameters must be set as well. -
client_useragent string
Allows overriding the useragent that is used for this request. This feature must be enabled by your account manager! If set, all other
client_
parameters must be set as well. -
username string
Allows specifying a display name for the requesting user which is used for features such as the leaderboard. Nothing happens if it is not set. Only alpha-numeric characters are allowed.
-
maid string
optional mobile advertising id (MAID)
-
network_blacklist string
optional comma separated list of networks to exclude from the response
-
algo string
Allows overriding the survey sorting algorithm configured for this app.
Values are
UX
orQC
.
curl \
-X GET https://api.bitlabs.ai/v2/client/surveys \
-H "X-Api-Token: $API_KEY" \
-H "X-User-Id: $API_KEY"
{
"data": {
"restriction_reason": {
"not_verified": true,
"using_vpn": true,
"banned_until": "2020-05-04T17:01:30Z",
"reason": "string",
"unsupported_country": "string"
},
"surveys": [
{
"id": "string",
"type": "survey",
"click_url": "https://api.bitlabs.ai/v2/client/clicks?s=8689b6c0-e2ee-4321-a3ed-426739bc262f&i=96c1edd5-ece2-42f1-9927-405718e6dfbc",
"cpi": "1.2",
"value": "120",
"loi": 5.3,
"country": "US",
"language": "en",
"rating": 4,
"category": {
"name": "Automotive",
"icon_name": "string",
"icon_url": "string",
"name_internal": "automotive"
},
"tags": [
"pii"
]
}
]
}
}