Developer Docs

Partner API Reference

Integrate UCrypto Space Dollars into your platform. Four endpoints. Bearer-token auth. Production-ready.

Overview

The UCrypto Partner API lets external platforms credit Space Dollars (SD) to UCrypto users and trigger SD→UCrypto conversions. Designed for play-to-earn games, apps, and marketplaces that want to reward users with real crypto.

Base URL: https://ucrypto.ai/api/partner

Quick-start checklist

1.Apply at ucrypto.ai/partners — most apps approved in seconds
2.Copy your API key (shown once at approval)
3.Call GET /api/partner/rate to verify auth and get the live rate
4.Use POST /api/partner/user/lookup to resolve a user email → userId
5.Credit SD with POST /api/partner/sd-deposit
6.Convert SD → UCrypto with POST /api/partner/convert

Authentication

All partner endpoints require a Bearer token in the Authorization header. Your key is issued at application approval and hashed server-side — UCrypto never stores the plaintext.

http
Authorization: Bearer ucpk_<your_key_here>

Keys can be scoped to a specific origin via allowedOrigin. Contact support to enable origin locking. Revoked or disabled keys return 401 Invalid or inactive API key.

Endpoints

GET /api/partner/rate

Returns the current live SD→UCrypto exchange rate and supply statistics.

http
GET https://ucrypto.ai/api/partner/rate
json
// 200 OK
{
  "sdPerUcrypto": 1250.00,
  "circulatingSupply": 1200,
  "totalFloat": 100000,
  "floatRemaining": 98800,
  "supplyPct": 1.20,
  "earlyAdopterActive": true,
  "scarcityFactor": 1.006,
  "timestamp": "2026-09-20T21:00:00.000Z"
}

POST /api/partner/user/lookup

Look up a UCrypto user by email. Returns the userId needed for deposit and convert calls.

http
POST https://ucrypto.ai/api/partner/user/lookup
json
// Request
{ "email": "[email protected]" }

// 200 OK
{ "userId": "abc123-...", "name": "Jane Smith", "ucryptoBalance": 0.05, "spaceDollarsBalance": 1500 }

// 404
{ "error": "User not found" }

POST /api/partner/sd-deposit

Credit Space Dollars to a user's wallet when they earn SD on your platform.

http
POST https://ucrypto.ai/api/partner/sd-deposit
json
// Request
{ "userId": "abc123-...", "amount": 500, "sourcePlatform": "intellislots", "externalRef": "event-789" }

// 200 OK
{ "ok": true, "credited": 500, "newSpaceDollarsBalance": 2000 }

POST /api/partner/convert

Convert Space Dollars → UCrypto at the live rate. User must have sufficient SD balance.

http
POST https://ucrypto.ai/api/partner/convert
json
// Request
{ "userId": "abc123-...", "spaceDollarsAmount": 1000, "sourcePlatform": "intellislots" }

// 200 OK
{ "ok": true, "ucryptoReceived": 0.8, "rateApplied": 1250.00, "newUcryptoBalance": 0.85, "newSpaceDollarsBalance": 1000, "transactionId": 42, "earlyAdopterBonus": true }

// 400
{ "error": "Insufficient Space Dollars balance", "balance": 500, "required": 1000 }

Code Samples

javascript
// JavaScript / Node.js — full integration flow
const BASE = 'https://ucrypto.ai/api/partner';
const headers = { 'Authorization': 'Bearer ucpk_your_key', 'Content-Type': 'application/json' };

const { sdPerUcrypto } = await fetch(`${BASE}/rate`, { headers }).then(r => r.json());
const { userId } = await fetch(`${BASE}/user/lookup`, {
  method: 'POST', headers, body: JSON.stringify({ email: '[email protected]' })
}).then(r => r.json());
await fetch(`${BASE}/sd-deposit`, {
  method: 'POST', headers, body: JSON.stringify({ userId, amount: 500, sourcePlatform: 'my-platform' })
});
const result = await fetch(`${BASE}/convert`, {
  method: 'POST', headers, body: JSON.stringify({ userId, spaceDollarsAmount: 500, sourcePlatform: 'my-platform' })
}).then(r => r.json());
console.log('UCrypto received:', result.ucryptoReceived);
python
# Python 3 — full integration flow
import requests
BASE = 'https://ucrypto.ai/api/partner'
H = { 'Authorization': 'Bearer ucpk_your_key', 'Content-Type': 'application/json' }

