← Back to Help

Public API

Read-only access to public competition data. No authentication required.

Notes

  • Responses are cached for 60 seconds (stale-while-revalidate).
  • CORS is open: Access-Control-Allow-Origin: * on all /api/v0/* routes.
  • This is v0 — the API may change as the platform evolves.
  • Rate limits apply; reasonable use is always fine.
GET /api/v0/events

Returns all public competitions across all organizations.

Fields: league_id, event_id, league_name, event_name, competition_type, format, status, starts_at, ends_at, venue_city, champion_name.

Example

https://league.asabya.com/api/v0/events
GET /api/v0/events/[eventId]/standings

Returns the standings table for one competition.

Fields: rank, club_name, played, won, drawn, lost, goals_for, goals_against, points.

Example

https://league.asabya.com/api/v0/events/YOUR_EVENT_ID/standings
GET /api/v0/events/[eventId]/bracket

Returns bracket slot data for knockout competitions.

Fields: match_id, round_ordinal, side, team_id, bracket_role, source_match_id, source_outcome, status, winner_team_id.

Example

https://league.asabya.com/api/v0/events/YOUR_EVENT_ID/bracket
GET /rest/v1/league_feed

Returns activity feed events for a public league — results, standings movements and announcements in chronological order. Requires the anon key as an Authorization header.

Fields: id, league_id, division_id, type (result | rank_change | announcement), payload (JSON), created_at. Filter: ?league_id=eq.[id]&order=created_at.desc&limit=20

Example

https://<project>.supabase.co/rest/v1/league_feed?league_id=eq.YOUR_LEAGUE_ID&order=created_at.desc&limit=20
GET /rest/v1/match_reactions

Returns reactions for matches in public leagues. Each row represents one reaction from a named visitor.

Fields: match_id, emoji, display_name, created_at. Filter: ?match_id=eq.[id]

Example

https://<project>.supabase.co/rest/v1/match_reactions?match_id=eq.YOUR_MATCH_ID
GET /rest/v1/match_comments

Returns approved comments for matches in public leagues. Only approved comments are returned.

Fields: id, match_id, display_name, body, created_at. Filter: ?match_id=eq.[id]&order=created_at.asc

Example

https://<project>.supabase.co/rest/v1/match_comments?match_id=eq.YOUR_MATCH_ID&order=created_at.asc
GET /rest/v1/announcements

Returns announcements published to public leagues.

Fields: id, league_id, division_id, club_id, title, body, published_at. Filter: ?league_id=eq.[id]&order=published_at.desc

Example

https://<project>.supabase.co/rest/v1/announcements?league_id=eq.YOUR_LEAGUE_ID&order=published_at.desc

The /rest/v1/ endpoints above use the Supabase REST API directly. Include an apikey header with your project's anon key.