Get user history

GET /v1/client/user/history

Get User History returns a sorted list of events where the first element is the most recent. It contains up to four different types of events: OPEN, LEAVE, SCREENOUT, COMPLETE.

Events in this response are unique per survey so if a survey was completed, only the complete event is returned and not the corresponding opening. Only non open events contain a duration property. Only screenout and complete events contain a user value property.

Query parameters

  • filter array[string]

    optionally filter by type

    Values are surveys, offers, magic_receipts, or others.

Responses

GET /v1/client/user/history
curl \
 -X GET https://api.bitlabs.ai/v1/client/user/history \
 -H "X-Api-Token: $API_KEY" \
 -H "X-User-Id: $API_KEY"
Response examples (200)
{
  "data": [
    {
      "type": "OPEN",
      "survey_id": 42,
      "details": {
        "category": {
          "name": "string",
          "icon_url": "string",
          "name_internal": "string"
        },
        "network": {
          "name": "string",
          "icon_url": "string"
        }
      },
      "user_value": "string",
      "rating": 42,
      "created_at": "string",
      "duration": "string",
      "reconciled": true,
      "callback_delay_seconds": 42,
      "support_form_url": "support.bitlabs.link/bitburst/survey/contact?user_id={encodedUserId}&survey_id={encodedSurveyId}"
    }
  ]
}
Response examples (406)
{
  "error": {
    "details": {
      "msg": "vpn detected",
      "http": "406 Not Acceptable"
    }
  }
}