# BetSync Public API (v3) — Full Reference This file is the complete, plain-text reference for the BetSync public API, suitable for pasting into an API client or an LLM context window. Maintained alongside the admin panel API Documentation page (resources/js/admin/pages/ApiDocumentation.jsx) — keep the two in sync. ## Base URL https://YOUR-SITE-DOMAIN/api/v3 Replace YOUR-SITE-DOMAIN with the site host. The legacy v1 API (/api/v1/...) still works with the same authentication, but new integrations should use v3. ## Authentication Every request must include an API key in the X-API-Key header: X-API-Key: YOUR_API_KEY Keys are created in the admin panel (Settings -> API Keys), can be deactivated at any time, and may carry an expiry date. Store a key like a password. ## Permissions A key holds permissions per endpoint category, as `category:ability`: users:read list and view users users:write create, update, delete (write includes read) * full access to every category, including new ones Categories match the sections of this document: users, groups, points, store, quests, challenges, vip-rewards, bonus-hunts, slot-calls, raffles, tournaments, winner-logs, wagering, kick, stream-stats, chat, discord. Three categories belong to pluggable modules and only exist where the site has the module: `quests`, `challenges` and `vip-rewards`. Their routes return HTTP 403 without it, and the permission is not offered in the admin panel until it is enabled. A key issued while a module was on keeps its permission if the module is later turned off — the route gate is what stops it working. The ability is decided by the HTTP method: GET/HEAD/OPTIONS need `read`, POST/PUT/PATCH/DELETE need `write`. A route that sits under two categories (a hunt's slot calls, a user's groups) accepts either one. GET /api/v3/test is always callable and reports what a key holds. Only the /api/v3 surface is scoped; the older /api/v1 and unversioned endpoints accept any valid key. Keys created before permissions existed keep full access, and the BETSYNC_API_KEY configured on the server always has full access. Authentication failures return HTTP 401: { "error": "Unauthorized. Invalid API key." } A valid key without the right permission returns HTTP 403: { "error": "Forbidden. This API key is not permitted to write these endpoints.", "required_scopes": ["users:write"], "granted_scopes": ["users:read"] } ## Browser access (CORS) /api/v3/* answers cross-origin requests from any origin. Preflight is handled for you and the X-API-Key header is allowed, so a browser integration works without any setup. Credentials are never used - v3 authorises by API key header, not cookies - so `Access-Control-Allow-Credentials` is not sent. Remember that a key put into front-end JavaScript is visible to everyone who loads the page, and v3 keys are fully privileged: prefer calling the API from your own server. ## Rate limits All /api routes share a limit of 800 requests per minute per key/IP. Responses carry X-RateLimit-Limit and X-RateLimit-Remaining headers. A 429 response includes a Retry-After header and the body: { "message": "Too Many Attempts." } ## Errors 200 OK { "success": true, ... } 201 Created { "success": true, "message": "...", "data": {...} } 401 Unauthorized { "error": "Unauthorized. Invalid API key." } 403 Forbidden Key lacks the permission, or the action is not allowed { "error": "...", "required_scopes": [...], "granted_scopes": [...] } 404 Not found { "success": false, "message": "User not found" } 422 Validation { "success": false, "message": "Validation failed", "errors": { "field": ["..."] } } 429 Rate limited { "message": "Too Many Attempts." } 500 Server error { "success": false, "message": "..." } ## Pagination List endpoints accept `page` and `per_page` (default 15, max 100; user activity defaults to 20). Paginated responses include: "pagination": { "current_page", "last_page", "per_page", "total", "from", "to" } ## Test your key GET /api/v3/test Confirms the key authenticates and echoes its metadata: { "success": true, "message": "API key is working", "data": { "name": "My Integration", "masked_key": "bsk_...a1b2", "scopes": ["users:read", "store:write"], "full_access": false, "abilities": [], "expires_at": null } } ===================================================================== # USERS ===================================================================== ## GET /api/v3/users List users with filtering, search, sorting and pagination. Each user includes their groups and dynamic crypto_addresses. Query parameters: group string Filter by group name (case-insensitive), e.g. administrators, vip status string active | disabled | timeout search string Matches username, kick username, global name, or email verified boolean Filter by Discord verification has_kick boolean Only users with (or without) a linked Kick username registered_after date Registered on or after this date registered_before date Registered on or before this date flagged boolean Only accounts carrying a security flag timed_out boolean Only accounts under a live timeout whitelisted boolean Only whitelisted accounts banned_after date Banned on or after this moment (implies disabled) kick_subscriber boolean Only Kick subscribers in_discord boolean Only accounts present in the Discord server last_active_after date Seen on or after this moment last_active_before date Not seen since this moment (dormant accounts) min_points number Balance floor (also max_points) min_xp number XP floor (also max_xp) sort_by string id | username | kick_username | points | xp | created_at | last_active (default created_at) sort_order string asc | desc (default desc) per_page integer Default 15, max 100 Example response item: { "id": "123456789012345678", "username": "player_one", "global_name": "Player One", "kick_username": "player_one", "email": "player@example.com", "avatar": "a1b2c3d4", "verified": true, "groups": [{ "id": 3, "name": "vip", "display_name": "VIP", "priority": 40 }], "points": 1250, "xp": 4200, "disabled": false, "timeout_until": null, "last_active": "2026-08-01T18:22:10.000000Z", "created_at": "2025-11-02T09:14:33.000000Z", "updated_at": "2026-08-01T18:22:10.000000Z", "crypto_addresses": [ { "field_id": 1, "slug": "casino_account", "label": "Casino Account", "placeholder": null, "value": "player_one" } ] } ## GET /api/v3/users/stream Stream account events as Server-Sent Events. Query parameters: events string Comma-separated: registered, banned, unbanned, timeout, flagged (all five by default; an unknown name is a 422) duration integer Seconds to keep the connection open (default 180, max 300) interval integer Seconds between checks (default 2, max 30) since date Report events after this moment (default: connect time) backfill integer Replay this many recent events of each watched type on connect (max 100), oldest first Events: connected { status, events, since, watched_bans } user-registered A new account user-banned An account was disabled user-unbanned A watched banned account came back user-timeout An account was timed out user-flagged An account was flagged : heartbeat Comment line sent while nothing is happening Every event carries the same account summary: id, username, global_name, kick_username, avatar, verified, points, xp, disabled, disabled_reason, disabled_at, disabled_by, timeout_until, timeout_reason, flagged_reason, flagged_at, whitelisted, is_in_discord, last_active, created_at. Events are found by timestamp - registrations by created_at, bans by disabled_at, flags by flagged_at, and timeouts by a live timeout_until on a row touched since the cursor. Unbanning clears disabled_at, so there is nothing to poll for: the stream watches the accounts banned when it connects (newest 1000, reported as watched_bans) plus any it sees banned while open, and emits user-unbanned when one of those comes back. Reconnect by passing the timestamp of the last event you saw as since. ## GET /api/v3/users/statistics Site-wide user statistics. Response data keys: total_users, verified_users, active_users, disabled_users, users_with_kick, recent_registrations{today, this_week, this_month}, groups[{id, name, display_name, priority, user_count}], engagement{total_points_distributed, total_xp_earned, average_points_per_user, users_with_achievements}. ## GET /api/v3/users/{id} Full profile for one user: all list fields plus bio, social_media{twitter, youtube, tiktok, instagram}, discord_info{is_in_discord, discord_joined_at}, verification{verified, mfa_enabled}, statistics{achievements_count, bonus_hunt_predictions_count, redemptions_count}, wagering{crypto_usernames[], total_platforms_matched, total_wagered, platforms[{platform{id, name, platform_type, color}, user_data{username, matched_field, wagered, deposited, earned, rank, active}, found}], filters{date_range, start_date, end_date}}. Query parameters: wagering boolean Default true. false skips the wagering lookup date_range string 7_days, 14_days, 30_days (default), all_time start_date date Custom window start (YYYY-MM-DD); overrides date_range end_date date Custom window end; must be >= start_date The wagering block mirrors the Wagering tab of the admin user page: it queries every active casino platform live (responses can take several seconds) and matches the user's crypto usernames case-insensitively. It is null when the lookup fails or when wagering=false; per-platform entries carry found=false when the user is not on that platform. 404 { "success": false, "message": "User not found" } for unknown ids. ## PUT /api/v3/users/{id} Update profile fields, social links, and dynamic crypto addresses. Body parameters: kick_username string Must be unique across users bio string Max 500 characters twitter_user string youtube_user string tiktok_user string instagram_user string crypto_addresses array Items with slug (or field_id) + value. An empty/null value removes that address. Disabled fields are rejected with 422. Example body: { "bio": "Updated bio", "crypto_addresses": [{ "slug": "casino_account", "value": "new_username" }] } ## GET /api/v3/users/{id}/achievements Response data: user_id, total_achievements, total_points, achievements[{id, name, description, category, points, rarity (common|rare|epic|legendary), is_rare, awarded_at, progress, icon}]. ## GET /api/v3/users/{id}/statistics Per-user statistics. Bonus hunt numbers are participation-based (via the user's predictions). Response data: bonus_hunts{participated, completed}, predictions{bonus_hunt_predictions, tournament_predictions}, activities{redemptions, raffle_entries}, achievements{total, rare_achievements, total_points}, points{balance, xp}, account{member_since, last_active, days_registered}. ## GET /api/v3/users/{id}/activity Recent activity timeline for a user: bonus hunt predictions (type "bonus_hunt_prediction") and earned achievements (type "achievement"), newest first. Query parameters: per_page integer Default 20, max 100 Response data: user_id, activities[{type, id, title, description, data, created_at}], total_shown. ## POST /api/v3/users/{id}/points Modify a user points balance atomically. Subtract clamps at 0. Every change is written to the points ledger with your reason. Body parameters: amount integer required, must be >= 0 (the operation defines direction) operation string required: add | subtract | set reason string optional, stored in the points ledger Example body: { "amount": 500, "operation": "add", "reason": "Giveaway winner" } Response data: user_id, previous_points, new_points, change, operation, amount, reason. ## GET /api/v3/users/{id}/points/history Paginated points ledger for a user — every balance change with before/after amounts and the recorded reason. The ledger retains roughly the last 60 days. Query parameters: reason string Filter by ledger reason (e.g. admin_adjustment) date_from date Entries on or after this date date_to date Entries on or before this date per_page integer Default 15, max 100 Response data items: {id, amount, balance_before, balance_after, reason, reason_label, description, created_at}. ## GET /api/v3/users/lookup Find one account by something other than its id. Send exactly one field; anything else is a 422. Query parameters (one of): kick_username string Kick chat name (case-insensitive) username string Site username (case-insensitive) email string Email address (case-insensitive) discord_id string The Discord snowflake, i.e. the user id crypto string Any casino username stored on the account Response: { success, matched_on, data } with the same shape as a row from GET /users. Unknown values return 404 with matched_on set, so "not found" is distinguishable from "wrong field". ## GET /api/v3/users/{id}/alt-accounts Accounts the alt detection has tied to this one, newest first. Item keys: id, relationship (primary = seen first, alt = detected afterwards), related_user{id, username, global_name, kick_username, avatar, disabled, created_at, last_active}, reason, ip_address, auto_banned, detected_at. The same detection appears on both accounts, mirrored. ## GET /api/v3/users/{id}/sessions Active login sessions, most recent first. Query parameter: limit (default 20, max 100). Item keys: ip_address, user_agent, last_activity. Read from the session store, so expired or cleared sessions are absent. ## GET /api/v3/users/{id}/ips Addresses the account has been seen from. Item keys: id, ip_address, location, usage_count, is_vpn, is_suspicious, first_seen_at, last_seen_at. Also returns summary{unique_ips, vpn_ips, suspicious_ips}. ## GET /api/v3/users/{id}/watchtime Watch time in seconds, totalled per period and per stream session. Query parameter: limit (sessions to list, default 25, max 100). Response data: user_id, totals{today, week, month, all}, sessions_counted, sessions[{session_id, watch_time_seconds, recorded_at}]. The site-wide ranking is GET /api/v3/kick/watchtime. ## GET /api/v3/users/{id}/notes Staff notes on the account, newest first: data[{id, content, admin_id, admin_username, created_at, updated_at}], total. ## POST /api/v3/users/{id}/notes Add a note. Body: content (required, max 1000), admin_id (user id recorded as the author). Returns 201. ## DELETE /api/v3/users/{id}/notes/{noteId} Delete a note. A note is only reachable through the account it belongs to. ## GET /api/v3/users/{id}/admin-logs Admin actions this account has performed - the staff-side history, not what was done to them. Query parameters: action, category, date_from, date_to, per_page (default 30, max 100). Item keys: id, action, category, details, ip_address, created_at. Also returns filters{actions[], categories[]}. ## POST /api/v3/users/{id}/ban Ban (disable) an account. Body parameters: reason string required, max 1000, shown to the user at sign-in banned_by string User id recorded as the acting admin Banning an already-banned account returns 422 rather than restamping the ban. Owner accounts are refused with 403: an API key has no acting user, so the panel's "can this admin manage that user" check cannot apply and the owner is protected outright. ## POST /api/v3/users/{id}/unban Lift a ban, clearing the reason and who set it. 422 when not banned. ## POST /api/v3/users/{id}/timeout Time an account out. Body parameters: duration integer required, at least 1 unit string required: minutes | hours | days reason string max 255 (defaults to "No reason provided") Re-timing an already timed-out account replaces the timeout. Owner accounts are refused with 403. ## DELETE /api/v3/users/{id}/timeout End a timeout early. 422 when the account is not timed out. ## POST /api/v3/users/{id}/flag Flag an account for review. Flags accumulate as a comma-separated list, the way the automated security checks write them; a reason already present is not duplicated. A flag is a review marker only and does not restrict the account. Body parameters: reason (required, max 255), replace (boolean, replaces existing flags instead of appending). ## DELETE /api/v3/users/{id}/flag Clear a flag. Body: reason removes only that flag, leaving the others; no body clears them all. flagged_at is cleared with the last flag. 422 when the account is not flagged. ## POST /api/v3/users/{id}/whitelist Add or remove the account from the whitelist, which exempts it from the automated security checks. Body: whitelisted (boolean, default true). ## POST /api/v3/users/bulk Run one moderation action across many accounts. Body parameters: action string required: ban | unban | timeout | remove_timeout | flag | unflag | whitelist | unwhitelist | points | add_group | remove_group user_ids array required, 1-200 user ids reason string required for ban and flag; optional for timeout/points duration + unit mixed required for timeout amount + operation mixed required for points (add | subtract | set) group string required for add_group / remove_group banned_by string User id recorded as the acting admin on ban Response data: action, processed[], processed_count, skipped[{user_id, reason}], skipped_count. Accounts already in the requested state are skipped rather than rewritten, so a bulk ban never overwrites an earlier ban reason. Owner accounts are skipped for ban and timeout, and the owner group cannot be added or removed (403). Points adjustments run through the same locked, ledger-writing path as POST /users/{id}/points, tagged api_bulk in the entry metadata. Missing per-action parameters are a 422 before anything is touched. ===================================================================== # GROUPS ===================================================================== Membership changes trigger the same group automations as the admin panel. The `owner` group cannot be managed through the API (403). ## GET /api/v3/groups List all groups (highest priority first) with member counts. Query parameters: search string Matches group name or display name Example response: { "success": true, "data": [ { "id": 3, "name": "vip", "display_name": "VIP", "priority": 40, "is_system": false, "is_default": false, "user_count": 120, "created_at": "..." } ], "meta": { "total_groups": 6 } } ## GET /api/v3/groups/{id}/users Members of a group with assignment metadata. Paginated. Query parameters: per_page integer Default 15, max 100 page integer Response data: group{...}, users[{id, username, global_name, kick_username, assigned_at, assigned_reason, expires_at}]. ## POST /api/v3/users/{id}/groups Add a user to a group by name or id. Re-adding an existing member is a safe no-op (automations are not re-triggered). Body parameters: group string Group name (case-insensitive); required when group_id absent group_id integer Group id; required when group absent expires_at date Optional membership expiry Example body: { "group": "vip" } Response data: user_id, groups[{id, name, display_name, priority}]. Owner group -> 403 { "success": false, "message": "The owner group cannot be managed through the API" }. ## DELETE /api/v3/users/{id}/groups/{group} Remove a user from a group. {group} accepts a group id or name. Removing a non-member is a safe no-op. Response data: user_id, groups[] (remaining memberships). ===================================================================== # BONUS HUNTS ===================================================================== ## GET /api/v3/bonus-hunts List bonus hunts. Query parameters: status string active | completed | inactive predictions_active boolean min_balance number max_balance number created_after date created_before date sort_by string id | start_balance | end_balance | created_at | updated_at sort_order string asc | desc per_page integer Default 15, max 100 Item keys: id, start_balance, end_balance, is_active, predictions_active, games_count, completed_games_count, predictions_count, total_bets, total_wins, profit_loss, all_games_completed, created_at, updated_at. ## POST /api/v3/bonus-hunts Create a bonus hunt, optionally with initial games. Returns 201. Body parameters: start_balance number required is_active boolean default true predictions_active boolean default true games array Items with name, bet (required), potential_win Example body: { "start_balance": 1000, "games": [{ "name": "Slot One", "bet": 100 }] } ## GET /api/v3/bonus-hunts/active Currently active hunts (no pagination). Response: { success, data[], total }. ## GET /api/v3/bonus-hunts/statistics Response data: total_hunts, active_hunts, completed_hunts, total_start_balance, total_end_balance, total_profit_loss, average_start_balance, recent_activity{today, this_week, this_month}, total_predictions, total_games, completed_games. ## GET /api/v3/bonus-hunts/latest/stream Server-Sent Events stream of the latest bonus hunt. Emits a `connected` event, then a `hunt-update` event on connect and whenever the hunt or its games change, with `: heartbeat` comments in between. Query parameters: duration integer Seconds to hold the connection (default 180, max 300) interval integer Seconds between change checks (default 2, max 30) active_only boolean Only stream the hunt while it is active The event data is { "hunt": {...} } where hunt matches GET /api/v3/bonus-hunts/{id}, or null when no hunt exists. Auth is the normal X-API-Key header, which browser EventSource cannot send - use a fetch-based SSE client, or the unauthenticated overlay stream at /overlays/bonus-hunt/stream for in-browser overlays. ## GET /api/v3/bonus-hunts/{id} One hunt with games[{id, name, bet, potential_win, actual_win, is_completed, multiplier, created_at, updated_at}] and predictions[{id, user_id, username, predicted_result, created_at}]. ## PUT /api/v3/bonus-hunts/{id} Body parameters: start_balance, end_balance, is_active, predictions_active. ## DELETE /api/v3/bonus-hunts/{id} Delete a hunt. Cannot be undone. ## GET /api/v3/bonus-hunts/{id}/games Games belonging to a hunt. ## PUT /api/v3/bonus-hunts/{huntId}/games/{gameId} Update one game. Setting actual_win marks the game completed and recalculates the hunt end balance. Body parameters: name, bet, potential_win, actual_win. potential_win is stored as the pending_win flag, so it round-trips as true/false rather than an amount. ===================================================================== # RAFFLES ===================================================================== Raffles (giveaways): management, entries, and winner draws. Raffle passwords are stored encrypted and are never returned. ## GET /api/v3/raffles List raffles with filtering, sorting and pagination. Query parameters: status string active | ended | drawn | undrawn search string Partial match on title sort_by string created_at (default), end_datetime, title sort_order string asc | desc (default) per_page integer Default 10, max 100 Item keys: id, title, description, image, is_active, allow_entries, is_accepting_entries, has_ended, end_datetime, auto_draw, number_of_winners, entries_count, is_drawn, drawn_at, groups[{id, name, display_name}], created_at, updated_at. ## POST /api/v3/raffles Create a raffle. Returns 201. Body parameters: title string required description string end_datetime date When entries close is_active boolean default true allow_entries boolean default true auto_draw boolean Scheduler draws it once ended number_of_winners integer default 1, max 999 passwords array Plain strings, stored encrypted group_ids array Groups allowed to enter (any-of) allow_passwordless_entry boolean One free entry per user allow_points_entry boolean With points_per_entry, max_points_entries require_watchtime boolean With watchtime_period, watchtime_minimum_seconds require_wager boolean With wager_period, wager_minimum, wager_platforms[] require_account_age boolean With account_age_minimum_days Example body: { "title": "Weekend Giveaway", "number_of_winners": 2, "allow_passwordless_entry": true, "passwords": ["SECRET"], "group_ids": [3] } ## GET /api/v3/raffles/active Raffles currently accepting entries. { success, data[], total }. ## GET /api/v3/raffles/statistics Response data: total_raffles, active_raffles, accepting_entries, drawn_raffles, recurring_raffles, total_entries, entries_by_type{type: count}, recent_activity{today, this_week, this_month}. ## GET /api/v3/raffles/{id} One raffle with entry_options{passwordless, password, active_password_count, points, points_per_entry, max_points_entries}, requirements{watchtime{...}, wager{...}, account_age{...}}, recurrence{is_recurring, cadence, paused, until, next_run_at}, and winners[]. 404 { "success": false, "message": "Raffle not found" } for unknown ids. ## PUT /api/v3/raffles/{id} Update a raffle. Only the fields sent are changed; sending group_ids replaces the whole group list. ## DELETE /api/v3/raffles/{id} Delete a raffle with its entries. Cannot be undone. ## GET /api/v3/raffles/{id}/entries Entries, highest ticket number first. Query parameters: entry_type (passwordless|password|points), user_id, per_page (default 25, max 100). Item keys: id, ticket_number, entry_type, points_spent, user_id, username, kick_username, created_at. ## POST /api/v3/raffles/{id}/entries Enter a user. Runs the site's checks (group access, entry window, watchtime/wager/account-age requirements, password validity) and mints the next ticket number. Returns 201. Body parameters: user_id string required, must exist entry_type string required, passwordless | password password string required when entry_type is password (case-insensitive) A refused entry returns 400 with the reason in message, or 403 when the user is not in an allowed group. Points entries are not available here - they spend the user's own balance and belong to the signed-in site flow. ## GET /api/v3/raffles/{id}/users/{userId}/entries That user's tickets plus has_won. { success, data[], total, has_won }. ## POST /api/v3/raffles/{id}/draw Draw winners the same way the auto-draw scheduler does. A user who has already won is never drawn again. Body parameters: count (integer, max winners to draw this pass). Response: { success, status, message, data{winners[], total_winners, number_of_winners, drawn_at} }. status is drawn | no_entries | no_eligible_entries | already_complete, and success is true only for drawn; the call is HTTP 200 in every case so you can branch on status. ===================================================================== # TOURNAMENTS ===================================================================== Slot tournaments: brackets, match results, prediction leaderboard. ## GET /api/v3/tournaments List tournaments with filtering, sorting and pagination. Query parameters: status string active | inactive predictions_active boolean Predictions open/closed size integer 4, 8, 16, 32 or 64 search string Partial match on name sort_by string created_at (default), name, size sort_order string asc | desc (default) per_page integer Default 10, max 100 Item keys: id, name, size, rounds, is_active, predictions_active, matches_count, predictions_count, created_at, updated_at. ## POST /api/v3/tournaments Create a tournament; the empty bracket for the size is generated with it, so every match already exists and only needs filling in. Returns 201. Body parameters: name string required size integer required, one of 4, 8, 16, 32, 64 is_active boolean default false predictions_active boolean default false Example body: { "name": "Slot Showdown", "size": 8, "is_active": true } ## GET /api/v3/tournaments/active Currently active tournaments (no pagination). { success, data[], total }. ## GET /api/v3/tournaments/statistics Response data: total_tournaments, active_tournaments, predictions_open, sizes{size: count}, total_matches, completed_matches, total_predictions, recent_activity{today, this_week, this_month}. ## GET /api/v3/tournaments/{id} One tournament with competitors[], winner, is_completed, and matches[{id, round, match_number, position, slot1{name, image, provider, slug, bet, win, multiplier, user_id}, slot2{...}, winner_name, winning_multiplier, is_completed, created_at, updated_at}]. 404 { "success": false, "message": "Tournament not found" } for unknown ids. ## PUT /api/v3/tournaments/{id} Body parameters: name, is_active, predictions_active. Size is fixed once the bracket exists. ## DELETE /api/v3/tournaments/{id} Delete a tournament with its bracket and predictions. Cannot be undone. ## GET /api/v3/tournaments/{id}/matches The bracket alone, ordered by round then match number. ## PUT /api/v3/tournaments/{id}/matches/{matchId} Record a match result. Setting winner_name advances that slot (image, provider, slug, bet and assigned user included) into its place in the next round. Body parameters: slot1_name, slot1_image, slot1_provider, slot1_slug, slot1_bet, slot1_win, slot1_multiplier, slot1_user_id, the same slot2_* fields, winner_name, winning_multiplier. ## GET /api/v3/tournaments/{id}/predictions Prediction leaderboard, highest score first: data[{id, user_id, username, kick_username, score, decided_matches, picks[{match_id, round, match_number, predicted_winner, actual_winner}], created_at}], total. Only matches with a decided winner count toward score and decided_matches. ===================================================================== # WAGERING ===================================================================== Read-only wagering data. ## GET /api/v3/wagering/users/stats How much one user has wagered on each casino platform, with their group memberships. Query parameters: user_id string Required when kick_username is not given; must exist kick_username string Required when user_id is not given; must exist date_range string 7_days | 14_days | 30_days (default) | all_time start_date date Custom window start (YYYY-MM-DD); overrides date_range end_date date Custom window end; must be >= start_date Response data: user{id, username, kick_username}, groups[], and wagering{total_platforms_matched, total_wagered, platforms[{platform{id, name, platform_type, color}, user_data{wagered, deposited, earned, rank, active}, found}], filters{date_range, start_date, end_date}}. Example response: { "success": true, "data": { "user": { "id": "123456789012345678", "username": "player_one", "kick_username": "player_one" }, "groups": [{ "id": 3, "name": "vip", "display_name": "VIP", "priority": 40 }], "wagering": { "total_platforms_matched": 2, "total_wagered": 25400.5, "platforms": [ { "platform": { "id": 3, "name": "Platform One", "platform_type": "example", "color": "#7c3aed" }, "user_data": { "wagered": 25400.5, "deposited": 1200, "earned": null, "rank": 4, "active": true }, "found": true }, { "platform": { "id": 5, "name": "Platform Two", "platform_type": "example_two", "color": "#0ea5e9" }, "user_data": null, "found": false } ], "filters": { "date_range": "30_days", "start_date": "2026-07-06", "end_date": "2026-08-05" } } } } The figures are the same ones GET /api/v3/users/{id} reports, from the same lookup, but casino identities are stripped here: no crypto addresses and no per-platform casino usernames. This endpoint needs only a wagering permission, so returning them would let a caller harvest linked accounts by walking user ids - use /api/v3/users/{id} for the full breakdown. Every active platform is queried live, so a call can take several seconds. `wagering` is null when every lookup failed, which is different from a user who has wagered nothing. ## GET /api/v3/wagering/statistics Top platforms ranked by wager-evaluation frequency. Response data: top_platforms[{name, platform_type, check_count}]. ## GET /api/v3/wagering/platforms All active casino platforms. Response: data[{id, name, slug, platform_type, created_at}], meta{total_platforms, platform_types[]}. ## GET /api/v3/wagering/platforms/{id}/statistics Statistics for one platform over the last 30 days (the window is fixed server-side; date parameters are ignored). Response detail depends on the platform type. Platform types without statistics support return HTTP 200 with { "success": false, "message": "Platform statistics not supported for this platform type" }. Temporary upstream failures also return HTTP 200 with statistics: null and an error message. ## GET /api/v3/wagering/leaderboards List wager leaderboards. Active only unless include_inactive is set. Query parameters: platform string Casino platform slug platform_id integer Casino platform id timeframe string weekly | bi-weekly | monthly | custom include_inactive boolean Include inactive boards Item keys: id, name, platform{id, name, slug, platform_type}, timeframe, leaderboard_type, prize_pool, currency, currency_symbol, is_active, is_paused, max_users_shown, obfuscation_type. ## GET /api/v3/wagering/leaderboards/{id} One leaderboard plus use_points_percentage, points_percentage, auto_award_points, pause_message, rules, blocked_countries, current_period{start, end}, last_period{start, end}, prizes[{position, amount, points}], snapshots_count. 404 { "success": false, "message": "Leaderboard not found" } for unknown ids. ## GET /api/v3/wagering/leaderboards/{id}/standings Ranked standings with the blacklist and manual adjustments applied and prizes attached by position. Query parameters: period string current (default) | last limit integer Max 500; defaults to the board's max_users_shown obfuscate boolean Apply the board's username obfuscation (off by default) Response data: leaderboard, period{type, start, end}, standings[{position, username, user_id, wagered, weighted_wagered, adjustment, prize, points_prize}], total_wagered, fetched_at, is_stale. Served from the shared wager snapshot store, so the call never blocks on a platform affiliate API: past its freshness window a refresh is attempted within the platform rate gate, and stale data is returned rather than an error. Check fetched_at and is_stale. ## GET /api/v3/wagering/leaderboards/{id}/snapshots Completed periods, newest first: data[{id, period_start, period_end, period_name, entries_count, prize_pool, fetched_at, points_awarded_at}]. ## GET /api/v3/wagering/leaderboards/{id}/snapshots/{snapshotId} Frozen standings of one completed period. Query parameters: limit, obfuscate. Response data: leaderboard, snapshot{...}, standings[], total_wagered. Prizes come from the ladder frozen onto the snapshot, so history shows what was actually paid even if the board's prizes changed since; adjustments are not re-applied because stored standings are final. ===================================================================== # POINTS STORE ===================================================================== Store catalogue, categories, purchases and the purchase blacklist. Purchases go through the same service the site uses, so an API purchase runs every eligibility check a signed-in one does. ## GET /api/v3/store/items List store items with stock, category, required group and requirements. Query parameters: search string Matches item name or description category_id integer Category id, or "none" for uncategorised group_id integer Required group id, or "none" for unrestricted is_active boolean Listed / hidden items in_stock boolean Only items with stock left min_cost integer Minimum points cost max_cost integer Maximum points cost sort_by string created_at (default), item_name, item_cost, item_quantity sort_order string asc | desc (default) per_page integer Default 15, max 100 Item keys: id, name, description, image, image_url, cost, quantity, in_stock, max_purchases_per_user, is_active, category{id, name, slug}, group{id, name, display_name, priority}, requirements{watchtime{required, period, minimum_seconds}, wager{required, period, minimum, platforms[]}}, redemptions_count, created_at, updated_at. ## POST /api/v3/store/items Create an item. Returns 201. Body parameters: item_name string required, unique item_desc string required item_image string required, public-disk path or absolute URL (a string, not a file upload) item_cost integer required, points per unit item_quantity integer required, stock max_purchases_per_user integer Lifetime limit per user category_id integer Existing category group_id integer Group required to buy is_active boolean default true require_watchtime boolean With watchtime_period (today|week|month|all), watchtime_minimum_seconds require_wager boolean With wager_period, wager_minimum, wager_platforms[] (casino platform ids) ## GET /api/v3/store/items/{id} One item plus analytics{total_redemptions, total_quantity, total_points_spent, unique_buyers, pending, processed, rejected, top_buyers[{user_id, purchases, quantity}]}. ## PUT /api/v3/store/items/{id} Update an item. Only the fields sent are changed; an omitted boolean keeps its current value. ## DELETE /api/v3/store/items/{id} Delete an item. redemptions.item_id cascades, so its purchase history goes too. ## GET /api/v3/store/categories Categories in display order: data[{id, name, slug, sort_order, items_count, created_at}], total. ## POST /api/v3/store/categories Create a category (name required and unique; slug derived from the name when omitted; sort_order optional). Returns 201. ## DELETE /api/v3/store/categories/{id} Delete a category. Its items are kept and become uncategorised. ## GET /api/v3/store/statistics Response data: items{total, active, out_of_stock, categories}, redemptions{total, pending, processed, rejected, unique_buyers}, points_spent (rejected purchases excluded - they are refunded), recent_activity{today, this_week, this_month}, top_items[{item_id, name, cost, purchases, quantity}], blacklisted_users. ## GET /api/v3/store/redemptions Purchases, newest first, with the buyer and the item. Query parameters: status string pending | processed | rejected user_id string Only this buyer item_id integer Only this item search string Buyer username / Kick username date_from date Purchased on or after date_to date Purchased on or before per_page integer Default 25, max 100 Item keys: id, status, quantity, points_spent, user{id, username, global_name, kick_username, avatar}, item{id, name, cost, image_url}, is_processed, is_rejected, rejection_reason, rejected_at, rejected_by, created_at, updated_at. ## POST /api/v3/store/redemptions Buy an item for a user. Returns 201. Body parameters: user_id string required, the buyer whose points are spent item_id integer required quantity integer default 1, max 100 (costs cost x quantity) Runs the store blacklist, item-active, required-group, watchtime, wager, stock and per-user-limit checks, then spends the buyer's points atomically. The buyer gets the same notification and Discord webhook a site purchase produces. Response data: redemption, points_spent, user_points, item_quantity. A refused purchase returns 400 (403 for group_denied) with a status of blacklisted | inactive | group_denied | watchtime | wager | insufficient_points | out_of_stock | limit_reached and a message written for the buyer. Nothing is charged. ## GET /api/v3/store/redemptions/stream Stream purchases as Server-Sent Events. Query parameters: duration integer Seconds to keep the connection open (default 180, max 300) interval integer Seconds between checks (default 2, max 30) status string pending | processed | rejected item_id integer Only purchases of this item user_id string Only purchases by this user since_id integer Resume after this redemption id backfill integer Replay this many recent purchases on connect (max 100) Events: connected { status, last_id, filters } redemption A new purchase, same shape as GET /store/redemptions redemption-status A watched purchase changed to processed or rejected : heartbeat Comment line sent while nothing is happening Without since_id the stream starts from the newest purchase at connect time. Keep the last id you saw and pass it as since_id when reconnecting so nothing is missed or replayed. The connection closes when duration elapses; reconnect to keep watching. ## POST /api/v3/store/redemptions/{id}/process Mark a purchase fulfilled and notify the buyer. 422 when it was already processed or rejected, or when the buyer's account is disabled. ## POST /api/v3/store/redemptions/{id}/reject Reject a purchase: refunds the points (a store_refund ledger row), restores the stock and tells the buyer why. Body parameters: reason (max 500), rejected_by (user id recorded as the rejecting admin). Response data: redemption, points_refunded. 422 for a purchase that was already processed or rejected. ## GET /api/v3/store/blacklist Users banned from buying. Query parameter: search. Item keys: id, user_id, username, kick_username, reason, blacklisted_by, blacklisted_by_username, created_at. ## POST /api/v3/store/blacklist Ban a user (user_id required, reason, blacklisted_by). Returns 201. Writes to the unified blacklist the admin panel manages; adding someone already listed returns the existing entry. ## DELETE /api/v3/store/blacklist/{userId} Lift a ban. 404 when the user was not listed. ===================================================================== # CHALLENGES ===================================================================== Requires the Challenges module: every route below returns HTTP 403 without it, and the `challenges` permission is only offered while it is enabled. A challenge is a slot, a multiplier target and a minimum bet, with a prize for the first person to hit it. A viewer either submits a claim with evidence for review, or the win is settled off-site and a winner is assigned directly. Note on status: nothing sweeps `status` when a challenge's end date passes, so an `Active` row can be long finished. `is_live` and `is_expired` are derived from the dates on read, and `live=true` is the filter that means "open right now". ## GET /api/v3/challenges List challenges, newest first. Query parameters: status string Active, Upcoming, Claimed, Expired live boolean Active, started and unfinished. Narrower than status=Active, which ignores the dates claimed boolean Only challenges with (or without) a winner slot_name string Partial match on the slot search string Alias of slot_name starts_after date Starts on or after ends_before date Ends on or before min_prize number max_prize number sort_by string id, slot_name, prize, multiplier, start_date, end_date, created_at (default created_at) sort_order string asc, desc (default desc) per_page integer Default 15, max 100 curl "https://your-site.com/api/v3/challenges?live=true" \ -H "X-API-Key: YOUR_KEY" { "success": true, "data": [ { "id": 12, "slot_name": "Sweet Bonanza", "slot_image": "https://mediumrare.imgix.net/f95b3adf...", "play_link": "https://stake.com/casino/games/sweet-bonanza", "multiplier": 100, "min_bet": 0.2, "prize": 250, "status": "Active", "start_date": "2026-08-06T00:00:00.000000Z", "end_date": "2026-08-13T00:00:00.000000Z", "is_live": true, "is_expired": false, "claims_count": 3, "pending_claims_count": 1, "winner": null, "created_at": "...", "updated_at": "..." } ], "pagination": { "current_page": 1, "last_page": 1, "per_page": 15, "total": 4, "from": 1, "to": 4 } } `winner` is null until a challenge is claimed, then carries id, username, global_name, kick_username and avatar. `slot_image` is null when there is no artwork. ## GET /api/v3/challenges/statistics Counts and prize totals. { "success": true, "data": { "challenges": { "total": 24, "active": 4, "upcoming": 1, "claimed": 17, "expired": 2, "live": 3 }, "prizes": { "total": 6100, "awarded": 4250, "outstanding": 1850 }, "claims": { "total": 61, "pending": 2, "approved": 41, "rejected": 18 } } } `awarded` sums the prizes of challenges that have a winner; `outstanding` sums the rest. ## GET /api/v3/challenges/{id} One challenge, plus every claim against it under `claims`. ## POST /api/v3/challenges Create a challenge. Body parameters: slot_name string Required start_date date Required end_date date Required, after start_date multiplier number Required, the target (100 = 100x) min_bet number Required prize number Required play_link string Optional URL to the game slot_image string Optional artwork URL curl -X POST "https://your-site.com/api/v3/challenges" \ -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \ -d '{"slot_name":"Sweet Bonanza","start_date":"2026-08-10", "end_date":"2026-08-17","multiplier":100,"min_bet":0.2, "prize":250}' `status` is not accepted: it is set from start_date, Upcoming when that is in the future and Active otherwise. Omit slot_image and the slot catalogue is searched by name, preferring an exact match; a miss leaves it empty. Returns 201. ## PUT /api/v3/challenges/{id} Update a challenge. Every field is optional; `status` is accepted here (Active, Upcoming, Claimed, Expired). Dates are checked against the stored value, so sending one alone cannot invert the pair. Send slot_image as null to clear the artwork. ## DELETE /api/v3/challenges/{id} Delete a challenge and every claim against it — the claims describe a challenge that no longer exists. `data.claims_deleted` says how many went. ## POST /api/v3/challenges/{id}/winner Hand a challenge to an account without a claim to review, for a win settled in chat or on stream. Marks it Claimed. Body parameters: user_id string Required unless kick_username is given kick_username string Required unless user_id is given (case-insensitive) ## DELETE /api/v3/challenges/{id}/winner Clear the winner and put the challenge back in play. Body parameters: status string What to set it to. Defaults to Active while it is still running, Expired once it is not The status moves with the winner: Claimed with nobody holding it is a state nothing else understands. ## GET /api/v3/challenges/claims Claims across every challenge, newest first. Query parameters: challenge_id integer Only this challenge's claims status string pending, approved, rejected user_id string Only this account's claims kick_username string Only this Kick account's claims search string Description, claimant or slot sort_by string id, status, created_at, reviewed_at sort_order string asc, desc (default desc) per_page integer Default 15, max 100 An unrecognised `status` is a 422 rather than an empty list. { "success": true, "data": [ { "id": 88, "challenge_id": 12, "status": "pending", "status_label": "Pending Review", "description": "Hit 118x on a 0.20 spin", "evidence_images": ["/storage/challenge-claims/1_abc.png"], "admin_notes": null, "user": { "id": "123456789012345678", "username": "player_one", "kick_username": "player_one", "avatar": "a1b2c3d4" }, "reviewed_by": null, "reviewed_at": null, "created_at": "...", "challenge": { "id": 12, "slot_name": "Sweet Bonanza", "multiplier": 100, "min_bet": 0.2, "prize": 250, "status": "Active" } } ], "pagination": { "...": "..." } } ## GET /api/v3/challenges/claims/{claimId} One claim, with its challenge and reviewer. ## POST /api/v3/challenges/claims/{claimId}/review Approve or reject a claim. Body parameters: status string Required, approved or rejected admin_notes string Optional, max 1000, shown with the decision reviewed_by string Optional account id to credit the decision to Approving hands the challenge to that account and marks it Claimed, exactly as the admin panel does. A claim that has already been decided returns 409. A key is not a person, so reviewed_by stays null unless you name an account. ## DELETE /api/v3/challenges/claims/{claimId} Delete a claim. Does not undo an approval — a challenge already handed to that account keeps its winner; clear it with DELETE /api/v3/challenges/{id}/winner. ===================================================================== # VIP REWARDS ===================================================================== Requires the VIP Rewards module: every route below returns HTTP 403 without it, and the `vip-rewards` permission is only offered while it is enabled. A tier is a wager threshold across one or more casino platforms, paying either cash or points. A user who crosses the threshold claims it, which writes a claim row; an operator then pays it out and marks it processed. There is no endpoint to create a claim. A claim is what a user gets for meeting a threshold on the site, so minting one through a key would hand out a reward nobody earned. Claims are readable, processable and deletable only. Two things are computed on read rather than stored: `reset.current_period_start`, the window a resetting tier is currently measuring against (null on a tier that does not reset), and `wager_types`, which only carries platforms that offer a choice — the rest read their platform default. ## GET /api/v3/vip-rewards/tiers List reward tiers, cheapest threshold first. Query parameters: is_active boolean Only active, or only inactive reward_type string cash, points search string Partial match on the tier name min_wagered number Range on the tier's own threshold max_wagered number platform_id integer Tiers counting wagers on this casino platform sort_by string id, name, min_wagered, reward_amount, reward_type, is_active, created_at (default min_wagered) sort_order string asc, desc (default asc) per_page integer Default 15, max 100 curl "https://your-site.com/api/v3/vip-rewards/tiers?is_active=true" \ -H "X-API-Key: YOUR_KEY" { "success": true, "data": [ { "id": 3, "name": "Diamond", "description": "Wager $250k across Stake and Roobet", "image": "/storage/media/tiers/diamond.png", "min_wagered": 250000, "reward_type": "cash", "reward_amount": 500, "is_active": true, "casino_platforms": [1, 4], "wager_types": { "1": "weighted" }, "reset": { "enabled": true, "interval_value": 1, "interval_unit": "months", "start_date": "2026-01-01", "current_period_start": "2026-08-01T00:00:00.000000Z" }, "wager_window": { "all_time": false, "after_date": null, "from_reset": true }, "claims_count": 12, "created_at": "...", "updated_at": "..." } ], "pagination": { "current_page": 1, "last_page": 1, "per_page": 15, "total": 4, "from": 1, "to": 4 } } ## GET /api/v3/vip-rewards/statistics Tier and claim counts, with payout totals split by reward type. Cash and points are reported separately rather than summed — they are different units. { "success": true, "data": { "tiers": { "total": 6, "active": 5, "inactive": 1, "resetting": 2 }, "claims": { "total": 148, "processed": 131, "unprocessed": 17, "last_7_days": 9 }, "cash": { "claims": 96, "total": 21400, "unprocessed": 1250 }, "points": { "claims": 52, "total": 78000, "unprocessed": 4000 } } } ## GET /api/v3/vip-rewards/tiers/{id} One tier. 404 when it does not exist. ## POST /api/v3/vip-rewards/tiers Create a tier. Returns 201. Body parameters: name string Required, unique across tiers casino_platforms array Required, platform ids whose wagers count min_wagered number Required, the threshold that unlocks it reward_type string Required, cash or points reward_amount number Required wager_types object Platform id to wager type. Entries for single-option platforms are dropped and unknown values fall back to the default description string Max 500 image string Media URL or public-disk path, not an upload is_active boolean Default true reset_enabled boolean With reset_interval_value, reset_interval_unit (days, weeks, months) and reset_start_date count_wager_all_time boolean Default true. With count_wager_after_date and count_wager_from_reset ## PUT /api/v3/vip-rewards/tiers/{id} Update a tier. Every field is optional and omitted fields are left alone. `remove_image` clears the artwork and wins over `image` if both are sent. Changing `casino_platforms` re-sanitises `wager_types` against the new list, dropping any keyed to a platform the tier no longer counts. ## DELETE /api/v3/vip-rewards/tiers/{id} Delete a tier and every claim against it. The claims table has no cascade, so they are deleted explicitly and the count is reported: { "success": true, "message": "VIP reward tier deleted", "data": { "claims_deleted": 12 } } ## GET /api/v3/vip-rewards/claims Every claim across all tiers, newest first. Query parameters: processed boolean Paid out, or still in the queue reward_type string cash, points tier_id integer Claims against one tier user_id string One account's claims kick_username string Exact match on the claimant's Kick username search string Partial match on username, Kick username or global name claimed_after date Claim date range (YYYY-MM-DD) claimed_before date sort_by string id, reward_amount, wagered_amount_at_claim, processed_at, created_at (default created_at) sort_order string asc, desc (default desc) per_page integer Default 15, max 100 { "success": true, "data": [ { "id": 412, "tier": { "id": 3, "name": "Diamond", "min_wagered": 250000 }, "user": { "id": "123456789012345678", "username": "player_one", "global_name": "Player One", "kick_username": "playerone", "avatar": "..." }, "reward_type": "cash", "reward_amount": 500, "wagered_amount_at_claim": 263914.55, "processed": false, "processed_at": null, "created_at": "..." } ], "pagination": { "current_page": 1, "last_page": 3, "per_page": 15, "total": 17, "from": 1, "to": 15 } } ## GET /api/v3/vip-rewards/tiers/{id}/claims One tier's claims. Takes the same filters as the global claim list. ## GET /api/v3/vip-rewards/claims/stream Server-sent events: new claims as they are made, and processed-state changes on the ones already sent. Declared before /claims/{claimId}, or "stream" would be read as a claim id. Query parameters: duration integer Seconds to hold the stream open, default 180, max 300 interval integer Seconds between polls, default 2, max 30 backfill integer Replay this many recent claims on connect, oldest first, max 100 since_id integer Resume after a claim id rather than from the newest processed boolean Narrow the feed, same meaning as on the claim list reward_type string tier_id integer curl -N "https://your-site.com/api/v3/vip-rewards/claims/stream?processed=false" \ -H "X-API-Key: YOUR_KEY" event: connected data: { "status": "connected", "last_id": 412, "filters": { "processed": false } } event: claim data: { "id": 413, "tier": { "id": 3, "name": "Diamond" }, "user": { "...": "user" }, "reward_type": "cash", "reward_amount": 500, "processed": false, "created_at": "..." } event: claim-processed data: { "id": 413, "processed": true, "processed_at": "...", "...": "claim" } event: claim-removed data: { "id": 401 } : heartbeat `claim-processed` fires in both directions, including when a claim leaves the filtered set — a client watching processed=false is told to drop the row rather than left holding a settled claim. `claim-removed` means the claim no longer exists. A comment line (`: heartbeat`) is sent on a tick with nothing to report, so an idle connection is not mistaken for a dead one. A poll that throws is logged and retried on the next tick instead of killing the stream. ## GET /api/v3/vip-rewards/claims/{claimId} One claim. Declared before /tiers/{id}, so /vip-rewards/claims is the claim list and never a tier with the id "claims". ## POST /api/v3/vip-rewards/claims/{claimId}/process Mark a claim paid out, or put it back in the queue. Body parameters: processed boolean Default true. Send false to reopen a claim, which also clears processed_at A claim already in the requested state returns 409 rather than succeeding quietly — the usual reason for sending this twice is thinking the first attempt failed, and a success there would suggest a second payout went out. ## DELETE /api/v3/vip-rewards/claims/{claimId} Delete a claim. This lets that user claim the tier again: eligibility is decided by whether a claim row exists for the current reset period. ===================================================================== # POINTS ===================================================================== The points ledger and balances. Changing one user's balance lives on the user resource: POST /api/v3/users/{id}/points. ## GET /api/v3/points/log The ledger across all users, newest first. Query parameters: user_id string Only this user's rows reason string store_purchase, store_refund, admin_adjustment, ... source string Originating system, when recorded direction string gained (credits) | lost (debits) search string Username / Kick username date_from date On or after date_to date On or before per_page integer Default 25, max 100 Item keys: id, user_id, username, kick_username, amount, balance_before, balance_after, reason, reason_label, source, actor_id, metadata, created_at. Also returns totals{entries, gained, lost} for the filtered set and filters{reasons[]}. History is a rolling 60-day window - points-log:prune removes older rows. ## GET /api/v3/points/statistics Query parameter: days (1-60, default 30). Response data: balances{total_points, holders, average, highest}, ledger{window_days, since, entries, gained, lost, by_reason[{reason, reason_label, entries, net, gained, lost}]}, codes{total, active, total_uses}. ## GET /api/v3/points/leaderboard Users ranked by current balance; disabled accounts excluded by default. Query parameters: include_disabled (boolean), per_page (default 25, max 100). Item keys: position, user_id, username, global_name, kick_username, avatar, points, xp. position continues across pages. ===================================================================== # WINNER LOGS ===================================================================== The record of what has been won and paid out, across bonus hunts, raffles, giveaways, tournaments and anything else. ## GET /api/v3/winner-logs List winner logs. Totals cover the whole filtered set, not just the page. Query parameters: category string bonus_hunts | raffles | giveaways | tournaments | other status string processed | unprocessed user_id string Only this winner min_value number Wins worth at least this much search string Description, custom category, or the winner's username / Kick username / global name date_from date Recorded on or after date_to date Recorded on or before with_crypto boolean Include the winner's payout addresses (off by default) sort_by string created_at (default), value, category, id sort_order string asc | desc (default) per_page integer Default 15, max 100 Item keys: id, value, description, category, custom_category, category_label, processed, processed_at, user{id, username, global_name, kick_username, avatar}, created_at, updated_at. Also returns totals{entries, value}. With with_crypto=1 the user object also carries crypto_addresses[{field_id, slug, label, value}], ordered by the field's display order. ## POST /api/v3/winner-logs Record a win. Returns 201. Body parameters: user_id string required, the winner value number required, what the win is worth description string required, max 255 category string required, one of the five categories custom_category string required when category is other; it becomes the displayed category processed boolean Record it as already paid out (default false) ## GET /api/v3/winner-logs/categories data[{key, label}] for the five categories. ## GET /api/v3/winner-logs/statistics Query parameter: days (1-365, default 30, for the daily series). Response data: entries{total, processed, unprocessed, winners}, value{total, unprocessed, last_24h, last_7_days, last_30_days}, by_category[{category, label, entries, value}], top_winners[{user_id, username, kick_username, wins, value}], daily{window_days, since, points[{date, entries, value}]}. daily.points only contains days that had payouts; days with none are absent rather than zero-filled. ## GET /api/v3/winner-logs/{id} One log. Accepts with_crypto. 404 { "success": false, "message": "Winner log not found" } for unknown ids. ## PUT /api/v3/winner-logs/{id} Update a log. Only the fields sent are changed. custom_category cannot be cleared while the log is filed under "other". Flipping processed stamps or clears processed_at. ## POST /api/v3/winner-logs/{id}/process Mark a win paid out, or put it back in the queue. Body parameters: processed (boolean, default true; false clears processed_at). processed_at is stamped when a win first becomes processed and kept on repeat calls, so re-sending processed=true never moves the payout date. ## DELETE /api/v3/winner-logs/{id} Delete a winner log. ===================================================================== # KICK ===================================================================== Channel and bot status, chat commands, timed messages and watch time. Credentials are never returned - the OAuth client secret and tokens stay server-side, and settings are changed in the admin panel. ## GET /api/v3/kick/status Response data: channel, chatroom_id, is_live, stream{session_id, title, category, started_at, uptime_seconds, peak_viewers, average_viewers, total_messages, total_chatters} (null when offline), last_check{viewer_count, stream_title, category, thumbnail, started_at, checked_at}, bot{connected, last_heartbeat, commands, timed_commands}. last_check is the poller's own record of the channel and carries the thumbnail and viewer count the session row does not. ## GET /api/v3/kick/settings Read-only. Response data: stream_username, chatroom_id, bot_settings{follow_message_enabled, follow_message, sub_renewal_message_enabled, sub_renewal_message, sub_gift_message_enabled, sub_gift_message, first_sub_message_enabled, first_sub_message}, moderation_sync{sync_bans_to_kick, sync_bans_from_kick, sync_timeouts_to_kick, sync_timeouts_from_kick}, bot_connected, bot_last_heartbeat, require_kick_connection. ## GET /api/v3/kick/commands Chat commands the bot answers (database commands only - the bot's built-in commands resolve first and are not listed here). Query parameters: search string Command name or response text enabled boolean Only enabled / only disabled role string Commands a role can run: broadcaster, moderator, vip, og, founder, subscriber, viewer per_page integer Default 50, max 100 Item keys: id, name, content, enabled, permissions[], created_by, created_by_username, created_at, updated_at. ## POST /api/v3/kick/commands Create a command. Returns 201. Body parameters: name string required, unique (include the prefix chat types) content string required, max 2000 permissions array Roles allowed to run it; defaults to ["viewer"] (an empty list falls back to viewer too) enabled boolean default true created_by string User id recorded as the author ## PUT /api/v3/kick/commands/{id} Update a command. Only the fields sent are changed. ## POST /api/v3/kick/commands/{id}/toggle Turn a command on or off. Body: enabled (boolean); with no body it flips. ## DELETE /api/v3/kick/commands/{id} Delete a command. ## GET /api/v3/kick/timed-commands Messages the bot posts on a timer. Query parameters: search, is_active, per_page (default 50, max 100). Item keys: id, name, content, interval_seconds, is_active, created_by, created_by_username, created_at, updated_at. ## POST /api/v3/kick/timed-commands Create a timed message. Returns 201. Body parameters: name string required, unique content string required, max 2000 interval_seconds integer required, 30 to 86400 is_active boolean default true created_by string User id recorded as the author ## PUT /api/v3/kick/timed-commands/{id} Update a timed message. Only the fields sent are changed. ## POST /api/v3/kick/timed-commands/{id}/toggle Start or pause a timed message. Body: is_active (boolean); with no body it flips. ## DELETE /api/v3/kick/timed-commands/{id} Delete a timed message. ## GET /api/v3/kick/watchtime Watch time ranked by user. Query parameters: period string today | week | month | all (default all) user_id string Only this user session_id string Only this stream session per_page integer Default 25, max 100 Item keys: position, user_id, username, kick_username, avatar, watch_time_seconds, sessions. Watch time is recorded per stream session, so sessions is how many broadcasts the user was counted in; position continues across pages. ===================================================================== # STREAM STATISTICS ===================================================================== Broadcast sessions, their minute-by-minute snapshots, and the chatters seen in them. Chatters are matched to site accounts by Kick username; user is null for chatters with no account here. ## GET /api/v3/stream-stats/overview Query parameters: platform string kick (default) | twitch period string 24h | 7d | 30d (default) | 90d | all chatter_limit integer Top chatters to return (default 10, max 100) Response data: platform, period{key, since}, totals{sessions, stream_time_seconds, average_viewers, peak_viewers, total_messages, total_chatters, total_follows, total_new_subs, total_resubscribes, total_gifted_subs, total_kicks_gifted, total_points_distributed}, daily[{date, sessions, stream_time_seconds, average_viewers, peak_viewers, messages, follows, subs, kicks_gifted, points_distributed}], categories[{category, sessions, stream_time_seconds, average_viewers, peak_viewers}], top_chatters[{username, message_count, sessions_seen, user}], live_session (null when offline). ## GET /api/v3/stream-stats/live Query parameter: platform. Returns 200 with is_live false and data null when nothing is live, so it can be polled directly. Response data: session, latest_snapshot, uptime_seconds. Snapshot keys: timestamp, viewers, chatters, active_chatters, title, category, messages, follows, new_subs, resubscribes, gifted_subs, kicks_gifted, points_distributed, this_interval{messages, follows, new_subs, resubscribes, gifted_subs, kicks_gifted, points_distributed}. The top-level counters are running totals for the session; this_interval is what happened since the previous snapshot. ## GET /api/v3/stream-stats/sessions Broadcast sessions, newest first. Query parameters: platform string kick (default) | twitch search string Title or category category string Partial match on category live boolean Only the live session / only finished ones date_from date Started on or after date_to date Started on or before per_page integer Default 15, max 100 Item keys: session_id, platform, channel_name, user_id, title, category, is_live, started_at, ended_at, duration_seconds, peak_viewers, min_viewers, average_viewers, viewer_trend, peak_chatters, messages_per_minute, total_messages, total_chatters, total_follows, total_new_subs, total_resubscribes, total_gifted_subs, total_kicks_gifted, total_points_distributed. ## GET /api/v3/stream-stats/sessions/{sessionId} One session with its snapshot history and top chatters. Query parameters: history boolean Include the series (default true; 0 omits it) history_limit integer Max points (default 500, max 5000) chatter_limit integer Top chatters (default 10, max 100) Response data: session, history[], top_chatters[]. A long stream holds thousands of snapshots; past history_limit the series is evenly sampled rather than truncated, so it still covers the whole broadcast. Unknown ids return 404. ## GET /api/v3/stream-stats/sessions/{sessionId}/chatters Everyone who chatted in a session, most messages first. Query parameters: search, per_page (default 50, max 100). Item keys: username, kick_user_id, message_count, user. ===================================================================== # SLOT CALLS ===================================================================== Two separate systems: - the chat queue (/slot-calls), one open list of slots called in Kick chat, keyed by chat username with one entry per caller; - bonus hunt slot calls (/bonus-hunts/{id}/slot-calls), tied to a hunt and to site accounts, which can be bonused into hunt games. ## GET /api/v3/slot-calls The chat queue, newest first. Query parameters: kick_username string That caller's entry (case-insensitive) search string Slot name or caller sort_by string created_at (default), slot_name, kick_username sort_order string asc | desc (default) per_page integer Default 50, max 100 Item keys: id, kick_username, slot_name, image, user (the matching site account or null), created_at, updated_at. The response also carries enabled, mirroring GET /slot-calls/settings. ## POST /api/v3/slot-calls Add a slot to the queue. 201 for a new caller, 200 when an existing entry is replaced. Body parameters: kick_username string required slot_name string required image string Optional artwork URL One entry per caller: calling again replaces that caller's slot rather than adding a row, and the response reports replaced_existing. The stored username keeps the casing it was first called with. Returns 403 when the queue is closed. ## DELETE /api/v3/slot-calls Empty the queue, or one caller's entry with kick_username. Response: { success, message, deleted }. ## DELETE /api/v3/slot-calls/{id} Remove one entry. ## GET /api/v3/slot-calls/stream Stream the chat queue as Server-Sent Events. Query parameters: duration integer Seconds to keep the connection open (default 180, max 300) interval integer Seconds between checks (default 2, max 30) kick_username string Watch only this caller's entry since_id integer Resume after this call id backfill integer Replay this many recent calls on connect (max 100) Events: connected { status, last_id, enabled, queued, filters } slot-call A new call, same shape as GET /slot-calls slot-call-updated A caller replaced their slot (replaced_existing true) slot-call-removed { id } - the entry was deleted or the queue cleared queue-settings { enabled } - the queue opened or closed : heartbeat Comment line sent while nothing is happening Removals and replacements are only reported for entries the stream has already sent, so pair backfill with a long-running connection to track the whole queue. Without since_id the stream starts from the newest call at connect time. ## GET /api/v3/slot-calls/settings { enabled, queued }. ## PUT /api/v3/slot-calls/settings Open or close the queue. Body: enabled (boolean, required). This is the same switch the Kick bot reads; closing it only stops new calls, existing entries stay until cleared. ## GET /api/v3/bonus-hunts/{huntId}/slot-calls Slot calls made for a hunt. Query parameters: status string pending | bonused | did_not_bonus | rejected user_id string Only this caller search string Partial match on the slot name per_page integer Default 50, max 100 Item keys: id, bonus_hunt_id, status, slot{name, slug, image, provider, external_id}, user{id, username, global_name, kick_username, avatar}, game (the hunt game the call became, once bonused), created_at, updated_at. The response also carries settings{enabled, entries_open, max_per_user, allow_duplicates} and counts{total, pending, bonused, did_not_bonus, rejected}. ## POST /api/v3/bonus-hunts/{huntId}/slot-calls Call a slot on a user's behalf. Returns 201. Body parameters: user_id string required, the caller slot_name string required slot_slug string slot_image string slot_provider string slot_external_id integer Used instead of the name for duplicate checks Runs the hunt's own rules: 403 when slot calls are off or entries are closed, 422 when the caller is at their cap or the slot is already called and duplicates are not allowed. ## GET /api/v3/bonus-hunts/{huntId}/slot-calls/random Roll a random pending call; nothing is changed. 404 when nothing is pending. ## GET /api/v3/bonus-hunts/{huntId}/slot-calls/stream Stream a hunt's slot calls as Server-Sent Events. Query parameters: duration integer Seconds to keep the connection open (default 180, max 300) interval integer Seconds between checks (default 2, max 30) status string pending | bonused | did_not_bonus | rejected since_id integer Resume after this call id backfill integer Replay this many recent calls on connect (max 100) Events: connected { status, bonus_hunt_id, last_id, settings, counts, filters } slot-call A new call, same shape as the list endpoint slot-call-status A watched call changed status slot-call-removed { id } - the call was deleted : heartbeat Comment line sent while nothing is happening Status changes are reported even when the new status falls outside a status filter, so a pending watcher still sees a call being bonused. An unknown hunt id returns 404 before the stream opens. ## POST /api/v3/bonus-hunts/{huntId}/slot-calls/{callId}/bonused Bonus a call: appends a pending-win game to the hunt, links the call to it, and rejects the other pending calls for the same slot. Body parameters: slot_bet (number, required). Response data: slot_call, game{id, slot_name, bet, order}, rejected_count. Duplicates are matched on slot_external_id when the call has one, otherwise on the slot name. Bonusing a call that is already bonused returns 422 rather than adding a second game. ## POST /api/v3/bonus-hunts/{huntId}/slot-calls/{callId}/did-not-bonus Mark a call as having not bonused. No game is created. ## DELETE /api/v3/bonus-hunts/{huntId}/slot-calls/{callId} Delete a hunt slot call. A call is only reachable through the hunt it belongs to - the wrong hunt id returns 404. ## GET /api/v3/bonus-hunts/{huntId}/slot-calls/settings { settings{enabled, entries_open, max_per_user, allow_duplicates}, counts{...} }. ## PUT /api/v3/bonus-hunts/{huntId}/slot-calls/settings Change the hunt's rules. Only the fields sent are changed. Body parameters: slot_calls_enabled boolean slot_calls_entries_open boolean slot_calls_max_per_user integer 1 to 100 slot_calls_allow_duplicates boolean