CRDBRD API
Integrate your platform with CRDBRD products. Send tournament results and match data directly into player accounts — starting with CRDBRD Track.
Authentication
All API requests require a partner API key. Include your key in the Authorization header as a Bearer token.
Authorization: Bearer your_api_key_here Content-Type: application/json
API keys are issued per partner integration. Each key is scoped to your organization and can be revoked at any time. Keep your key secret — do not expose it in client-side code.
Rate Limits
The API currently does not enforce strict rate limits, but we reserve the right to throttle or block excessive usage. As a guideline, keep requests under 60 per minute per API key. If you anticipate higher volume, reach out to us beforehand.
Create Report Link
Generate a one-time import link that allows a user to add a tournament report and deck to their CRDBRD Track account. You send the payload, we return a token and then you redirect the user to Track to claim it.
How It Works
- Your server sends the tournament data to this endpoint
- We return a short-lived
token - Redirect the user to
https://track.crdbrd.gg/?importToken=TOKEN - Track prompts the user to save the deck & report to their account
Request Body
| Field | Type | Description |
|---|---|---|
payload |
object | The tournament data object (see schema below) |
ttlMinutes |
number | Token lifetime in minutes. Default 30, max 120 |
Payload Schema
| Field | Type | Description |
|---|---|---|
payload.origin |
string | Your platform identifier (e.g. "CRDBRD") |
payload.gameId |
string | Game identifier. See supported games |
payload.event |
object | Tournament metadata |
payload.event.title |
string | Event name |
payload.event.date |
string | Event date in YYYY-MM-DD format |
payload.event.players |
string | Total number of players (as string) |
payload.event.placement |
string | Final placement (e.g. "5th", "Top 8") |
payload.deck |
object | Deck information |
payload.deck.leader |
string | Leader/legend name. Must match a known leader for the game |
payload.deck.deckName |
string | Optional deck display name |
payload.rounds |
array | Array of round results |
rounds[].round |
number | Round number (1-indexed) |
rounds[].opponent |
string | Opponent's deck/leader name |
rounds[].result |
string | "W", "L", or "D" |
rounds[].games |
string[] | Individual game results for BO3 (e.g. ["W","L","W"]) |
rounds[].topCut |
string|null | Top cut round label (e.g. "Top 8") or null for swiss |
Example Request
curl -X POST \ https://grgubmbcpdhmfpjqunav.supabase.co/functions/v1/create-report-token \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "payload": { "origin": "CRDBRD", "gameId": "onepiece", "event": { "title": "Store Championship", "date": "2025-02-01", "players": "64", "placement": "5th" }, "deck": { "deckName": "Law", "leader": "Trafalgar Law [OP01-002]" }, "rounds": [ { "round": 1, "opponent": "Law", "games": ["W", "W"], "result": "W", "topCut": null }, { "round": 2, "opponent": "Zoro", "games": ["L", "W", "L"], "result": "L", "topCut": null } ] }, "ttlMinutes": 30 }'
Response
{ "token": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "expiresAt": "2025-02-01T12:34:56.000Z" }
After Receiving the Token
Redirect the user's browser to Track with the token as a query parameter:
https://track.crdbrd.gg/?importToken=a1b2c3d4-e5f6-7890-abcd-ef1234567890
Track will prompt the user to sign in (if needed) and save the deck and report to their account. Once redeemed, the token is consumed and cannot be reused.
Supported Games
Use these values for the payload.gameId field:
The generic game type supports free-form deck names with no leader matching. Use it for games not yet specifically supported.
Response Codes
- 200 Token created successfully
-
400
Invalid JSON or missing
payloadfield - 401 Missing or invalid API key
- 405 Method not allowed (use POST)
- 413 Payload exceeds 24 KB size limit
- 500 Internal server error creating token
Examples
Node.js
const response = await fetch( "https://grgubmbcpdhmfpjqunav.supabase.co/functions/v1/create-report-token", { method: "POST", headers: { "Authorization": `Bearer ${process.env.CRDBRD_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ payload: { origin: "yourPlatform", gameId: "onepiece", event: { title: "Weekly Tournament", date: "2025-03-15", players: "32", placement: "1st", }, deck: { leader: "Roronoa Zoro [OP01-001]", }, rounds: [ { round: 1, opponent: "Luffy", result: "W", topCut: null }, { round: 2, opponent: "Law", result: "W", topCut: null }, ], }, }), } ); const { token } = await response.json(); // Redirect the user to Track const importUrl = `https://track.crdbrd.gg/?importToken=${token}`;
Python
import requests import os response = requests.post( "https://grgubmbcpdhmfpjqunav.supabase.co/functions/v1/create-report-token", headers={ "Authorization": f"Bearer {os.environ['CRDBRD_API_KEY']}", "Content-Type": "application/json", }, json={ "payload": { "origin": "yourPlatform", "gameId": "lorcana", "event": { "title": "Store Championship", "date": "2025-04-10", "players": "48", "placement": "3rd", }, "deck": { "leader": "Amber / Amethyst", }, "rounds": [ {"round": 1, "opponent": "Ruby / Sapphire", "games": ["W", "W"], "result": "W", "topCut": None}, ], }, }, ) data = response.json() import_url = f"https://track.crdbrd.gg/?importToken={data['token']}"
Request an API Key
API keys are available to tournament platforms, content creators, and community tools that want to integrate with CRDBRD Track. Tell us about your project and we'll get back to you.
Partner Application
Fill out the form below and we'll review your request within a few business days.