← 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, 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
POST /api/v0/follow

Subscribe to competition updates by email. Sends a confirmation email with a link to activate.

Body: [org_id, league_id?, email]. Returns: [status: 'confirm_email_sent' | 'already_following'].

Example

POST https://league.asabya.com/api/v0/follow
GET /api/v0/calendar/[eventId]

Returns an ICS (iCalendar) file for all matches in a competition. Subscribe from any calendar app.

Response: text/calendar. One VEVENT per match with summary, description, dtstart, dtend, location.

Example

https://league.asabya.com/api/v0/calendar/YOUR_EVENT_ID
GET /api/v0/rsvp/[matchId]

Returns RSVP counts for a match by status.

Response: [match_id, summary: [yes, no, maybe, pending]].

Example

https://league.asabya.com/api/v0/rsvp/YOUR_MATCH_ID
POST /api/v0/rsvp/respond

Record an RSVP response using a token from an invite email.

Body: [token, status] where status is 'yes', 'no', or 'maybe'.

Example

POST https://league.asabya.com/api/v0/rsvp/respond
POST /api/v0/register

Submit a player registration request for an org. No account required.

Body: [org_id, division_id?, name, name_ar?, email, phone?, date_of_birth?, guardian_name?, guardian_phone?, notes?]. Returns: [status: 'submitted', id].

Example

POST https://league.asabya.com/api/v0/register