v1

latestOpenAPI 3.0.02026-07-2663155142.2 KB
Surveys

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.

get/v2/client/surveys

Query parameters

platform'MOBILE' | 'TABLET' | 'WEB'
Example:MOBILE

Platform/Device type of the user

os'ANDROID' | 'IOS' | 'DESKTOP'
Example:ANDROID

Operating System of the user

sdk'CUSTOM' | 'IFRAME' | 'TAB' | 'NATIVE' | 'UNITY' | 'REACT' | 'FLUTTER'
Example:CUSTOM

SDK the user is using

tagsstring URL-encoded query
Example:key1=value1&key2=value2

Optional set of key-value pairs to be passed back in callbacks. Max 10 pairs with both key and value up to 50 characters long. Keys and values are trimmed and lower-cased. Keys can only contain alphanumeric characters and underscores. Values can contain any characters. If you need to pass sensitive information, note that users can potentially manipulate this data.

bb_trackstring
Example:amp:01HXJKP9VQCMZKZ

Optional cross-provider tracking token for analytics correlation (e.g. comma-separated amp:session_id,other:token). Max 512 characters.

client_ipstring
Example:127.0.0.1

Allows overriding the ip that is used for this request. This feature must be enabled by your account manager!

client_useragentstring
Example:Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0

Allows overriding the useragent that is used for this request. This feature must be enabled by your account manager!

usernamestring
Example:some-name

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.

maidstring

optional mobile advertising id (MAID)

network_blackliststring

optional comma separated list of networks to exclude from the response

algo'UX' | 'QC'

Allows overriding the survey sorting algorithm configured for this app.

emailstring

optional email address of the user

Response

OK

Example response

{
  "data": {
    "restriction_reason": {
      "banned_until": "2020-05-04T17:01:30Z"
    },
    "surveys": [
      {
        "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",
        "cr": 0.42,
        "loi": 5.3,
        "country": "US",
        "language": "en",
        "rating": 4,
        "category": {
          "name": "Automotive",
          "name_internal": "automotive"
        },
        "tags": [
          "pii"
        ]
      }
    ]
  }
}
All 63 operations