# Quests

## The Quest object

***

**id** - *String*

ID of the quest

***

**name** - String

Name of the quest

***

**communityId** - *String*

Your community ID

***

**categoryId** - *String*

Category (module) ID of the quest.

***

**sprintId** - *String*

Sprint ID of the quest

***

**conditions** - *Array of object*

List of conditions that define the user access to a quest. There are five types of conditions:

| Type             | Description                                                          | Value                              | Operators                       |
| ---------------- | -------------------------------------------------------------------- | ---------------------------------- | ------------------------------- |
| role             | Compare a user discord role with the target value                    | Discord Role ID                    | `=`, `!=`                       |
| quest            | Compare the IDs of the quests a user completed with the target value | Quest ID                           | `isCompleted`, `isNotCompleted` |
| date             | Compare the current date with the target value                       | ISO string date                    | `<`, `>`                        |
| nft              | Check if a user hold a NFT                                           | Number of NFT the user should hold | No operators                    |
| level            | Compare a user level with the target value                           | Number                             | `<`, `>`                        |
| twitterFollowers | Compare the number of twitter followers with the target value        | Number                             | `<`,`>`                         |

***

**conditionOperator** - *Enum (OR, AND)*

This field defines the operator that is applied to link each condition. If it's AND, the user need to fulfill all the conditions to access the quest. If it's OR, fulfilling one condition is enough to access the quest.

***

**recurrence** - *Enum (once, daily, weekly, monthly)*

Defines how often a quest can be completed

***

**retryAfter** - *Number*

Number of seconds a user needs to wait after a quest has been failed

***

**rewards** - *Array of objects*

Rewards associated with a quest. There is 3 types of rewards:

| Type  | Description     | Value           |
| ----- | --------------- | --------------- |
| role  | Discord role    | Discord role ID |
| xp    | XP of the quest | Number          |
| other | Custom reward   | String          |

An optional reward method can be associated to a reward:

<table><thead><tr><th>Reward method type</th><th>Description</th><th>Settings</th><th data-hidden></th></tr></thead><tbody><tr><td>all</td><td>Default reward method</td><td></td><td></td></tr><tr><td>fcfs</td><td>First Come First Serve</td><td><code>{max: number, up to 1000}</code></td><td></td></tr><tr><td>raffle</td><td>Raffle</td><td><code>{amount: number, up to 1000}</code></td><td></td></tr></tbody></table>

***

**tasks** - *Array of objects*

This field contains the different tasks that compose the quest. You can learn more about the different types of tasks in our [product documentation](#overview).

***

**description** - *Object*

[TipTap document](https://tiptap.dev/docs/editor/introduction) that describes the quest

***

**autoValidate** - *Boolean*

Boolean that defines if a quest requires a review or is automatically validated. The value of this field is automatically generated depending on the tasks that compose the quest.

***

**deleted** - *Boolean*

Defines if the quest is deleted

***

**claimLimit** - *Number*

Defines if the quest can be claimed a maximum number of times

***

**archived** - *Boolean*

Defines if the quest is archived

***

**published** - *Boolean*

Defines if the quest is visible for the members&#x20;

***

## API Reference

{% content-ref url="/pages/r0OLZHtOCCdMZcDsj6Oo" %}
[Create quest](/api-reference/quests/create-quest.md)
{% endcontent-ref %}

{% content-ref url="/pages/QSVMEUJJLFC9YyVcAIt2" %}
[Update quest](/api-reference/quests/update-quest.md)
{% endcontent-ref %}

{% content-ref url="/pages/SDsyhIQqEJPsXHG81wTW" %}
[List quests](/api-reference/quests/list-quests.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zealy.io/api-reference/quests.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
