Get Actions Deprecated

GET /v1/client/actions

Get Actions is the main endpoint that returns the next actions a user can perform. This can be a list of surveys the user can open or qualifications (i.e. questions) the user still has to answer before we can return more surveys.

If surveys are returned, they are ordered by what we think is the best value for the user. To join a survey, use the link property of this reponse and open it in a browser. The user will be redirected from there. When a survey is completed or a screenout happend, the user is redirected to the sites you specified on your app's dashboard.

If a qualification is returned the user can answer it to potentially get more surveys. This endpoint returns all information to display the question to the user. To answer it, look at POST /client/networks/{networkId}/questions/{questionId}. After answering a question, call the Actions endpoint again to get updated results.

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.

  • optional fingerprint for survey filtering

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

  • ufm boolean

    For internal usage only. Triggers user friendly api mode.

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • data Actions
      Hide data attributes Show data attributes
      • is_new_user boolean Required

        Is true until the user joins their first survey.

      • start_bonus ActionsStartBonus
        Hide start_bonus attribute Show start_bonus attribute
      • restriction_reason ActionsRestrictionReason
        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 ActionsSurvey
        • network_id integer Required

          ID of the network. Required in survey specific requests.

        • id integer(int64) Required

          ID of the survey. Required in survey specific requests. This int is represented as a string because it may become an int64 at some point.

        • country string(ISO 3166-1 alpha-2) Required
        • language string(ISO 639-1) Required

          Some surveys may have 'xx' as their language. This is a valid code in our case and indicates that the survey is available for all languages in the given country.

        • cpi string Required

          CPI of this survey in USD without any formatting applied.

        • value string Required

          CPI formatted according to your app settings. Can be shown to the user directly.

        • loi number(float) Required

          Assumed length of the survey in minutes

        • remaining integer Required

          Amount of users that can still open the survey

        • details ActionsSurveyDetails Required
          Hide details attributes Show details attributes
          • category ActionsSurveyDetailsCategory 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 ActionsSurveyDetailsNetwork 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.

        • rating integer Required

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

          Minimum value is 1, maximum value is 5.

        • tags array[string] Required

          recontact = this is a follow-up survey for specific users that completed a different survey before; pii = this survey might collect sensitive information from the user; recruitment = an offer recruiting users for external use;

          Values are recontact, pii, or recruitment.

        • test_group_id integer Required
        • score number(float) Required

          The survey's score determined by the ranking algorithm.

        • sequence integer Required

          The index of this action item in spacial relation to all other action items. Can be used to order surveys and qualifications.

        • The amount of questions that have to be answered before the survey is guaranteed to be openable by the user. If the number is larger than zero, next_missing_question contains the next question to ask the user. This property might be unpopulated if the feature is not enabled for your app.

        • Hide next_missing_question attributes Show next_missing_question attributes
          • network_id integer Required

            ID of the network. Required in question specific requests. 0 in this case is a valid network_id can be passed to our servers for getting/answering questions.

          • id string Required

            The id of the question the user has to answer. Note that this is a string not an integer!

          • country string(ISO 3166-1 alpha-2) Required
          • language string(ISO 639-1) Required
          • type string Required

            Values are TEXT, SINGLE, MULTI, NUMBER, or DATE.

          • localized_text string Required
          • answers array[object] Required
            Hide answers attributes Show answers attributes QuestionAnswer
          • can_skip boolean Required
          • is_duplicate boolean Required

            Indicates if a similar question was already asked to the user.

      • qualification ActionsQualification
        Hide qualification attributes Show qualification attributes
        • network_id integer Required

          ID of the network. Required in question specific requests. 0 in this case is a valid network_id can be passed to our servers for getting/answering questions.

        • question_id string Required

          The id of the question the user has to answer. Note that this is a string not an integer!

        • country string(ISO 3166-1 alpha-2) Required
        • language string(ISO 639-1) Required
        • question Question Required
          Hide question attributes Show question attributes
          • network_id integer Required

            ID of the network. Required in question specific requests. 0 in this case is a valid network_id can be passed to our servers for getting/answering questions.

          • id string Required

            The id of the question the user has to answer. Note that this is a string not an integer!

          • country string(ISO 3166-1 alpha-2) Required
          • language string(ISO 639-1) Required
          • type string Required

            Values are TEXT, SINGLE, MULTI, NUMBER, or DATE.

          • localized_text string Required
          • answers array[QuestionAnswer] Required
            Hide answers attributes Show answers attributes QuestionAnswer
          • can_skip boolean Required
          • is_duplicate boolean Required

            Indicates if a similar question was already asked to the user.

        • is_standard_profile boolean Required

          Flag is true if this question is asked because of our standard user profile that is asked for every user before we can filter surveys.

        • is_start_bonus boolean Required

          Flag is true if this is part of the questions being asked until the user receives their start bonus reward.

        • score number(float) Required

          The score of the question's survey, determined by the ranking algorithm.

        • sequence integer Required

          The index of this action item in spacial relation to all other action items. Can be used to order surveys and qualifications.

GET /v1/client/actions
curl \
 -X GET https://api.bitlabs.ai/v1/client/actions \
 -H "X-Api-Token: $API_KEY" \
 -H "X-User-Id: $API_KEY"
Response examples (200)
{
  "data": {
    "is_new_user": true,
    "start_bonus": {
      "reward": "string"
    },
    "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,
        "country": "string",
        "language": "string",
        "cpi": "string",
        "value": "string",
        "loi": 42.0,
        "remaining": 42,
        "details": {
          "category": {
            "name": "string",
            "icon_url": "string",
            "name_internal": "string"
          },
          "network": {
            "name": "string",
            "icon_url": "string"
          },
          "difficulty": "EASY"
        },
        "rating": 42,
        "tags": [
          "recontact"
        ],
        "test_group_id": 42,
        "link": "string",
        "score": 42.0,
        "sequence": 42,
        "missing_questions": 42,
        "next_missing_question": {
          "network_id": 42,
          "id": "string",
          "country": "US",
          "language": "en",
          "type": "TEXT",
          "localized_text": "string",
          "answers": [
            {
              "code": "string",
              "localized_text": "string"
            }
          ],
          "can_skip": true,
          "is_duplicate": true
        }
      }
    ],
    "qualification": {
      "network_id": 42,
      "question_id": "string",
      "country": "US",
      "language": "en",
      "question": {
        "network_id": 42,
        "id": "string",
        "country": "US",
        "language": "en",
        "type": "TEXT",
        "localized_text": "string",
        "answers": [
          {
            "code": "string",
            "localized_text": "string"
          }
        ],
        "can_skip": true,
        "is_duplicate": true
      },
      "is_standard_profile": true,
      "is_start_bonus": true,
      "score": 42.0,
      "sequence": 42
    }
  }
}