Skip to main content

Base URL

All API requests should be made to:
https://api-mainnet.onzks.com

Authentication

ZKScore API uses Bearer token authentication. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Get your API key from the Developer Portal.
Never expose your API key in client-side code. Always make API calls from your backend server.

Request Format

All requests should include the following headers:
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

Response Format

All API responses follow this structure:
{
  "success": true,
  "data": {
    // Response data here
  },
  "timestamp": "2025-10-22T10:30:00Z"
}

Error Responses

Error responses include an error code and message:
{
  "success": false,
  "error": "RATE_LIMIT_EXCEEDED",
  "message": "Too many requests. Please try again later.",
  "timestamp": "2025-10-22T10:30:00Z"
}

Rate Limits

API rate limits depend on your subscription tier:
TierRequests per MinuteRequests per Day
Free6010,000
Starter300100,000
Professional1,0001,000,000
EnterpriseCustomCustom
Rate limit headers are included in all responses:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1698765432

Pagination

List endpoints support pagination using limit and offset parameters:
GET /api/v1/achievements?limit=50&offset=100
Paginated responses include metadata:
{
  "success": true,
  "data": [...],
  "pagination": {
    "total": 250,
    "limit": 50,
    "offset": 100,
    "hasMore": true
  }
}

Filtering & Sorting

Many endpoints support filtering and sorting:
# Filter by category
GET /api/v1/achievements?category=wallet_age

# Sort by score
GET /api/v1/scores/leaderboard?sort=totalScore&order=desc

# Multiple filters
GET /api/v1/attestations?status=active&chainId=998899

Webhooks

Subscribe to real-time events using webhooks. See the Webhooks Guide for setup instructions. Available events:
  • identity.created
  • identity.activated
  • score.updated
  • achievement.earned
  • attestation.created
  • attestation.revoked

SDKs

We provide official SDKs for easy integration:

API Endpoints

Identity Management

Trust Scores

Achievements

Trading

Trust Layer

Developer Tools

Status Codes

CodeDescription
200Success
201Created
400Bad Request
401Unauthorized
403Forbidden
404Not Found
429Rate Limit Exceeded
500Internal Server Error
503Service Unavailable

Support

Need help? Contact us:

Quick Start

New to ZKScore? Start with our Quick Start guide