Skip to content

Get All Responses of a Quiz

Retrieve all submitted responses for a specific quiz within a namespace.


Overview

This endpoint returns a comprehensive list of all responses submitted for a particular quiz, including user information and quiz details. It supports pagination for handling large response sets.

Method: GET
Endpoint:
/api/v1/namespaces/:namespaceId/quizzes/:quizId/answers

Requires authentication with admin privileges for the namespace.


Request

Headers

http
x-api-key: {your_api_key}  # Required
Content-Type: application/json

Path Parameters

ParameterTypeRequiredDescription
namespaceIdstringNamespace unique ID
quizIdstringQuiz unique ID

Query Parameters

ParameterTypeRequiredDescription
pageIdstringPage identifier for pagination
isDemobooleanFlag for demo mode access

Response

json
{
  "users": [
    {
      "id": "anon_HLnU6t9IdMc0jNW0qByP",
      "uuid": "anon_HLnU6t9IdMc0jNW0qByP",
      "anonymous": true,
      "lastActivityDate": {
        "_seconds": 1753477352,
        "_nanoseconds": 416000000
      }
    }
  ],
  "quizes": {
    "HKhDZ1gnaD3jPS6sUOrY": {
      "id": "HKhDZ1gnaD3jPS6sUOrY",
      "name": "Age Demographics Survey",
      "createdOn": 1753477258184,
      "start": 1753490400000,
      "end": 1753708800000,
      "customCTA": {},
      "customCTAs": {},
      "customRecommendationCard": {},
      "customIntroScreen": {
        "customLogoUrl": null
      },
      "customOutroScreen": {},
      "answeringUserCount": 0,
      "lastResponseDate": {
        "_seconds": 1753477902,
        "_nanoseconds": 693000000
      },
      "anonUserCount": 2,
      "completedAnonUserCount": 2,
      "anonymous": true,
      "inapp": false,
      "fhscore": true,
      "disableEmailing": false,
      "status": "queued",
      "emailedOn": null,
      "wasReminded": false,
      "lastDfUpdate": {
        "_seconds": 1753477501,
        "_nanoseconds": 140000000
      }
    }
  },
  "answers": {
    "HKhDZ1gnaD3jPS6sUOrY-anon_HLnU6t9IdMc0jNW0qByP": {
      "id": "HKhDZ1gnaD3jPS6sUOrY-anon_HLnU6t9IdMc0jNW0qByP",
      "userId": "anon_HLnU6t9IdMc0jNW0qByP",
      "quizId": "HKhDZ1gnaD3jPS6sUOrY",
      "activityDate": {
        "_seconds": 1753477352,
        "_nanoseconds": 416000000
      },
      "qAnswers": {
        "fhn1": "4b7e6d70-fd93-494a-874d-ea783f825289",
        "fhn2": "4acca62e-7160-4261-b02b-94100f8199ba",
        "fhn3": "4df0242d-9c85-4ab2-9ed8-5218e66fe01e",
        "fhn4": "98d76c2e-00bb-4eef-9184-a89a7b764898",
        "fhn5": "f327a7a8-6ea3-4f4d-8991-930bdfff4e86",
        "fhn6": "e5f738e0-9352-4f1a-ab73-0367d7681480",
        "fhn7": "8ca52d7a-32d8-4bcc-85f7-9a69ce4948e7",
        "fhn8": "43df430a-95d5-47e7-8e7b-ae8ec6e71e4a",
        "age": "a691e182-ca65-4463-8674-786e2f1aa75b"
      },
      "isCompleted": true,
      "completionStatus": 3,
      "isAnonymous": true,
      "score": 61,
      "spend_score": 100,
      "save_score": 75,
      "borrow_score": 50,
      "plan_score": 20,
      "customData": ""
    }
  },
  "nextPageId": null,
  "prevPageId": null
}

Error Responses

  • 500 Internal Server Error – If the quiz does not exist
json
{
  "error": "quiz does not exist"
}

Other possible errors:

  • Quiz not found
  • Namespace not found
  • Unauthorized access

Authorization Requirements

This endpoint requires authentication with one of the following permissions:

  • System administrator
  • Namespace administrator
  • Demo mode access

HR viewer role is explicitly denied access to this endpoint.