A code's referrals
API v2 - coming soon.
Coming soon
Needs your v2 key
401 legacy_key. How to get a v2 keyThe referral table: all time, or summed over a window (UTC days) when from or to is given. Sorted by wagered, deposited, joinedAt or name. Sorting by wagered or deposited lists only the referrals with a positive figure of that kind. The whole table in one call: limit=50000, a bulk read (a limit over 100, or a window over 366 days) once a minute per account.
Rate limits: 60 reads a minute per IP across /api/v2 and at most 25 to one path in 2 seconds (429 with Retry-After), and 60 a minute per account across its keyed reads, and a bulk read once a minute per account (429 with Retry-After).
partnerKeyx-apikey<token>Your API v2 key (cgw2_...)
code*stringThe affiliate code (letter case ignored)
1 <= length <= 191limit?integerPage size, 1 to 50000. Over 100 it is a bulk read: one a minute per account
1 <= value <= 5000050cursor?stringThe nextCursor of the previous page, absent for the first page
length <= 64sort?string"wagered""joinedAt""name""wagered""deposited"order?string"desc""asc""desc"search?stringPart of a referral name
length <= 64from?stringWindow start (ISO 8601, UTC), rounded down to its UTC day. With it or to, the figures are the window sums
date-timeto?stringWindow end (ISO 8601, UTC), default now. Alone, the window starts at the beginning. A window over 366 days is a bulk read
date-timecurrency?stringThe currency of the answer's amounts: COINS (the default, the answer as it always was) or USD, EUR or GBP, converted at the rate the site shows and rounded to two decimals as the site writes them. Anything else is a 400 unknown_currency.
"COINS""COINS""USD""EUR""GBP"OK
application/json- response
referrals*array<>total*integerReferrals matching the filters, over all pages
nextCursor*string|nullcurrency?What the amounts were converted to, when currency was USD, EUR or GBP. Absent for coins
curl "https://api.csgowin.com/api/v2/affiliates/YOUR_CODE/referrals" \ -H "x-apikey: YOUR_V2_KEY"{ "referrals": [ { "uuid": "00000000-0000-4000-8000-000000000301", "name": "example_player_one", "avatar": null, "level": 12, "joinedAt": "2026-09-01T12:00:00.000Z", "active": true, "wagered": 800, "deposited": 100, "commission": 40 } ], "total": 2, "nextCursor": "bzox"}Errors
| Status | When | Body |
|---|---|---|
| 400 | bad_request: an input outside its rules, a cookie sent, or a refusal by the site (the message says which). unknown_currency: currency is not one of COINS, USD, EUR, GBP. | {"error":{"code":"bad_request","message":"limit: Too small: expected number to be >=1"}}{"error":{"code":"unknown_currency","message":"currency is one of COINS, USD, EUR, GBP"}} |
| 401 | missing_key: no key in the x-apikey header. legacy_key: a v1 key - switch to API v2 for a v2 key. invalid_key: not a live API v2 key, or the code is not one of its account’s codes. | {"error":{"code":"missing_key","message":"send your API v2 key in the x-apikey header"}}{"error":{"code":"legacy_key","message":"this is a v1 key: switch to API v2 in Profile > Affiliates > API key to get a v2 key"}}{"error":{"code":"invalid_key","message":"the key is not a live API v2 key of this code"}} |
| 403 | key_blocked: API v2 is blocked for the account - contact support (a new key does not lift it). account_restricted: the account is restricted - contact support. | {"error":{"code":"key_blocked","message":"this key is blocked: contact support"}}{"error":{"code":"account_restricted","message":"this account is restricted: contact support"}} |
| 404 | not_found: no such giveaway, case or period, or the code has no board or giveaways (also every request while API v2 is not open, and every action while actions are not open). | {"error":{"code":"not_found","message":"not found"}} |
| 409 | stats_not_ready: the code’s figures are being prepared - try again in a few minutes. | {"error":{"code":"stats_not_ready","message":"the stats of this code are being prepared: try again in a few minutes. If this lasts, open the code's affiliate page on the site"}} |
| 429 | rate_limited: past a rate limit - wait the Retry-After seconds. | {"error":{"code":"rate_limited","message":"too many requests, please try again later."}} |
| 503 | unavailable: not available for a moment and nothing was done - try again after the Retry-After seconds. | {"error":{"code":"unavailable","message":"temporarily unavailable, please try again shortly."}} |
A code's totals and commission GET
Lifetime referrals, active referrals, first deposits, wagered, deposited, and commission earned, claimed and claimable. Rate limits: 60 reads a minute per IP across /api/v2 and at most 25 to one path in 2 seconds (429 with Retry-After), and 60 a minute per account across its keyed reads.
A code's figures per day or month GET
New referrals, wagered, deposited and commission per UTC day or month, every bucket of the window present. Rate limits: 60 reads a minute per IP across /api/v2 and at most 25 to one path in 2 seconds (429 with Retry-After), and 60 a minute per account across its keyed reads.