# Introduction

Welcome to the Zealy Developer Documentation! Here, you'll discover comprehensive resources on leveraging the Zealy API.

Whether you're crafting simple automation or developing full-scale integrations, our guides and references are designed to support the creation and enhancement of your projects.

Dive in to unlock the potential of Zealy's API for your tools and applications.


# Authentication

{% hint style="info" %}
The API endpoints require a `subdomain` in the path. The subdomain is last part of a community url.&#x20;

For example in <https://zealy.io/cw/join> the subdomain is **join**
{% endhint %}

{% hint style="warning" %}
Some endpoints use the [ api-v1.zealy.io](< https://api-v1.zealy.io>) domain and not the [api-v2.zealy.io](https://api-v2.zealy.io)
{% endhint %}

The Zealy API uses API keys to authenticate requests. You can view and manage your API keys in the settings of your community.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

All API requests must be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure). Calls made over plain HTTP will fail. API requests without authentication will also fail.

During the API key creation process, you need to define the scope of access for each key: either 'read-only', which can only access GET endpoints or 'read/write' that have full access to all available endpoints. Choose the level that best suits the needs of your application or integration, bearing in mind the principle of least privilege to minimize potential security risks.

The API key needs to be forwarded in the `x-api-key` header. Here is an example with axios in NodeJs.

```javascript
await axios.get(
 "https://api-v2.zealy.io/api/communities/join/users/d353db69-137f-41df-b5f3-7b1d1e3d52bb",
  {
   headers: {
    "x-api-key": "c9b27evEJqYf1lvvU7ADFHHwiso"
   }
  })

```


# Use cases

Our platform is an open canvas for your ideas. We've sketched out a few common uses, but the most impactful applications are likely yet to be discovered by you.

Here are a few starting points:

* Integrate the leaderboard into your app
* Streamline review processes
* Analyze and combine our data with yours for deeper insights
* Reward users with XP on Zealy for engaging with your product
* Unlock features in your product based on Zealy XP levels


# Rate limits

{% hint style="info" %}
If you are looking for SLA or higher rate limits, please contact <louis@zealy.io> and get more details about our premium plans.
{% endhint %}

Our API enforces a rate limit of 50 requests per second (RPS) to ensure fair usage and maintain system stability. To optimize your API usage and stay within these limits, we highly recommend implementing caching strategies when it's possible.

Caching allows you to store frequently accessed data temporarily, reducing the need to make repetitive API calls. This not only helps you adhere to the rate limit but also speeds up your application's response time!

Zealy offers [webhooks](https://zealy.io/docs/integrations/webhooks) for various event types, serving as an efficient alternative to some API calls. They can also help you refresh your cache—like updating a cached leaderboard when a quest is completed—enhancing the user experience in your application.


# Pagination

Some endpoints use pagination. Those endpoints will respond to an initial request with the first page of results, and provide a `nextCursor` in the response.\
\
To get the next page, you need to provide the `nextCursor` to the request, in the cursor query param.

To receive all results, this process can be repeated until no `nextCursor` is included in the response.


# FAQ

<details>

<summary>Do you have case study about the API?</summary>

We will add more but you can find a few examples of successful usage of the API here: <https://blog.zealy.io/how-to-make-zealy-part-of-the-user-journey/>

</details>

<details>

<summary><strong>What are the rate limits?</strong></summary>

You are limited to 50 requests per second. Higher rate limits are part of our enterprise plans, for more info please reach out to us through Intercom.

</details>

<details>

<summary><strong>Are there SDKs or libraries available?</strong></summary>

No not yet, but feel free to create one :)

</details>

<details>

<summary><strong>Is there a developer support?</strong></summary>

We provide customer support through Intercom for all paying customers. Only Enterprise customers get personalized developer support via Telegram.

</details>

<details>

<summary><strong>Are there webhook capabilities?</strong></summary>

Yes, check our docs here: <https://zealy.io/docs/integrations/webhooks>

</details>

<details>

<summary>Are you providing SLA?</summary>

SLAs are included in our enterprise plans. For more details, please reach out to us through Intercom.

</details>


# Communities

{% content-ref url="/pages/qOCsTbej6dkewkTizaNa" %}
[Community lookup](/api-reference/communities/community-lookup)
{% endcontent-ref %}

