Zealy API
  • Introduction
  • Authentication
  • Use cases
  • Rate limits
  • Pagination
  • FAQ
  • API Reference
    • Communities
      • Community lookup
      • Community member check
      • Community Secret Retrieval
      • Community Secret Creation
    • Users
      • User lookup
      • Add & Remove XP
      • Ban user
      • Referral code
      • Delete Zealy Connect for member
    • Leaderboards
      • Retrieve a leaderboard
      • List sprints
    • Reviews
      • Claimed quests lookup
      • Review a submission
      • Review events
    • Modules
    • Quests
      • Create quest
      • Update quest
      • List quests
    • Webhooks
Powered by GitBook
On this page

Was this helpful?

  1. API Reference
  2. Leaderboards

Retrieve a leaderboard

PreviousLeaderboardsNextList sprints

Last updated 9 months ago

Was this helpful?

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:

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

List sprints

Get leaderboard for a community

get
Path parameters
subdomainstringRequired
Query parameters
sprintIdstringOptional
pagenumber ยท min: 1OptionalDefault: 1
limitnumber | nullableOptionalDefault: 50
Header parameters
x-api-keystringRequired
Responses
200
200
application/json
400
400
application/json
401
401
application/json
403
403
application/json
404
404
application/json
409
409
application/json
429
429
application/json
500
500
application/json
get
GET /public/communities/{subdomain}/leaderboard HTTP/1.1
Host: api-v2.zealy.io
x-api-key: text
Accept: */*
{
  "data": [
    {
      "userId": "123e4567-e89b-12d3-a456-426614174000",
      "xp": 1,
      "name": "text",
      "avatar": "https://example.com",
      "ethAddress": "text",
      "address": "text",
      "twitterId": "text",
      "twitterUsername": "text",
      "discordHandle": "text",
      "discordId": "text",
      "connectedWallet": "text",
      "numberOfQuests": 1,
      "email": "text"
    }
  ],
  "totalPages": 1,
  "page": 1,
  "totalRecords": 1,
  "status": "computed"
}
  • Overview
  • The leaderboard record object
  • API Reference
  • GETGet leaderboard for a community