Get Surveys Deprecated

GET /v1/client/surveys

Returns a list of surveys the user might be able to open. When redirecting the user to the link of one of the surveys, they will either be redirected to that survey or face pre-qualification questions to determine if they fit.

Query parameters

  • platform string Deprecated

    Platform/Device type of the user

    Values are MOBILE, TABLET, or WEB.

  • os string Deprecated

    Operating System of the user

    Values are ANDROID, IOS, or DESKTOP.

  • sdk string

    SDK the user is using

    Values are CUSTOM, IFRAME, TAB, NATIVE, UNITY, REACT, or FLUTTER.

  • 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!

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

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

  • 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.

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • data object
      Hide data attributes Show data attributes
      • Hide restriction_reason attributes Show restriction_reason attributes
        • The publisher account that owns this app has not been verified and therefore cannot receive surveys.

        • using_vpn boolean

          The user is using a VPN and cannot access surveys. This is the only endpoint that does not return HTTP 406 in this case.

        • banned_until string(RFC3339)

          It can happen that we ban users temporarily if we deem necessary. The time is in RFC3339 and represents the end of the ban.

        • reason string

          A translated reason for the ban.

        • In case users from a country that we do not offer surveys for are trying to access this endpoint.

      • surveys array[object] Required
        Hide surveys attributes Show surveys attributes object
        • network_id integer Required

          ID of the network. Required in survey specific requests.

        • id integer(int64) Required

          ID of the survey. Only unique per network_id.

        • language string(ISO 639-1) Required
        • cpi string Required

          CPI of this survey in USD without any formatting applied.

        • loi number(float) Required

          Assumed length of the survey in minutes

        • remaining integer Required

          Amount of users that can still open the survey

        • rating integer Required

          Difficulty ranking of this survey. 1-5 (1 = hard, 5 = easy)

          Minimum value is 1, maximum value is 5.

        • missing_questions integer Required
        • details object Required
          Hide details attributes Show details attributes
          • category object Required
            Hide category attributes Show category attributes
            • name string Required

              Localized category name

            • icon_url string Required

              If not empty: url to an icon for the cateogry.

            • name_internal string Required

              Internal, unlocalized, machine-friendly name of the category

          • network object Required
            Hide network attributes Show network attributes
            • name string Required

              Displayable name of the network the survey came from

            • icon_url string Required

              If not empty: url to an icon for the network.

          • difficulty string Required Deprecated

            Is the difficulty rating for this survey

            Values are EASY, MEDIUM, or HARD.

GET /v1/client/surveys
curl \
 -X GET https://api.bitlabs.ai/v1/client/surveys \
 -H "X-Api-Token: $API_KEY" \
 -H "X-User-Id: $API_KEY"
Response examples (200)
{
  "data": {
    "restriction_reason": {
      "not_verified": true,
      "using_vpn": true,
      "banned_until": "2020-05-04 17:01:30 UTC",
      "reason": "string",
      "unsupported_country": "string"
    },
    "surveys": [
      {
        "network_id": 42,
        "id": 42,
        "language": "string",
        "cpi": "string",
        "loi": 42.0,
        "remaining": 42,
        "rating": 42,
        "link": "string",
        "missing_questions": 42,
        "details": {
          "category": {
            "name": "string",
            "icon_url": "string",
            "name_internal": "string"
          },
          "network": {
            "name": "string",
            "icon_url": "string"
          },
          "difficulty": "EASY"
        }
      }
    ]
  }
}