Public APIAPI Key Requiredv1.1

SP Passport API

Verify SP token holder identity and loyalty scores across any dApp. The Passport API provides a standardized Proof-of-Hold Identity layer that any application can query using an API key.

Overview

The SP Passport API is a read-only REST endpoint that returns verified holder identity data for any Solana wallet address registered in the Smart Pocket ecosystem.

It enables external dApps, DeFi protocols, and communities to implement token-gated access, loyalty rewards, and reputation systems based on SP holding behavior — without requiring users to re-verify on each platform.

Authentication
X-API-Key header
Protocol
HTTPS / REST
Format
JSON
CORS
Open (*)
Cache
60 seconds
Method
GET

Authentication

API Key Required

All requests must include a valid API key in the X-API-Key header. Keys are issued per wallet address and can be managed in the API Keys section below.

Request Header

HeaderRequiredDescription
X-API-KeyRequiredYour API key (format: sp_live_...)

API Keys

Enter your Solana wallet address to manage your API keys. Keys are tied to your wallet and can be revoked at any time. Maximum 5 active keys per wallet.

Enter a valid wallet address (32+ characters) to manage API keys

Endpoint

GEThttps://sptoken.io/api/passport/:wallet
Replace :wallet with a valid Solana wallet address (base58, 32–44 characters).

Path Parameter

ParameterTypeDescription
walletstringSolana wallet address (base58 encoded)

Response Schema

Success Response (200)

json
{
  "success": true,
  "passport": {
    "wallet": "6gdDALVM7FrTnXTXo17PpHnLtUdnaAtokCBzPUZKA2rx",
    "holderRank": "Gold",
    "spBalance": 15000,
    "holdDays": 120,
    "totalPoints": 1800,
    "referralCount": 5,
    "referralPoints": 250,
    "pohScore": 496,
    "verifiedAt": "2026-03-27T00:00:00.000Z"
  }
}

Response Fields

FieldTypeDescription
walletstringSolana wallet address
holderRankstringHolder tier: Newcomer / Bronze / Silver / Gold / Diamond / Whale
spBalancenumberTotal SP points (proxy for on-chain balance)
holdDaysnumberNumber of days holding SP tokens
totalPointsnumberCumulative earn points accumulated
referralCountnumberNumber of unique wallets referred
referralPointsnumberPoints earned through referrals
pohScorenumberProof-of-Hold score (0–1000), composite loyalty metric
verifiedAtstringISO 8601 timestamp of verification

Error Responses

json
// 401 Unauthorized — missing or invalid API key
{ "error": "Missing API key. Add X-API-Key header. Get your key at /docs/passport", "docs": "/docs/passport" }

// 400 Bad Request
{ "error": "Invalid wallet address" }

// 404 Not Found
{ "error": "Wallet not registered in Smart Pocket" }

// 500 Internal Server Error
{ "error": "Internal server error" }

Holder Ranks

🐋
Whale
Top 0.1% holder
1,000,000+ SP
💎
Diamond
Elite holder
100,000+ SP
🥇
Gold
Core community
10,000+ SP
🥈
Silver
Active member
1,000+ SP
🥉
Bronze
Early supporter
100+ SP
👤
Newcomer
New member
0+ SP
pohScore is a composite loyalty metric (0–1000) calculated from SP balance (40%), hold duration (days × 2), referral count (×10 each), and total points (×0.01). Higher scores indicate deeper ecosystem participation.

Code Examples

bash
curl -X GET \
  "https://sptoken.io/api/passport/YOUR_WALLET_ADDRESS" \
  -H "X-API-Key: sp_live_YOUR_API_KEY" \
  -H "Accept: application/json"

Token Gating Example

typescript
// Example: Gate content by holder rank
const res = await fetch(`https://sptoken.io/api/passport/${userWallet}`, {
  headers: { "X-API-Key": "sp_live_YOUR_API_KEY" },
});
const { passport } = await res.json();

const ALLOWED_RANKS = ["Silver", "Gold", "Diamond", "Whale"];

if (ALLOWED_RANKS.includes(passport.holderRank)) {
  // Grant access to premium content
  showPremiumContent();
} else {
  // Redirect to purchase page
  redirectToBuyPage();
}

Use Cases

Token-Gated Access

Restrict premium content, Discord channels, or dApp features to Silver+ holders.

Loyalty Rewards

Reward users based on pohScore — higher scores unlock better rates or bonuses.

Cross-Platform Identity

Use SP Passport as a portable identity layer across multiple DeFi protocols.

DAO Governance Weight

Weight voting power by holderRank or pohScore for fairer governance.

Rate Limits & Caching

Server-Side Cache

Responses include Cache-Control: public, max-age=60. Data refreshes every 60 seconds.

CORS Policy

All origins are allowed (Access-Control-Allow-Origin: *). No preflight required for GET requests.

Fair Use

Please cache responses on your end and avoid polling more than once per minute per wallet. Abusive traffic may result in API key suspension. For high-volume integrations, contact us via Telegram.

Ready to integrate?

Get your API key above and start building with the SP Passport API today.