Skip to Content
CSGOWINAPI
API v1 (legacy)Raffles

Your raffles

API v1 (legacy).

API v1 (legacy)

This endpoint keeps working and nothing expires. New integrations should use API v2 once it opens - it is coming soon. Its counterpart there is the v2 raffles read.

What you keep if you do not switch

No opt-in needed

Your code's own API key is all this endpoint needs - nothing has to be switched on for your code.
GET
/leaderboard/{code}/raffle

Retrieves the most recent raffle periods for the affiliate leaderboard identified by code.

Authorization

ApiKeyAuth
headerx-apikey<token>

Your unique API key. Pass it in the x-apikey request header.

Path Parameters

code*string

Your affiliate code.

Query Parameters

take?integer

Number of raffle periods to return (1 -- 20).

Range1 <= value <= 20
Default3

Response Body

Successful response with raffle data.

application/json
  1. response
raffles*array<>
Example Request
curl "https://api.csgowin.com/api/leaderboard/YOUR_CODE/raffle?take=3" \  -H "x-apikey: YOUR_API_KEY"
Example Response
{  "raffles": [    {      "active": false,      "affiliate": {        "code": "YOUR_CODE"      },      "dateStart": "2025-02-01T00:00:00.000Z",      "dateEnd": "2025-02-08T00:00:00.000Z",      "days": 7,      "id": 10,      "paid": true,      "periodId": 38,      "prizes": [        5000,        3000,        2000      ],      "users": [        {          "exchanged": 0,          "xpBonus": 0,          "hidden": false,          "level": 8,          "name": "example_player_two",          "prize": 5000,          "rank": "silver",          "avatar_selected": "https://example.invalid/avatars/2.webp",          "roles": [],          "uuid": "example-player-id-2",          "wagered": 120000        }      ],      "user": {        "uuid": "example-creator-id",        "name": "example_creator",        "socials": []      }    }  ]}

Errors

StatusWhenBody
400The key does not belong to this code, or the x-apikey header is missing (the endpoint then expects a signed-in site session).{"error":"requested leaderboard not found"}{"error":"user not logged in (get leaderboard raffles)"}
500Internal server error.