rate   = requests.get(f'{BASE}/rate', headers=H).json()
user   = requests.post(f'{BASE}/user/lookup', headers=H, json={'email': '[email protected]'}).json()
uid    = user['userId']
requests.post(f'{BASE}/sd-deposit', headers=H, json={'userId': uid, 'amount': 500, 'sourcePlatform': 'my-platform'})
result = requests.post(f'{BASE}/convert', headers=H, json={'userId': uid, 'spaceDollarsAmount': 500, 'sourcePlatform': 'my-platform'}).json()
print('UCrypto received:', result['ucryptoReceived'])
php
<?php
$base = 'https://ucrypto.ai/api/partner';
$h = ['Authorization: Bearer ucpk_your_key', 'Content-Type: application/json'];
function uc($m, $u, $h, $b = null) {
    $c = curl_init($u);
    curl_setopt_array($c, [CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => $h]);
    if ($m === 'POST') { curl_setopt($c, CURLOPT_POST, true); curl_setopt($c, CURLOPT_POSTFIELDS, json_encode($b)); }
    $r = curl_exec($c); curl_close($c); return json_decode($r, true);
}
$user = uc('POST', "$base/user/lookup", $h, ['email' => '[email protected]']);
$uid  = $user['userId'];
uc('POST', "$base/sd-deposit", $h, ['userId' => $uid, 'amount' => 500, 'sourcePlatform' => 'my-platform']);
$r = uc('POST', "$base/convert", $h, ['userId' => $uid, 'spaceDollarsAmount' => 500, 'sourcePlatform' => 'my-platform']);
echo 'UCrypto received: ' . $r['ucryptoReceived'];

Error Reference

StatusErrorMeaning
401Invalid or inactive API keyKey not found, revoked, or disabled
400userId is requiredMissing required body field
400amount must be > 0Invalid amount value
400Insufficient Space Dollars balanceUser does not have enough SD
400Insufficient float remainingUCrypto supply exhausted
404User not foundNo UCrypto account for that email
503Exchange rate not configuredAdmin has not seeded exchange settings yet
451Service not available in your regionGeo-blocked region (CA)

Partner Agreement

UCrypto.ai Partner API Agreement — Last updated September 2026

1. Acceptance

By submitting a partner application and using the UCrypto Partner API, you ("Partner") agree to be bound by this Agreement. If you are acting on behalf of a company, you represent that you have authority to bind that company.

2. Permitted Use

Partner may use the API solely to (a) credit Space Dollars to UCrypto users who have earned them through legitimate activity on Partner's platform, and (b) trigger SD→UCrypto conversions on behalf of those users. Any other use requires prior written consent from UCrypto.ai.

3. Prohibited Use

Partner must not: (a) use the API to fabricate, inflate, or manipulate Space Dollar balances; (b) use the API for money laundering, fraud, or any illegal activity; (c) share API keys with third parties; (d) reverse-engineer or attempt to circumvent rate limits or security controls; (e) use the API in jurisdictions where doing so would violate applicable law.

4. API Key Security

Partner is responsible for keeping API keys confidential. Keys must be stored server-side and never exposed in client-side code, public repositories, or logs. UCrypto.ai will revoke keys that appear to be compromised. Partner must notify [email protected] immediately upon suspected key compromise.

5. Rate Limits & Fair Use

UCrypto.ai reserves the right to impose rate limits on any partner key. Excessive or abusive API usage may result in key suspension. Partners experiencing legitimate high-volume needs should contact support to arrange appropriate limits.

6. Data & Privacy

Partner must not collect, store, or process UCrypto user data beyond what is strictly necessary for the integration. Partner must maintain a privacy policy that discloses the use of UCrypto services and complies with applicable privacy law (GDPR, CCPA, PIPEDA, etc.).

7. Compliance

Partner is solely responsible for ensuring its platform and use of the API complies with all applicable laws, including but not limited to gaming regulations, financial services regulations, anti-money-laundering (AML) requirements, and know-your-customer (KYC) obligations in its jurisdiction.

8. Geo-Restrictions

UCrypto.ai currently restricts service to users in Canada. Partner must not use the API to service Canadian users or users in any other jurisdiction where UCrypto.ai has indicated a restriction.

9. Termination

Either party may terminate this Agreement at any time. UCrypto.ai may immediately revoke API access for breach of this Agreement. Upon termination, Partner must cease all API usage and delete any cached UCrypto user data.

10. Disclaimer & Limitation of Liability

The API is provided "as is" without warranty of any kind. UCrypto.ai is not liable for any indirect, incidental, or consequential damages arising from Partner's use of the API. UCrypto.ai's total liability to Partner shall not exceed USD $100.

11. Changes

UCrypto.ai may update this Agreement at any time. Continued use of the API after notice of changes constitutes acceptance. Material changes will be communicated to the contact email on file.

12. Contact

Questions about this Agreement: [email protected]