{% content-ref url="/pages/yCOxf5u9tSBLRJssFlo4" %}
[Community member check](/api-reference/communities/community-member-check)
{% endcontent-ref %}

{% content-ref url="/pages/xxK97SofNb2td9idzQ1l" %}
[Community Secret Retrieval](/api-reference/communities/community-secret-retrieval)
{% endcontent-ref %}

{% content-ref url="/pages/UP1kB8xY0NyK3ou7R4q8" %}
[Community Secret Creation](/api-reference/communities/community-secret-creation)
{% endcontent-ref %}


# Community lookup

## Overview

This endpoint provides basic information about the specified community. Unlike many other endpoints, this one is accessible for all communities, regardless of whether you hold an admin role in them or not.

## API Reference

{% openapi src="/files/avxp7T3dIP5rru62IZug" path="/public/communities/{subdomain}" method="get" %}
[swagger.json](https://2107641413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQvTIrayABkLCC3fDPMH6%2Fuploads%2F5Y9ce8MUzDYfCWO7Rjow%2Fswagger.json?alt=media\&token=b290fd3d-d3e3-4f8b-a872-cd7ab166169e)
{% endopenapi %}


# Community member check

## Overview

This endpoint enables you to verify whether a user belongs to a community. Unlike most of the endpoints, this one can be called on any communities, even if you are not an admin of it.

## API Reference

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/member" method="post" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}


# Community Secret Retrieval

## Overview

This endpoint allows you to retrieve your community secret used in api task. You need to be an admin of the community to call this endpoint.

## API Reference

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/secrets" method="get" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}


# Community Secret Creation

## Overview

This endpoint allows you to create a community secret used for api task.&#x20;

You need to be an admin of the community to call this endpoint.

## API Reference

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/secrets" method="post" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}


# Users

{% content-ref url="/pages/duYzDzZNRpNYLkNsowQ3" %}
[User lookup](/api-reference/users/user-lookup)
{% endcontent-ref %}

{% content-ref url="/pages/1XmcVSGmawL3cKzIdzMD" %}
[Add & Remove XP](/api-reference/users/add-and-remove-xp)
{% endcontent-ref %}

{% content-ref url="/pages/cRB90eSP7Ddz2G8Q3b1S" %}
[Ban user](/api-reference/users/ban-user)
{% endcontent-ref %}

{% content-ref url="/pages/gn1R4RsIJIE6E70QoTWz" %}
[Referral code](/api-reference/users/referral-code)
{% endcontent-ref %}


# User lookup

## Overview

There are two methods available for retrieving a user:

* Fetch a user by their Zealy ID.
* Retrieve a user through the IDs or handles of third-party accounts they have linked to Zealy, such as Discord, Twitter, wallet, and email.

## The User object

***

**id** - *String*

Zealy ID of the user

***

**name** - *String*

Zealy username of the user

***

**avatar** - *String*

URL of the user's avatar.

***

**discordHandle** - String

Discord handle of the user

***

**tiktokUsername** - *String*

Tiktok username of the user

***

**xp** - *Number*

XP of the user in the community

***

**level** - *Number*

Level of the user in the community

***

**rank** - *Number*

Rank of the user in the all time leaderboard.

***

**banReason** - *String*

If the user is banned, the reason that was given by the admin for the ban

***

**isBanned** - *Boolean*

Equals \`true\` if the user is banned

***

**Invites** - *Array of objects*

Lists of the user invite with their respective statuses.&#x20;

An invite can be in one of three states:

* Active: The invite is valid and can be used to claim a quest.
* Pending: The invite is not yet active because the invited user hasn't reached the minimum required XP for it to be valid. This minimum XP requirement is determined by the community's settings.
* Consumed: The invite has been used to claim a quest and cannot be used again.

***

**connectedWallet** - *String*

This field holds the address of the wallet the user connected to Zealy.

***

**verifiedBlockchainAddresses** *- Object*

This field contains addresses users have added using wallet connection, so we know they belong to them

***

**unVerifiedBlockchainAddresses** *- Object*

This field contains addresses users add themselves to their profiles, but we can't confirm these belong to them.&#x20;

***

**referrerId** - *String*

Zealy ID of the user that invited the requested user to the community.

***

**referrerUrl** - *String*

The URL of the website the user came from when he joined the community.

***

**karma** - *Number*

Karma is a measure that reflects a community member's value. Users gain karma when their contributions are recognized with a star and lose karma if their contributions are flagged.

***

**role** - *Enum*

The role of the user in the community. The possible values are : `admin`, `editor`, `reviewer`,  `guest` and `banned`.

***

**updatedAt** - *String*

ISO timestamp that indicates the most recent date and time when the user's information was updated.

***

**createdAt** - *String*

ISO timestamp that indicates the creation date and time of the user.

***

**deletedAt** - *String*

ISO timestamp that indicate when the user's account was deleted, if applicable

***

**restoredAt** - *String*

If the user's account was previously deleted and then restored, this field captures the date and time of the restoration.

## API Reference

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/users/{userId}" method="get" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/users" method="get" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/users/{userId}/invites" method="get" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/reviews/users/{id}" method="get" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}


# Add & Remove XP

## Overview

Those two endpoints allow you to add/remove XP from a user. The XP added and removed will appear in the user notifications and activity.

The XP given from the API will count both for the all time and sprint leaderboard if any,

## API Reference

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/users/{userId}/xp" method="post" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/users/{userId}/xp" method="delete" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}


# Ban user

## Overview

This endpoint allows you to ban a user from your community. Once a user is banned:

* He won't be able to claim quests in the community anymore.
* All his quests waiting for reviews will be canceled.
* He will be removed from the all-time and sprint leaderboards if any.

## API Reference

## Ban a user from a community

<mark style="color:green;">`POST`</mark> `https://api-v2.zealy.io/public/communities/:subdomain/users/:userId/ban`

#### Path Parameters

| Name                                        | Type   | Description                      |
| ------------------------------------------- | ------ | -------------------------------- |
| subdomain<mark style="color:red;">\*</mark> | String | Subdomain of your community      |
| userId                                      | String | Id of the requested user invites |

#### Request Body

| Name   | Type   | Description                                                                   |
| ------ | ------ | ----------------------------------------------------------------------------- |
| reason | String | Reason for banning, will be displayed to the user when visiting the community |

{% tabs %}
{% tab title="200: OK " %}

{% endtab %}
{% endtabs %}


# Referral code

## Overview

This endpoint allows you to retrieve a user referral code. A referral code is the code used by the user to invite other users in your community.

## API Reference

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/users/{userId}/referral-code" method="get" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}


# Delete Zealy Connect for member

This endpoint is used to delete a Zealy Connect for a specific user within a community. The connection is uniquely identified by the combination of the user, community, and redirect URL.

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/users/{userId}/zealy\_connect" method="delete" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}


# Leaderboards

{% content-ref url="/pages/sETq0gPt3Mi0OdsA1yJ8" %}
[Retrieve a leaderboard](/api-reference/leaderboards/retrieve-a-leaderboard)
{% endcontent-ref %}

{% content-ref url="/pages/kmdvuFqWHkWKb0tzWkM1" %}
[List sprints](/api-reference/leaderboards/list-sprints)
{% endcontent-ref %}


# Retrieve a leaderboard

## Overview

This endpoint allows you to retrieve a leaderboard from a community. The page and limit query parameters are required.

By default, the endpoint returns the all time leaderboard. You can retrieve a sprint leaderboard by specifying the `sprintId` in the query parameters.

To get the ID of a sprint, head to:

{% content-ref url="/pages/kmdvuFqWHkWKb0tzWkM1" %}
[List sprints](/api-reference/leaderboards/list-sprints)
{% endcontent-ref %}

## The leaderboard record object

***

**userId** - *String*

Zealy ID of the user

***

**name** - *String*

Zealy username of the user

***

**connectedWallet** - *String*

This field holds the address of the wallet the user connected to Zealy

***

**address** - *String*

Wallet address of the user on the blockchain the community is on. When the blockchain is one we support, the user is required to connect a wallet. In that case, the address ownership is verified.

When it's not a blockchain we support, the user manually enters the address. In that case, we can't assure the ownership.

List of supported blockchains: Ethereum, Optimism, Arbitrum, Polygon, Base, Solana, Binance Smart Chain (BNB), Linea, Avalanche, Fantom, Cronos, Palm, Gnosis, Chiliz, Moonbeam, Polygon zkEVM, zkSync, and TON.

***

**xp** - *Number*

XP of the user in the leaderboard

***

**avatar** - *String*

URL of the user's avatar

***

**twitterId** - *String*

Twitter ID of the user

***

**twitterUsername** - *String*

Twitter username of the user

***

**discordHandle** - *String*

Discord handle of the user

***

**discordId** - *String*

Discord ID of the user

***

**email** - *String*

Email of the user

***

## API Reference

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/leaderboard" method="get" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}


# List sprints

## Overview

This endpoint allows you to retrieve the list of sprints that happened in your community. If you pass the `onlyCurrent=true` query params to the query, it will only return the active sprint.

## The Leaderboard sprint object

***

**id** - *String*

ID of the sprint

***

**name** - *String*

Name of the sprint

***

**description** - *String*

Description of the sprint

***

**image** - *String*

Url of the sprint image

***

**color** - *String*

Hex color associated with the sprint (e.g: "#833f6a")

***

**rewards** - *Object*

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

***

**rewardZone** - *Number* &#x20;

Leaderboard position until which the users will be rewarded.

***

**includedQuestsIds** - Array of strings

IDs of the quests that are part of the sprint.

{% hint style="warning" %}
Currently, if the array is empty, it means that all quests in the community are part of the sprint. This behavior will be deprecated soon.
{% endhint %}

***

**startingAt** - *String*

ISO timestamp that indicates the start of the sprint

***

**endingAt** - *String*

ISO timestamp that indicates the end of the sprint

***

**createdAt** - *String*

ISO timestamp that indicates the creation date and time of the sprint

***

## API Reference

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/leaderboard/sprint" method="get" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}


# Reviews

{% content-ref url="/pages/84OH40v4tzTrheKtaA34" %}
[Claimed quests lookup](/api-reference/reviews/claimed-quests-lookup)
{% endcontent-ref %}

{% content-ref url="/pages/CkeC3JpCAsu5DRbAE0v9" %}
[Review a submission](/api-reference/reviews/review-a-submission)
{% endcontent-ref %}

{% content-ref url="/pages/qUTUYU5ZDfHOYH6htnK1" %}
[Review events](/api-reference/reviews/review-events)
{% endcontent-ref %}


# Claimed quests lookup

## Overview

Those two endpoints allow you to retrieve claimed quests.

## The Review object

***

**id** - *String*

ID of the claimed quest

***

**user** - *Object*

Object containing the `id`, `name`, and `avatar` url of the user

***

**quest** - *Object*

Object containing `id` and `name` of the quest

***

**status** - *Enum (success, fail, pending)*

Status of the review

***

**mark** - *Enum (star, flag)*

This field defines if the review has been marked as a star or if the review has been flagged. It can be null if none of the actions have been performed.

***

**tasks** - *Array of object*

Contains the list of [tasks](#the-task-object) the user completed, with the submissions if any. To know more about tasks, check our [product docs](https://zealy.io/docs/tasks/visit-link).

***

**updatedAt** - *String*

ISO timestamp that indicates the last date at which the claimed quest was updated

***

**createdAt** - *String*

ISO timestamp that indicates the date at which the quest was claimed

***

## The Task object

### Common properties

The following properties are set in all task types

***

**type** - *String*

ID of the task

***

**type** - *Enum*

The possible values are: api, text, discord, url, telegram, quiz, invites, visitLink, file, date, number, poll, opinion, twitterFollow, twitterSpace, tweetReact, tweet, tiktok.

***

**Status** - *Enum (error, success, in-review)*

Status of the task

***

**createdAt** - *String*

ISO timestamp that indicates the date at which the task was completed

***

### Exclusive properties

The following properties are only set in one or multiples task types.

***

**value** - *String or Number*

Value submitted by the user when completing the task. This property is set for the following task types: `tiktok`, `opinion`, `number`, `date`, `url`, `text`.

***

**values** - *Array of String*

Values submitted by the user when completing the task. Can hold one or multiple values. This property is set for the following task types: `quiz`, `poll`.

***

**fileUrls** - *Array of String*

This properties contains the URLs of the files a user submitted. This property is set for the task type `file`.

***

**tweetId** - *String*

This property contains the ID of the tweet the user submitted. This property is set for the task type `tweet.`

***

## API Reference

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/reviews/{id}" method="get" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/reviews" method="get" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}


# Review a submission

## Overview

This endpoint allows you to review one or multiple claimed quests.

## API Reference

## Review the specified claimed quest

<mark style="color:green;">`POST`</mark> `https://api-v2.zealy.io/public/communities/:subdomain/reviews`

#### Path Parameters

| Name                                        | Type   | Description                 |
| ------------------------------------------- | ------ | --------------------------- |
| subdomain<mark style="color:red;">\*</mark> | String | Subdomain of your community |

#### Headers

| Name                                        | Type   | Description  |
| ------------------------------------------- | ------ | ------------ |
| x-api-key<mark style="color:red;">\*</mark> | String | Your API key |

#### Request Body

| Name                                              | Type      | Description                                                               |
| ------------------------------------------------- | --------- | ------------------------------------------------------------------------- |
| claimedQuestIds<mark style="color:red;">\*</mark> | String\[] | Array of claimed quests Ids to review                                     |
| status<mark style="color:red;">\*</mark>          | String    | "success", "fail" or "pending"                                            |
| comment                                           | String    | Comment associated with the review (only if status = "success" or "fail") |
| mark                                              | String    | "star" (only if status = "success") or "flag" (only if status = "fail")   |
| bonusXP                                           | Integer   | only if status = "success" and mark = "star"                              |

{% tabs %}
{% tab title="200: OK Return info about the reviewed quests" %}

```json
{
    "reviewedClaimQuestIds": ["f88493da-bb52-46e1-920d-e1e10b67f0fb"],
    "status": "success",
    "comment": "Amazing Job"
}
```

{% endtab %}
{% endtabs %}


# Review events

## Overview

This endpoint returns the list of review events that happened on a claimed quest.&#x20;

## The Review Event Object

***

**id** - *String*

ID of the review event

***

**createdAt** - *String*&#x20;

ISO timestamp that indicates the creation date and time of the review event

***

**type** - *Enum (error, success, cancel)*\
Type of the review event.

***

**data** - *Object*

Object containing the comment written by the reviewer at the moment of the review and the bonus XP given, if any.

***

**reviewer** - *Object*

Object containing the `id`, `name`, and `avatar` url of the reviewer

***

## API Specification

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/reviews/{id}/events" method="get" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}


# Modules

## API Reference

{% openapi src="/files/avxp7T3dIP5rru62IZug" path="/public/communities/{subdomain}/modules" method="get" %}
[swagger.json](https://2107641413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQvTIrayABkLCC3fDPMH6%2Fuploads%2F5Y9ce8MUzDYfCWO7Rjow%2Fswagger.json?alt=media\&token=b290fd3d-d3e3-4f8b-a872-cd7ab166169e)
{% endopenapi %}


# 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)
{% endcontent-ref %}

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

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


# Create quest

{% openapi src="/files/avxp7T3dIP5rru62IZug" path="/public/communities/{subdomain}/quests" method="post" %}
[swagger.json](https://2107641413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQvTIrayABkLCC3fDPMH6%2Fuploads%2F5Y9ce8MUzDYfCWO7Rjow%2Fswagger.json?alt=media\&token=b290fd3d-d3e3-4f8b-a872-cd7ab166169e)
{% endopenapi %}


# Update quest

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/quests/{questId}" method="patch" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}


# List quests

## Overview

This endpoint retrieves all quests and their details for a specified community. Admin role required.

The `claimCounter` indicates the number of claims made for a quest. Note: this value is not real-time; it is cached for 1 hour.

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/quests" method="get" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}


# Webhooks

## Overview

This set of endpoints allows you to do all kinds of operations on your community webhooks. Learn more about how webhooks work and which events are available on our [product documentation](https://zealy.io/docs/integrations/webhooks).

## API Reference

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/webhooks" method="get" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/webhooks" method="post" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/webhooks/{webhookId}" method="delete" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/webhooks/{webhookId}" method="patch" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/webhooks-event-types" method="get" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/webhooks/{webhookId}/events" method="get" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}


