Reference for the 4league public /v1 API. English only. Requests must be signed: see HMAC authentication. Everything on this page is generated from the same machine-readable description of the API.
Base URL: https://api.4league.app/v1. Do not use 4league.app/api; it is not this API. Requests are signed, see HMAC authentication.
Only GET, HEAD are served. Any other method answers 405 methodNotAllowed with an Allow: GET, HEAD header, before authentication. Request bodies are rejected with 400 badRequest. OPTIONS is normally answered (204) by CORS before reaching the API.
Organization-scoped keys only. A key sees its own organization and, when created with descendants, everything below it. Anything outside the scope, hidden, or nonexistent answers the identical 404 notFound.
List endpoints return this envelope. Defaults: page 1, limit 25 (max 100). page * limit must be <= 10000 (10000). 400 badRequest with details {field, limit}. Repeated keys and arrays are rejected.
| Field | Type |
|---|---|
data | array |
page | integer |
limit | integer |
total | integer |
hasMore | boolean (page * limit < total) |
Some paginated responses add top-level competition and/or meta (kind, truncated, competitionsIncluded). Window cap: Enforced (400 badRequest, details.field page) on the organization list routes and on /tournaments/{id}/teams and /tournaments/{id}/players (all via helpers/apiData/orgListCache.js page()). Not enforced on the other paginated routes, which slice an in-memory list: any page is accepted and an out-of-range page returns an empty data array.
Unknown, repeated (array) or empty query keys are 400 badRequest with details.field. Values are case-sensitive. The error carries details.field with the offending key.
Sorting: sort accepts id, name; prefix with - for descending (id, name, -id, -name). Ascending, or descending with a - prefix. Always tie-broken on id.
Every error uses this body; reason, details and retryAfter are optional:
{
"error": {
"code": "string",
"message": "string",
"reason": "optional string",
"details": "optional object",
"retryAfter": "optional integer seconds"
}
}
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | Authentication failed: malformed or missing X-4League-* headers, unknown or revoked key, timestamp outside the window, bad signature or replayed nonce. All variants have the same status and message.malformedHeader may changeThe reason field is returned today only for malformed or missing headers. The owner is still deciding whether all 401 bodies should be identical; do not rely on reason.otherFailuresUnknown or revoked key, stale timestamp, bad signature, replayed nonce: no reason field. |
| 403 | forbidden | The request IP is not on the key IP allowlist, or includeDescendants=true was sent with a key created without descendants. |
| 403 | scopeMissing | The key lacks the scope the route requires (checked before the resource is looked up). |
| 403 | proRequired | The owning organization is inactive or has no PRO plan. |
| 404 | notFound | Unknown route, or a resource that does not exist, is outside the key scope, is hidden/private, has the wrong type for the alias, or has a malformed id. All look identical. |
| 405 | methodNotAllowed | Any method other than GET and HEAD. |
| 400 | badRequest | Invalid query parameter, unknown query key, invalid pagination, or a request body. details: {"field":"name of the offending parameter","limit":"present on page/limit errors"} |
| 422 | scopeTooLarge | includeDescendants=true on an organization list whose scope exceeds the maximum, or the players list with more than 50 organizations in scope and no narrowing filter. details: {"max":5000}scope above MAX_SCOPE_ORGS: {"max":5000}players list, more than 50 organizations and no narrowing filter: {"max":50,"requiresOneOf":["clubId","associationId","competitionId","teamId"]} |
| 429 | rateLimited | More than 60 requests per minute for the key (per worker), or the failed-authentication limit for the caller IP was reached. retryAfter: seconds, also the Retry-After header |
| 429 | quotaExceeded | The monthly quota of the resource is used up. retryAfter: seconds until the next month, also the Retry-After header |
| 500 | internalError | Unexpected server error. The message never contains internals. |
| 503 | integrationsUnavailable | The credential store is unavailable. |
| 503 | serviceUnavailable | A dependency needed to authenticate or count the request is temporarily unavailable. |
scopeTooLarge caps: scope above MAX_SCOPE_ORGS ({"max":5000}); players list, more than 50 organizations and no narrowing filter ({"max":50,"requiresOneOf":["clubId","associationId","competitionId","teamId"]}). Organization tree: at most 500 nodes, depth up to 3.
| Scope | Endpoints |
|---|---|
organizations:read | /{alias}/{id}, /{alias}/{id}/tree, /{alias}/{id}/associations, /{alias}/{id}/clubs |
competitions:read | /{alias}/{id}/competitions, /tournaments/{id}, /tournaments/{id}/groups, /tournaments/{id}/statistics |
matches:read | /tournaments/{id}/matches, /matches/{id}, /matches/{id}/lineups, /matches/{id}/events, /teams/{id}/matches, /players/{id}/matches |
standings:read | /tournaments/{id}/standings |
teams:read | /{alias}/{id}/teams, /tournaments/{id}/teams, /teams/{id}, /teams/{id}/statistics |
players:read | /{alias}/{id}/players, /tournaments/{id}/players, /tournaments/{id}/statistics, /tournaments/{id}/top-scorers, /tournaments/{id}/cards, /teams/{id}/players, /players/{id}, /players/{id}/statistics |
matchStatistics:read | /matches/{id}/statistics |
Approximately 60 requests per minute per key, per server process. The limiter is per key and per server worker (in memory), so the effective limit is approximate: up to 60 x number of workers per minute. The standard RateLimit-* headers are not sent. Semantics read from middleware/apiAuth.js (express-rate-limit legacy headers); scripts/v1-signed-get.js prints the headers as received and defines no semantics of its own.
10000 requests per resource per month (UTC calendar month). Headers: none: remaining quota is not exposed in headers. Counted per resource (organization), not per key. 429 quotaExceeded with Retry-After until the next month starts. Requests that fail authentication, the scope check or the rate limit do not consume quota; requests that pass all three do, including those that end in 404 or 400. A credential may carry its own monthlyQuota; 10000 is the default.
Data is cached for about 2 minutes at most: public data results for 30-60 seconds and the organization scope tree for 60 seconds, both per server worker, so two requests may see different states. Live matches use the shortest TTL.
| Header | Value | When |
|---|---|---|
X-4League-Api-Version | 1 | Every response, including 401, 404, 405, 429, 500 and 503. |
X-Request-Id | random UUID per request | Every response that passes the router. |
X-RateLimit-Limit | – | Authenticated routes after the scope check (the per-key limiter). Requests per window: 60. |
X-RateLimit-Remaining | – | Same as X-RateLimit-Limit. Requests left in the current 60-second window. |
X-RateLimit-Reset | – | Same as X-RateLimit-Limit. Unix time in seconds when the window resets. |
Retry-After | – | 429 responses (rateLimited, quotaExceeded). Seconds, also in error.retryAfter. |
Allow | GET, HEAD | 405 responses. |
Cache-Control | no-store | Successful data responses. |
Quote X-Request-Id when you contact support about a request.
organizations: any organization type (federation, association, club)federations: federations only (type 2)associations: associations only (type 3)clubs: clubs only (type 4)Wrong type: 404 notFound, identical to an unknown id.
/pingAuthenticated echo, no scope required. Never cached (Cache-Control: no-store).
No parameters.
curl -sS "https://api.4league.app/v1/ping" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
{
"data": {
"apiVersion": 1,
"serverTime": "2026-10-13T07:22:37.759Z",
"keyId": "key1",
"resourceType": "organization",
"resourceId": "64b000000000000000000001",
"scopes": [
"competitions:read",
"matches:read",
"standings:read",
"teams:read",
"players:read",
"matchStatistics:read",
"organizations:read"
]
}
}
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403badRequest 400rateLimited 429quotaExceeded 429/{alias}/{id}Aliases for {alias}: organizations, federations, associations, clubs.
One organization. includeDescendants=true (or a key created with descendants) is needed to address organizations below the key root.
| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
alias | path | string | one of organizations | federations | associations | clubs | – | Organization type alias, see Organization aliases. |
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
includeDescendants | query | boolean | one of true | false | false | Include organizations below the addressed one (only within the key scope; keys created with descendants=false get 403 forbidden). |
curl -sS "https://api.4league.app/v1/organizations/{orgId}" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
{
"data": {
"id": "64b000000000000000000001",
"type": "federation",
"name": "Fed",
"logo": "https://cdn.test/f.png",
"parentId": null,
"description": "root",
"season": null
}
}
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/{alias}/{id}/treeAliases for {alias}: organizations, federations, associations, clubs.
Hierarchy below the organization (follows the primary parent only). Capped at 500 nodes: a larger tree is cut and the response carries top-level truncated:true.
Extra top-level response fields: truncated.
| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
alias | path | string | one of organizations | federations | associations | clubs | – | Organization type alias, see Organization aliases. |
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
depth | query | integer | min 1, max 3 | 2 | Levels below the addressed organization. |
includeDescendants | query | boolean | one of true | false | false | Include organizations below the addressed one (only within the key scope; keys created with descendants=false get 403 forbidden). |
curl -sS "https://api.4league.app/v1/organizations/{orgId}/tree?depth=2" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
{
"data": {
"id": "64b000000000000000000001",
"type": "federation",
"name": "Fed",
"logo": "https://cdn.test/f.png",
"parentId": null,
"description": "root",
"season": null,
"children": [
{
"id": "6acddc3d41a6e2f5682625e3",
"type": "association",
"name": "org-6acddc3d41a6e2f5682625e3",
"logo": "https://cdn.test/l.png",
"parentId": "64b000000000000000000001",
"description": "d",
"season": null,
"children": [
{
"id": "6acddc3d41a6e2f5682625e4",
"type": "club",
"name": "org-6acddc3d41a6e2f5682625e4",
"logo": "https://cdn.test/l.png",
"parentId": "6acddc3d41a6e2f5682625e3",
"description": "d",
"season": null,
"children": []
},
{
"id": "6acddc3d41a6e2f5682625e5",
"type": "club",
"name": "org-6acddc3d41a6e2f5682625e5",
"logo": "https://cdn.test/l.png",
"parentId": "6acddc3d41a6e2f5682625e3",
"description": "d",
"season": null,
"children": []
}
]
}
]
}
}
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/{alias}/{id}/associationsAliases for {alias}: organizations, federations, associations, clubs.
Paginated: returns the pagination envelope.
| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
alias | path | string | one of organizations | federations | associations | clubs | – | Organization type alias, see Organization aliases. |
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
status | query | string | one of active | inactive | – | |
includeDescendants | query | boolean | one of true | false | false | Include organizations below the addressed one (only within the key scope; keys created with descendants=false get 403 forbidden). |
sort | query | string | one of id | name | -id | -name | id | Ascending, or descending with a - prefix. Always tie-broken on id. |
page | query | integer | min 1 | 1 | Page number, 1-based. |
limit | query | integer | min 1, max 100 | 25 | Items per page. |
curl -sS "https://api.4league.app/v1/organizations/{orgId}/associations?limit=2" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
{
"data": [
{
"id": "6acddc3d41a6e2f5682625e3",
"type": "association",
"name": "org-6acddc3d41a6e2f5682625e3",
"logo": "https://cdn.test/l.png",
"parentId": "64b000000000000000000001",
"description": "d",
"season": null
}
],
"page": 1,
"limit": 2,
"total": 1,
"hasMore": false
}
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400scopeTooLarge 422rateLimited 429quotaExceeded 429/{alias}/{id}/clubsAliases for {alias}: organizations, federations, associations, clubs.
Paginated: returns the pagination envelope.
| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
alias | path | string | one of organizations | federations | associations | clubs | – | Organization type alias, see Organization aliases. |
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
associationId | query | objectId | – | – | 24-character hex id. Must be in the key scope and of the right type, otherwise 404 notFound. |
status | query | string | one of active | inactive | – | |
includeDescendants | query | boolean | one of true | false | false | Include organizations below the addressed one (only within the key scope; keys created with descendants=false get 403 forbidden). |
sort | query | string | one of id | name | -id | -name | id | Ascending, or descending with a - prefix. Always tie-broken on id. |
page | query | integer | min 1 | 1 | Page number, 1-based. |
limit | query | integer | min 1, max 100 | 25 | Items per page. |
curl -sS "https://api.4league.app/v1/federations/{orgId}/clubs?includeDescendants=true&limit=2" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
{
"data": [
{
"id": "6acddc3d41a6e2f5682625e4",
"type": "club",
"name": "org-6acddc3d41a6e2f5682625e4",
"logo": "https://cdn.test/l.png",
"parentId": "6acddc3d41a6e2f5682625e3",
"description": "d",
"season": null
},
{
"id": "6acddc3d41a6e2f5682625e5",
"type": "club",
"name": "org-6acddc3d41a6e2f5682625e5",
"logo": "https://cdn.test/l.png",
"parentId": "6acddc3d41a6e2f5682625e3",
"description": "d",
"season": null
}
],
"page": 1,
"limit": 2,
"total": 2,
"hasMore": false
}
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400scopeTooLarge 422rateLimited 429quotaExceeded 429/{alias}/{id}/competitionsAliases for {alias}: organizations, federations, associations, clubs.
Paginated: returns the pagination envelope.
| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
alias | path | string | one of organizations | federations | associations | clubs | – | Organization type alias, see Organization aliases. |
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
associationId | query | objectId | – | – | 24-character hex id. Must be in the key scope and of the right type, otherwise 404 notFound. |
clubId | query | objectId | – | – | 24-character hex id. Must be in the key scope and of the right type, otherwise 404 notFound. |
teamId | query | objectId | – | – | 24-character hex id. Must be in the key scope and of the right type, otherwise 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
gender | query | string | one of men | women | – | |
status | query | string | one of active | completed | – | active = not completed and not expired; completed = completed. |
includeDescendants | query | boolean | one of true | false | false | Include organizations below the addressed one (only within the key scope; keys created with descendants=false get 403 forbidden). |
sort | query | string | one of id | name | -id | -name | id | Ascending, or descending with a - prefix. Always tie-broken on id. |
page | query | integer | min 1 | 1 | Page number, 1-based. |
limit | query | integer | min 1, max 100 | 25 | Items per page. |
curl -sS "https://api.4league.app/v1/{alias}/{id}/competitions" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
No captured example for this endpoint yet.
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400scopeTooLarge 422rateLimited 429quotaExceeded 429/{alias}/{id}/teamsAliases for {alias}: organizations, federations, associations, clubs.
Paginated: returns the pagination envelope.
| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
alias | path | string | one of organizations | federations | associations | clubs | – | Organization type alias, see Organization aliases. |
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
associationId | query | objectId | – | – | 24-character hex id. Must be in the key scope and of the right type, otherwise 404 notFound. |
clubId | query | objectId | – | – | 24-character hex id. Must be in the key scope and of the right type, otherwise 404 notFound. |
competitionId | query | objectId | – | – | 24-character hex id. Must be in the key scope and of the right type, otherwise 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
status | query | string | one of active | inactive | – | |
includeDescendants | query | boolean | one of true | false | false | Include organizations below the addressed one (only within the key scope; keys created with descendants=false get 403 forbidden). |
sort | query | string | one of id | name | -id | -name | id | Ascending, or descending with a - prefix. Always tie-broken on id. |
page | query | integer | min 1 | 1 | Page number, 1-based. |
limit | query | integer | min 1, max 100 | 25 | Items per page. |
curl -sS "https://api.4league.app/v1/{alias}/{id}/teams" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
No captured example for this endpoint yet.
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400scopeTooLarge 422rateLimited 429quotaExceeded 429/{alias}/{id}/playersAliases for {alias}: organizations, federations, associations, clubs.
With includeDescendants=true and more than 50 organizations in scope, one of clubId, associationId, competitionId, teamId is required, otherwise 422 scopeTooLarge with details.requiresOneOf.
Paginated: returns the pagination envelope.
| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
alias | path | string | one of organizations | federations | associations | clubs | – | Organization type alias, see Organization aliases. |
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
associationId | query | objectId | – | – | 24-character hex id. Must be in the key scope and of the right type, otherwise 404 notFound. |
clubId | query | objectId | – | – | 24-character hex id. Must be in the key scope and of the right type, otherwise 404 notFound. |
competitionId | query | objectId | – | – | 24-character hex id. Must be in the key scope and of the right type, otherwise 404 notFound. |
teamId | query | objectId | – | – | 24-character hex id. Must be in the key scope and of the right type, otherwise 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
status | query | string | one of active | inactive | – | |
includeDescendants | query | boolean | one of true | false | false | Include organizations below the addressed one (only within the key scope; keys created with descendants=false get 403 forbidden). |
sort | query | string | one of id | name | -id | -name | id | Ascending, or descending with a - prefix. Always tie-broken on id. |
page | query | integer | min 1 | 1 | Page number, 1-based. |
limit | query | integer | min 1, max 100 | 25 | Items per page. |
curl -sS "https://api.4league.app/v1/{alias}/{id}/players" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
No captured example for this endpoint yet.
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400scopeTooLarge 422rateLimited 429quotaExceeded 429/tournaments/{id}| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
curl -sS "https://api.4league.app/v1/tournaments/{tournamentId}" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
{
"data": {
"competition": {
"id": "6acddc3d41a6e2f5682625e6",
"name": "c-6acddc3d41a6e2f5682625e6",
"logo": null,
"type": "league",
"season": 3,
"stage": "regular",
"timezone": "UTC",
"gender": null,
"completed": false,
"hasPlayoff": false,
"hasPlayout": false,
"groupCount": 2
}
}
}
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/tournaments/{id}/matchesMatches of the requested competition only (playoff/playout child competitions are not included, see knownLimitations).
Paginated: returns the pagination envelope.
| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
from | query | iso8601 | – | – | Inclusive lower bound on kickoff, see timeFilters. |
to | query | iso8601 | – | – | Inclusive upper bound on kickoff, see timeFilters. |
status | query | string | one of upcoming | live | finished | postponed | – | Match status filter. |
page | query | integer | min 1 | 1 | Page number, 1-based. |
limit | query | integer | min 1, max 100 | 25 | Items per page. |
curl -sS "https://api.4league.app/v1/tournaments/{tournamentId}/matches?from=2026-01-05&to=2026-01-05&limit=2" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
{
"data": [
{
"id": "6acddc3d41a6e2f5682625ef",
"status": "finished",
"kickoffAt": "2026-01-05T12:00:00.000Z",
"home": {
"id": "6acddc3d41a6e2f5682625e8",
"name": "TeamA",
"shortName": "TEA",
"logo": null
},
"away": {
"id": "6acddc3d41a6e2f5682625ea",
"name": "TeamB",
"shortName": "TEA",
"logo": null
},
"score": {
"home": 1,
"away": 1
},
"penalties": null,
"leg": null,
"twoLegs": false,
"winner": "draw",
"round": 1,
"group": null
}
],
"page": 1,
"limit": 2,
"total": 1,
"hasMore": false,
"competition": {
"id": "6acddc3d41a6e2f5682625e6",
"name": "c-6acddc3d41a6e2f5682625e6",
"logo": null,
"type": "league",
"season": 3,
"stage": "regular",
"timezone": "UTC"
}
}
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/tournaments/{id}/standings| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
curl -sS "https://api.4league.app/v1/tournaments/{tournamentId}/standings" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
{
"data": {
"competition": {
"id": "6acddc3d41a6e2f5682625e6",
"name": "c-6acddc3d41a6e2f5682625e6",
"logo": null,
"type": "league",
"season": 3,
"stage": "regular",
"timezone": "UTC"
},
"standings": [
{
"rank": 1,
"team": {
"id": "6acddc3d41a6e2f5682625e8",
"name": "TeamA",
"shortName": "TEA",
"logo": null
},
"played": 1,
"won": 0,
"drawn": 1,
"lost": 0,
"goalsFor": 1,
"goalsAgainst": 1,
"goalDiff": 0,
"points": 1,
"startingPoints": 0,
"group": null
}
],
"playoffStandings": null,
"playoutStandings": null,
"playoffFormat": null,
"playoutFormat": null,
"playoffCompleted": null,
"playoutCompleted": null
}
}
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/tournaments/{id}/groups| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
curl -sS "https://api.4league.app/v1/tournaments/{id}/groups" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
No captured example for this endpoint yet.
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/tournaments/{id}/teamsPaginated: returns the pagination envelope.
| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
page | query | integer | min 1 | 1 | Page number, 1-based. |
limit | query | integer | min 1, max 100 | 25 | Items per page. |
curl -sS "https://api.4league.app/v1/tournaments/{id}/teams" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
No captured example for this endpoint yet.
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/tournaments/{id}/playersPaginated: returns the pagination envelope.
| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
page | query | integer | min 1 | 1 | Page number, 1-based. |
limit | query | integer | min 1, max 100 | 25 | Items per page. |
curl -sS "https://api.4league.app/v1/tournaments/{id}/players" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
No captured example for this endpoint yet.
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/tournaments/{id}/statisticsPlayer-level rows, so both scopes are required.
| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
curl -sS "https://api.4league.app/v1/tournaments/{id}/statistics" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
No captured example for this endpoint yet.
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/tournaments/{id}/top-scorersPaginated: returns the pagination envelope.
| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
type | query | string | one of goals | assists | appearances | – | Ranking kind; default goals. |
page | query | integer | min 1 | 1 | Page number, 1-based. |
limit | query | integer | min 1, max 100 | 25 | Items per page. |
curl -sS "https://api.4league.app/v1/tournaments/{id}/top-scorers" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
No captured example for this endpoint yet.
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/tournaments/{id}/cardsPaginated: returns the pagination envelope.
| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
scope | query | string | one of player | team | – | Rows per player or per team; default player. |
page | query | integer | min 1 | 1 | Page number, 1-based. |
limit | query | integer | min 1, max 100 | 25 | Items per page. |
curl -sS "https://api.4league.app/v1/tournaments/{id}/cards" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
No captured example for this endpoint yet.
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/matches/{id}Friendlies (no competition) are returned when home or away is in scope. season, when set, must be the current season of the match competition.
| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
curl -sS "https://api.4league.app/v1/matches/{matchId}" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
{
"data": {
"competition": {
"id": "6acddc3d41a6e2f5682625e6",
"name": "c-6acddc3d41a6e2f5682625e6",
"logo": null,
"type": "league",
"season": 3,
"stage": "regular",
"timezone": "UTC"
},
"match": {
"id": "6acddc3d41a6e2f5682625ef",
"status": "finished",
"kickoffAt": "2026-01-05T12:00:00.000Z",
"home": {
"id": "6acddc3d41a6e2f5682625e8",
"name": "TeamA",
"shortName": "TEA",
"logo": null
},
"away": {
"id": "6acddc3d41a6e2f5682625ea",
"name": "TeamB",
"shortName": "TEA",
"logo": null
},
"score": {
"home": 1,
"away": 1
},
"penalties": null,
"leg": null,
"twoLegs": false,
"winner": "draw",
"round": 1,
"group": null
}
}
}
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/matches/{id}/lineups| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
curl -sS "https://api.4league.app/v1/matches/{id}/lineups" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
No captured example for this endpoint yet.
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/matches/{id}/events| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
curl -sS "https://api.4league.app/v1/matches/{id}/events" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
No captured example for this endpoint yet.
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/matches/{id}/statistics| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
curl -sS "https://api.4league.app/v1/matches/{id}/statistics" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
No captured example for this endpoint yet.
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/teams/{id}| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
curl -sS "https://api.4league.app/v1/teams/{id}" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
No captured example for this endpoint yet.
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/teams/{id}/playersPaginated: returns the pagination envelope.
| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
page | query | integer | min 1 | 1 | Page number, 1-based. |
limit | query | integer | min 1, max 100 | 25 | Items per page. |
curl -sS "https://api.4league.app/v1/teams/{teamId}/players?limit=2" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
{
"data": [
{
"id": "6acddc3d41a6e2f5682625eb",
"name": "PlayerAna",
"number": 9,
"position": null,
"photo": "https://cdn.test/photos/ana.png",
"teamId": "6acddc3d41a6e2f5682625e7"
}
],
"page": 1,
"limit": 2,
"total": 1,
"hasMore": false
}
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/teams/{id}/matchesfrom/to are always compared in UTC. A club id expands to the club and its most recent competition copies; when capped the response carries meta.truncated:true and meta.competitionsIncluded.
Paginated: returns the pagination envelope.
| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
from | query | iso8601 | – | – | Inclusive lower bound on kickoff, see timeFilters. |
to | query | iso8601 | – | – | Inclusive upper bound on kickoff, see timeFilters. |
status | query | string | one of upcoming | live | finished | postponed | – | Match status filter. |
page | query | integer | min 1 | 1 | Page number, 1-based. |
limit | query | integer | min 1, max 100 | 25 | Items per page. |
curl -sS "https://api.4league.app/v1/teams/{id}/matches" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
No captured example for this endpoint yet.
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/teams/{id}/statistics| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
curl -sS "https://api.4league.app/v1/teams/{id}/statistics" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
No captured example for this endpoint yet.
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/players/{id}| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
curl -sS "https://api.4league.app/v1/players/{playerId}" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
{
"data": {
"player": {
"id": "6acddc3d41a6e2f5682625eb",
"name": "PlayerAna",
"number": 9,
"position": null,
"photo": "https://cdn.test/photos/ana.png",
"team": {
"id": "6acddc3d41a6e2f5682625e7",
"name": "TeamA",
"shortName": "TEA",
"logo": "https://cdn.test/team-a.png"
}
}
}
}
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/players/{id}/statistics| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
curl -sS "https://api.4league.app/v1/players/{id}/statistics" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
No captured example for this endpoint yet.
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429/players/{id}/matchesfrom/to are always compared in UTC.
Paginated: returns the pagination envelope.
| Name | In | Type | Allowed | Default | Description |
|---|---|---|---|---|---|
id | path | objectId | – | – | Resource id (24-character hex). A malformed id answers 404 notFound. |
season | query | integer | – | – | Positive integer, at most 9 digits. Archived season for data routes; absent = current season. |
from | query | iso8601 | – | – | Inclusive lower bound on kickoff, see timeFilters. |
to | query | iso8601 | – | – | Inclusive upper bound on kickoff, see timeFilters. |
status | query | string | one of upcoming | live | finished | postponed | – | Match status filter. |
page | query | integer | min 1 | 1 | Page number, 1-based. |
limit | query | integer | min 1, max 100 | 25 | Items per page. |
curl -sS "https://api.4league.app/v1/players/{id}/matches" \
-H "X-4League-Key: $FOURLEAGUE_KEY_ID" \
-H "X-4League-Timestamp: $TS" \
-H "X-4League-Nonce: $NONCE" \
-H "X-4League-Signature: $SIG"
No captured example for this endpoint yet.
Listed errors are the ones that can apply based on the endpoint's parameters; see Errors for the full table.
unauthorized 401forbidden 403proRequired 403scopeMissing 403notFound 404badRequest 400rateLimited 429quotaExceeded 429