Skip to main content

Get quests

The endpoint to retrieve a list of quests for your game.

GET /v1/projects/{projectId}/quests?topics[]={topicTitle}&visibility={visibilityTitle}&status={questStatus}

Parameters

  • projectId (string): The ID of your project.
  • topics: A list of topics to filter by. Quests that match any of the specified topics will be returned.
  • visibility: The visibility of the quests to retrieve. Valid values are public, hidden, or all. Default value is public.
  • status: The status of the quests to retrieve. Valid values are active, completed, or all. Default value is active.

Response

The API will respond with a JSON object containing an array of quest objects. Each quest object contains information about the quest, such as its ID, name, description, and reward.

{
"data": [
{
"id": "bb2979e7-4c36-449a-9bb4-6457cb9151e9",
"projectId": "eaefa60e-f894-4ff1-a89d-817925d06820",
"name": "quest test",
"shortDescription": "test quest",
"description": "full description",
"logo": "https://example.com/ffff-ffff-ffff-ffff.jpg",
"sprite": "https://example.com/ffff-ffff-ffff-ffff.jpg",
"difficulty": "easy",
"visibility": "public",
"topics": [
{
"id": "2a41f135-8c59-4e14-95bd-f7a379fedf4f",
"title": "tag1"
},
{
"id": "74048a03-f24c-46d3-9f58-a168653a7402",
"title": "tag2"
}
],
"completionsLimit": 1,
"startDate": "2023-04-06",
"endDate": "2023-04-07",
"availableRegions": [
1,
2
],
"isDraft": false,
"trigger": {
"logicalOperator": "AND",
"conditions": [
{
"id": "decbb64d-603d-45e9-a243-efc064d757b6",
"questId": "bb2979e7-4c36-449a-9bb4-6457cb9151e9",
"title": "EDIT_ARTICLE",
"eventName": "EDIT_ARTICLE",
"hasBeenPerformed": true,
"amount": 10,
"within": 7,
"rangeType": "ever",
"range": "days"
}
]
},
"rewards": [
{
"id": "2c8c06a0-e4a6-4db2-b206-8e8ff4ee785c",
"rewardId": "ffff-ffff-ffff-ffff",
"quantity": 1,
"claimType": "AUTO",
"rewardType": "VIRTUAL_CURRENCY"
},
{
"id": "b4805830-82fe-4273-a803-f39ce467300b",
"rewardId": "1fff-ffff-ffff-ffff",
"quantity": 1,
"claimType": "AUTO",
"rewardType": "VIRTUAL_ITEM"
}
],
"webhooks": [
{
"id": "0f24f982-3577-4399-a17d-baed62204473",
"url": "example.com"
}
],
"metadata": {
"custom_key_1": "custom_value",
"custom_key_2": "custom_value"
},
"createdAt": "2023-04-03T13:50:46.260Z",
"updatedAt": "2023-04-03T13:50:46.260Z",
"status": "active"
}
],
"page": 0,
"perPage": 0,
"total": 0,
"pageCount": 0,
"hasPreviousPage": true,
"hasNextPage": true
}