# 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 %}


---

# 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/users/user-lookup.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.
