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.

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.


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

Get information about a user

GEThttps://api-v2.zealy.io/public/communities/{subdomain}/users/{userId}
Path parameters
subdomain*string
userId*string (uuid)
Header parameters
Response

200

Body
id*string
avatar*nullable string
connectedWallet*nullable string
name*nullable string
email*nullable string
discordId*nullable string
twitterId*nullable string
discordHandle*nullable string
tiktokUsername*nullable string
twitterUsername*nullable string
verifiedBlockchainAddressesnullable object
unVerifiedBlockchainAddressesnullable object
xp*number
rank*number
level*number
invites*array of object
createdAt*string (date-time)
updatedAt*string (date-time)
deletedAt*nullable string (date-time)
referrerUrl*nullable string
referrerId*nullable string
banReason*nullable string
role*nullable enum
adminreviewerguesteditorbanned
isBanned*boolean
Request
const response = await fetch('https://api-v2.zealy.io/public/communities/{subdomain}/users/{userId}', {
    method: 'GET',
    headers: {
      "x-api-key": "text"
    },
});
const data = await response.json();
Response
{
  "id": "text",
  "avatar": "text",
  "connectedWallet": "text",
  "name": "text",
  "email": "text",
  "discordId": "text",
  "twitterId": "text",
  "discordHandle": "text",
  "tiktokUsername": "text",
  "twitterUsername": "text",
  "xp": 0,
  "rank": 0,
  "level": 0,
  "invites": [
    {
      "userId": "text",
      "status": "active",
      "joinedAt": "2024-10-08T15:28:04.314Z",
      "xp": 0
    }
  ],
  "createdAt": "2024-10-08T15:28:04.314Z",
  "updatedAt": "2024-10-08T15:28:04.314Z",
  "deletedAt": "2024-10-08T15:28:04.314Z",
  "referrerUrl": "text",
  "referrerId": "text",
  "banReason": "text",
  "role": "admin",
  "isBanned": false
}

Find a user by social id

GEThttps://api-v2.zealy.io/public/communities/{subdomain}/users
Path parameters
subdomain*string
Query parameters
Header parameters
Response

200

Body
discordHandle*nullable string
tiktokUsername*nullable string
twitterUsername*nullable string
verifiedBlockchainAddressesnullable object
unVerifiedBlockchainAddressesnullable object
connectedWallet*nullable string
email*nullable string
discordId*nullable string
twitterId*nullable string
id*string
xp*number
name*nullable string
createdAt*string (date-time)
rank*number
invites*array of object
role*enum
admineditorbannedguestreviewer
level*number
isBanned*boolean
karma*number
referrerUrl*nullable string
referrerId*nullable string
banReason*nullable string
Request
const response = await fetch('https://api-v2.zealy.io/public/communities/{subdomain}/users', {
    method: 'GET',
    headers: {
      "x-api-key": "text"
    },
});
const data = await response.json();
Response
{
  "discordHandle": "text",
  "tiktokUsername": "text",
  "twitterUsername": "text",
  "connectedWallet": "text",
  "email": "text",
  "discordId": "text",
  "twitterId": "text",
  "id": "text",
  "xp": 0,
  "name": "text",
  "createdAt": "2024-10-08T15:28:04.314Z",
  "rank": 0,
  "invites": [
    {
      "userId": "text",
      "status": "active",
      "joinedAt": "2024-10-08T15:28:04.314Z",
      "xp": 0
    }
  ],
  "role": "admin",
  "level": 0,
  "isBanned": false,
  "karma": 0,
  "referrerUrl": "text",
  "referrerId": "text",
  "banReason": "text"
}

List invites for a user

GEThttps://api-v2.zealy.io/public/communities/{subdomain}/users/{userId}/invites
Path parameters
subdomain*string
userId*string (uuid)
Query parameters
Header parameters
Response

200

Body
userId*string (uuid)
status*enum
pendingconsumedactive
joinedAt*string (date-time)
name*nullable string
xp*number
Request
const response = await fetch('https://api-v2.zealy.io/public/communities/{subdomain}/users/{userId}/invites', {
    method: 'GET',
    headers: {
      "x-api-key": "text"
    },
});
const data = await response.json();
Response
[
  {
    "userId": "123e4567-e89b-12d3-a456-426614174000",
    "status": "pending",
    "joinedAt": "2024-10-08T15:28:04.314Z",
    "name": "text",
    "xp": 0
  }
]

Get number of flags and stars for a user in a community

GEThttps://api-v2.zealy.io/public/communities/{subdomain}/reviews/users/{id}
Path parameters
id*string (uuid)
subdomain*string
Header parameters
Response

200

Body
flags*number
stars*number
Request
const response = await fetch('https://api-v2.zealy.io/public/communities/{subdomain}/reviews/users/{id}', {
    method: 'GET',
    headers: {
      "x-api-key": "text"
    },
});
const data = await response.json();
Response
{
  "flags": 0,
  "stars": 0
}

Last updated