Instead of asking again and again, let your bot hear what happens to your team. Two ways, the same events: read GET /api/v1/team/events (scope events.read), or add a webhook in Team Settings and the league calls your address. Events are kept 14 days.
| Event | When |
|---|---|
slot.posted | Your team posted a slot. |
slot.joined | A team took a seat in one of your slots, or you took one in theirs. |
slot.withdrawn | A team left a slot your team is in. |
match.locked | The third team joined and the slot became a match. |
match.changed | The map, zone, weather, factions or host of a match changed. |
match.withdrawn | A team withdrew from a locked match. The reason is not sent. |
match.cancelled | Staff cancelled a match. The reason is not sent. |
match.confirmed | The result of a match counts. A result read from the game counts as soon as the league reads it after the match. Sent again when league staff uphold or correct a disputed result. |
match.rated | A result that counts moved the Elo Ratings. Sent again when a disputed result counts again. |
match.stats | The player stats of a match were built or changed. Read them from GET /api/v1/team/matches/{number}. Building the same stats again sends nothing. |
match.disputed | A team disputed a match: its result does not count until league staff settle it. Who disputed it and why are not sent. |
match.settled | League staff settled a disputed match: upheld, corrected or cancelled. The match says how it stands now; a cancelled one reads null. |
application.submitted | Someone applied to join. Only the application id is sent: read the person with the applications scope. |
data holds the slot or match drawn as the other routes draw it, as it stands when you read or receive it (null once it is gone, for example a slot that became a match). A new application carries only its id: read the person with the applications scope. A reason a team gave for withdrawing, a staff note and server details are never in an event.
idintegerIncreases with every event; use it as the cursor
typestringOne of the event types listed in the handbook
createdAtstring (date-time)When it happened. UTC, ISO 8601
teamstringSlug of the team it is for
dataobjectWhat it is about
3 fields in data
slotobject or nullmay be absentThe slot, for slot.* events; null once it is gone
15 fields in data.slot
idstringSlot id; /matches?slot=<id> on the site
startsAtstring (date-time)When the match would start. UTC, ISO 8601
regionstringCompetitive region code: EU, NA, SA, ASIA, OCE or MEA
mapstringMap id, the game’s own, or random
mapNamestringThe map’s name as the website shows it; Random for a random map
layerstring or nullZone key; null for none
zonestring or nullThe zone as the website shows it ("Random zone" when none was picked); null for a random map
weatherstring or nullWeather key (clear, overcast, rain, fog, storm), or null for any
seatsFilledintegerTeams in it so far, of three
seatsFreeintegerSeats still open, of three
hoststringSlug of the team that posted it
teamsarray of objectThe teams in it so far, the poster first, with names and tags
3 fields in data.slot.teams
slugstringThe team’s address on the site (/teams/<slug>): its id here
namestring or nullTeam name; null if it is gone
tagstring or nullTeam tag; null if it is gone
yoursbooleanWhether your team is one of the teams in it
privatebooleanWhether it is an invitation only slot. You only see one you posted or were invited to
joinedTeamstring or nullSlug of the second team; null while that seat is free
matchobject or nullmay be absentThe match, for match.* events; null if it is gone
19 fields in data.match
numberstringThe match number, as on the website
statusstringscheduled (locked, not played), reported (played, nothing counts yet: no result, or one that waits to be confirmed), confirmed (the result counts) or disputed (a team disputed it: nothing counts until league staff settle it). A result read from the game is confirmed as soon as the league reads it, and can still become disputed until disputeUntil
ratedbooleanWhether the result is moving Elo now. False again while the match is disputed
regionstringCompetitive region code: EU, NA, SA, ASIA, OCE or MEA
mapstringMap id, the game’s own: kavkazi, europe, north-america or sabatulo
mapNamestringThe map’s name as the website shows it, for example Zestafona for north-america
layerstring or nullZone key as stored on the match; null for Random or none
zonestring or nullThe zone as the website shows it. "Random zone" when no zone was picked or rolled; null only when the map itself is Random
weatherstring or nullWeather key (clear, overcast, rain, fog, storm), or null for any
seasonstring or nullName of the season the match belongs to; null when none was running
startsAtstring (date-time)When it starts. UTC, ISO 8601
concludedAtstring (date-time) or nullWhen the result that counts was confirmed: set with status confirmed, null otherwise (and again while disputed). It moves when league staff settle a dispute. UTC, ISO 8601
disputeUntilstring (date-time) or nullSet while the result already counts and a team can still dispute it: the end of that window. Null otherwise. UTC, ISO 8601
durationSecondsinteger or nullHow long it was played, in seconds; null when unknown
hoststring or nullTeam slug of the host; null when no team hosts (a GWL official server, or the host team is gone)
sidesarray of objectThe three teams, host first
6 fields in data.match.sides
teamobjectA team, by slug, name and tag
3 fields in data.match.sides.team
slugstringThe team’s address on the site (/teams/<slug>): its id here
namestring or nullTeam name; null if it is gone
tagstring or nullTeam tag; null if it is gone
factionstring or nullFaction code once a moderator assigns one, else null
scorenumber or nullThe side’s in-game score, 0 to 100; null before a result
placementinteger or null1, 2 or 3; null before a result
pointsnumber or nullPlacement points for the match: 5 for 1st, 3 for 2nd, 1 for 3rd. They count only while the status is confirmed
eloDeltanumber or nullElo change from this match as it counts now; null while it is not rated, a disputed match included
lockedAtstring (date-time) or nullWhen the third team joined and it became a match. UTC, ISO 8601
serverPostedbooleanWhether server details have been posted. This route never returns them: see /team/matches/{number}/server
readyTeamsarray of stringSlugs of the teams that pressed Ready
applicationIdstringmay be absentThe application, for application.submitted
- In Team Settings, Webhooks, add your address and pick the events. It needs Manage API keys. A team can have 3.
- Keep the secret, which starts whsec_. It is shown once. New secret makes another and ends the old one.
- Press Send test. It sends one event of type ping, with id 0 and empty data, and shows what your address answered.
The address must be https on port 443, with a public domain name: not an IP address or an internal name, and with no sign-in in it.
- Events go out one at a time, in order.
- Answer any 2xx within 5 seconds. Redirects are not followed, and the body of your answer is not read.
- Anything else is tried again: after 30 seconds, doubling up to 1 hour. After 10 misses in a row the webhook pauses and says why in Team Settings. Resume carries on where it stopped, so nothing is skipped.
- Delivery is at least once: use the event id to ignore one you have already handled.
- Nothing from before a webhook was made is sent. The feed looks back, but only 14 days, and no further than 19 November 2026, when events began. Read booked matches from /api/v1/team/fixtures.
POST /your/webhook HTTP/1.1
content-type: application/json
user-agent: GWL-Webhooks/1
GWL-Event: slot.posted
GWL-Delivery: 1
GWL-Timestamp: 1800000000
GWL-Signature: v1=<64 hex characters>
{
"id": 1,
"type": "slot.posted",
"createdAt": "2027-01-13T20:00:00.000Z",
"team": "test-team",
"data": {
"slot": {
"id": "test-slot-01",
"startsAt": "2027-01-18T19:00:00.000Z",
"region": "EU",
"map": "sabatulo",
"mapName": "Sabatulo",
"layer": "Default",
"zone": "Hospital - Default",
"weather": "fog",
"seatsFilled": 1,
"seatsFree": 2,
"host": "test-team",
"teams": [
{
"slug": "test-team",
"name": "Test Team",
"tag": "TEST"
}
],
"yours": true,
"private": false,
"joinedTeam": null
}
}
}GWL-Signature is v1= and the hex HMAC-SHA256 of the GWL-Timestamp header, a dot and the exact body. The key is your whole secret, whsec_ included. Check the raw body before you parse it, compare in constant time, and refuse a timestamp more than 5 minutes off. Each attempt is signed afresh.
import { createHmac, timingSafeEqual } from 'node:crypto'
// rawBody: the request body exactly as received, before any JSON parsing
export function isFromGwl(headers, rawBody, secret) {
const timestamp = Number(headers['gwl-timestamp'])
// Written this way round so a missing timestamp (NaN) is refused too
const age = Math.abs(Date.now() / 1000 - timestamp)
if (!(age <= 300)) return false
const expected = Buffer.from(
'v1=' +
createHmac('sha256', secret).update(timestamp + '.' + rawBody).digest('hex'),
)
const given = Buffer.from(String(headers['gwl-signature'] ?? ''))
// Compare lengths in bytes: timingSafeEqual throws when they differ
return given.length === expected.length && timingSafeEqual(given, expected)
}import hashlib
import hmac
import time
# headers: your framework's headers, looked up without regard to case
# raw_body: the request body as bytes, before any JSON parsing
def is_from_gwl(headers, raw_body: bytes, secret: str) -> bool:
try:
timestamp = int(headers.get("GWL-Timestamp", ""))
except ValueError:
return False
if abs(time.time() - timestamp) > 300:
return False
signed = str(timestamp).encode() + b"." + raw_body
expected = "v1=" + hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
given = headers.get("GWL-Signature", "")
return hmac.compare_digest(expected.encode(), given.encode())import { createServer } from 'node:http'
import { isFromGwl } from './verify.js'
const seen = new Set() // keep this somewhere that survives a restart
createServer(async (req, res) => {
const chunks = []
for await (const chunk of req) chunks.push(chunk)
const raw = Buffer.concat(chunks).toString('utf8')
if (!isFromGwl(req.headers, raw, process.env.GWL_WEBHOOK_SECRET)) {
res.writeHead(401).end()
return
}
res.writeHead(204).end() // answer first, then do the work
const event = JSON.parse(raw)
if (event.type === 'ping' || seen.has(event.id)) return
seen.add(event.id)
console.log(event.type, event.data)
}).listen(8080)