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 quest

Staging
https://testserver.loyi.io/public/api
Staging
https://testserver.loyi.io/public/api
GET
/quest/{id}
Quest
Returns 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
includeTemplate
boolean 
optional
Whether to include the template of the quest.
Example:
false
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/' \
--header 'Origin;' \
--header 'x-api-key;'

Responses

🟢200OK
application/json
Ok
Body
id
string <uuid>
required
publicId
string 
required
title
string 
required
Title of the quest
instruction
string 
required
Instruction text of the quest.
completionMessage
string 
required
Message for the user when the quest is completed.
isActive
boolean 
required
Is the quest active.
Default:
true
type
enum<string> 
required
Type of the quest.
Allowed values:
CollectionQuizQuestionnaire
steps
number 
required
Number of steps in the quest.
rewards
object 
required
points
number 
optional
Points that the user gets for completing the quest.
rewards
array[null (Reward) {3}] 
optional
collections
array[object (Collection) {11}] 
optional
templateId
string <uuid>
required
template
required
One of
Example:
{"id":"12345678-1234-1234-1234-123456789012","collectionIds":["12345678-1234-1234-1234-123456789012"],"createdAt":"2020-01-01T00:00:00.000Z","updatedAt":"2020-01-01T00:00:00.000Z"}
collectionIds
array[string <uuid>]
required
IDs of the collections that are the steps of the quest.
id
string <uuid>
required
createdAt
string <date-time>
required
updatedAt
string <date-time>
required
createdAt
string <date-time>
required
updatedAt
string <date-time>
required
Example
{
    "id": "12345678-1234-1234-1234-123456789012",
    "title": "My Quest",
    "instruction": "My Instruction",
    "completionMessage": "My Completion Message",
    "isActive": true,
    "publicId": "12345678",
    "type": "Collection",
    "steps": 1,
    "rewards": {
        "points": 25,
        "rewards": [
            {
                "id": "123e4567-e89b-12d3-a456-426655440000",
                "title": "Event Entry Pass",
                "description": "An entry pass for the event",
                "instruction": "Show this pass at the event entrance",
                "type": "EntryPass",
                "createdAt": "2022-01-01T00:00:00.000Z",
                "updatedAt": "2022-01-01T00:00:00.000Z"
            }
        ],
        "collections": [
            {
                "id": "123e4567-e89b-12d3-a456-426655440000",
                "publicId": "kdPd_ntE",
                "name": "My Collection",
                "description": "A collection of rewards",
                "image": "https://example.com/image.jpg",
                "amount": 10,
                "collectible": {
                    "imagesURL": "ipfs://example",
                    "metadataURL": "ipfs://example"
                },
                "type": "oneToOne",
                "contractAddress": "0x7B5DF6F27C32cEa2CeF2c4E812c0Ff4d0515B26B",
                "createdAt": "2021-01-01T00:00:00.000Z",
                "updatedAt": "2021-01-01T00:00:00.000Z"
            }
        ]
    },
    "templateId": "12345678-1234-1234-1234-123456789012",
    "template": {
        "collectionIds": [
            "12345678-1234-1234-1234-123456789012"
        ]
    },
    "createdAt": "2021-01-01T00:00:00.000Z",
    "updatedAt": "2021-01-01T00:00:00.000Z"
}
🟠401Unauthorized
🟠404Record Not Found
Modified at 2025-06-19 21:23:41
Previous
Get quests
Next
Update quest
Built with