Loyi API Reference
  1. Quest
Loyi API Reference
  • Getting Started
  • Architecture
  • User
    • Users Overview
    • Create user
      POST
    • Get users
      GET
    • Get user
      GET
    • Update user
      PUT
    • Delete user
      DELETE
  • Reward
    • Rewards Overview
    • Create reward
      POST
    • Get rewards
      GET
    • Delete reward
      DELETE
    • Create entry pass code
      POST
    • Get entry pass code
      GET
    • Airdrop reward
      PUT
    • Award reward
      POST
    • Redeem rewards
      GET
  • Collection
    • Collection Overview
    • Create collection
    • Get collections
    • Get collection
    • Update collection
    • Delete collection
    • Get rewards
  • Collectible
    • Claim collectible
    • Get collectibles
  • Quest
    • Quest Overview
    • Create quest
      POST
    • Get quests
      GET
    • Get quest
      GET
    • Update quest
      PUT
    • Delete quest
      DELETE
    • Get participants
      GET
    • Accept quest
      POST
    • Submit answers
      POST
    • Get answers
      GET
  • Leaderboard
    • Leaderboard Overview
    • Get leaderboard
  • Leveling
    • Get leveling configuration
    • Configure leveling
    • Get milestone levels
    • Create milestone level
    • Get milestone level
    • Update milestone level
    • Delete milestone level
  1. Quest

Get answers

Staging
https://testserver.loyi.io/public/api
Staging
https://testserver.loyi.io/public/api
GET
/quest/{id}/answers
Quest
Returns user's answers for the quest with the specified ID.

Request

Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Path Params
id
string <uuid>
required
Quest ID
Query Params
userId
string <uuid>
required
User ID
Header Params
Origin
string 
required
The value must be one of the whitelisted domains. You can whitelist domain URLs on your Loyi dashboard.
Default:
<WHITELISTED_URL>
Example:
https://example.com

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://testserver.loyi.io/public/api/quest//answers?userId' \
--header 'Origin;' \
--header 'x-api-key;'

Responses

🟢200OK
application/json
Ok
Body
array of:
questionId
string <uuid>
required
ID of the question that the answer belongs to
choiceId
string <uuid>
optional
ID of the choice that represents the answer
value
string 
optional
Value of the answer.
Example
[
    {
        "questionId": "12345678-1234-1234-1234-123456789012",
        "choiceId": "12345678-1234-1234-1234-123456789013"
    }
]
🟠401Unauthorized
🟠404Record Not Found
Modified at 2025-06-19 21:23:41
Previous
Submit answers
Next
Leaderboard Overview
Built with