All Match API endpoints are hosted under the primary domain base URL. API requests require custom secret header validation for access authorization.
https://sportsliveid.com/api/match
| Header Name | Type | Required | Description / Value |
|---|---|---|---|
|
secret (or X-Secret, SECRET) |
string | Required | Secret key value: xxx |
| Content-Type | string | POST | Must be application/json |
| Accept | string | Required | Must be application/json |
POST /api/match/start HTTP/1.1
Host: sportsliveid.com
secret: xxx
Content-Type: application/json
Accept: application/json
Quick overview of all endpoints available under the Match API module.
| Method | Endpoint Path | Description |
|---|---|---|
| GET | /api/match/event |
Get active event for today and its associated courts |
| POST | /api/match/start |
Start a new match session & automated recording |
| POST | /api/match/stop |
Stop an active match session & finalize recording |
| GET | /api/match/status |
Check if a court currently has an active match |
| GET | /api/match/score?court_id={id} |
Get real-time score for the active match on a court |
| GET | /api/court/{courtId}/score |
Get score (alternative path-param route) |
| POST | /api/match/score/update |
Update the score of the current active game |
| POST | /api/match/score/set/next |
Close active set and start a new set |
| POST | /api/match/score/reset |
Reset all scores — restart from set 1, game 1 |
Retrieves an active event scheduled for today along with its associated courts (id, court_name, stream_url, and yt_link_url). Requires secret header authentication.
| Header Name | Type | Required | Description / Value |
|---|---|---|---|
|
secret (or X-Secret, SECRET) |
string | Required | Secret key value: xxx |
| Accept | string | Required | Must be application/json |
| Parameter | Type | Required | Description |
|---|---|---|---|
| date | string | Optional | Filter event by specific date (format: DD-MM-YYYY or YYYY-MM-DD, e.g. 08-07-2026). Defaults to today if omitted. |
curl -X GET "https://sportsliveid.com/api/match/event?date=08-07-2026" \
-H "secret: xxx" \
-H "Accept: application/json"
{
"status": true,
"message": "Successfully get event data",
"event_id": 15,
"courts": [
{
"id": 1,
"court_name": "Court 1",
"stream_url": "https://sportsliveid.com/ongoing?index=0",
"yt_link_url": "https://www.youtube.com/watch?v=abc123xyz"
},
{
"id": 2,
"court_name": "Court 2",
"stream_url": "https://sportsliveid.com/ongoing?index=1",
"yt_link_url": "https://www.youtube.com/watch?v=def456uvw"
}
]
}
Starts a match session with custom participant and event details for a specified court. Creates tracking records in match tables and triggers recording dispatch if a live court stream is active.
| Field | Type | Required | Description |
|---|---|---|---|
| court_id | integer | Required | ID of target court |
| event_id | integer | Required | ID of scheduled event |
| class_name | string | Required | Match category (e.g. Men's Singles) |
| gender_category | string | Required | Gender (e.g. Male, Female, Mixed) |
| participant_one_name | string | Required | Name of Participant / Team 1 |
| participant_two_name | string | Required | Name of Participant / Team 2 |
| participant_code_one | string | Optional | Code / Seed for Participant 1 |
| participant_code_two | string | Optional | Code / Seed for Participant 2 |
curl -X POST "https://sportsliveid.com/api/match/start" \
-H "secret: xxx" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"court_id": 45,
"event_id": 15,
"class_name": "Men'\''s Singles",
"gender_category": "Male",
"participant_one_name": "John Doe",
"participant_two_name": "Jane Smith",
"participant_code_one": "P001",
"participant_code_two": "P002"
}'
{
"status": "success",
"message": "Match started successfully via API.",
"data": {
"status_match_id": 42,
"api_match_id": 18,
"recording_id": 105,
"court_id": 45,
"stream_url": "https://sportsliveid.com/ongoing?index=0",
"yt_link_url": "https://www.youtube.com/watch?v=abc123xyz",
"is_ongoing": true,
"event_id": 15,
"event_name": "Badminton Open Championship 2026",
"class_name": "Men's Singles",
"gender_category": "Male",
"participant_one_name": "John Doe",
"participant_two_name": "Jane Smith",
"participant_code_one": "P001",
"participant_code_two": "P002",
"recording_name": "Court 45 - Men's Singles (Male) - John Doe vs Jane Smith - 2026-07-28"
}
}
Stops an active match session using either court_id or match ID, updates the API match record to completed, and dispatches the stop recording job.
| Field | Type | Required | Description |
|---|---|---|---|
| court_id | integer | Required | ID of the court to stop the active match on |
curl -X POST "https://sportsliveid.com/api/match/stop" \
-H "secret: xxx" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"court_id": 45
}'
{
"status": "success",
"message": "Match stopped successfully.",
"data": {
"status_match_id": 42,
"court_id": 45,
"recording_id": 105
}
}
Checks if a match session is currently active for a given court_id.
| Parameter | Type | Required | Description |
|---|---|---|---|
| court_id | integer | Required | Unique ID of court to check active match status for |
curl -X GET "https://sportsliveid.com/api/match/status?court_id=45" \
-H "Accept: application/json"
{
"status": "success",
"is_active": true,
"is_ongoing": true,
"stream_url": "https://sportsliveid.com/ongoing?index=0",
"yt_link_url": "https://www.youtube.com/watch?v=abc123xyz"
}
Retrieves the real-time score of the active match running on a given court. Score is automatically initialised when a match starts. Returns all sets/games data along with participant names and total sets won.
| Parameter | Type | Required | Description |
|---|---|---|---|
| court_id | integer | Required | ID of the court (only when using query-param route) |
curl -X GET "https://sportsliveid.com/api/match/score?court_id=45" \
-H "secret: xxx" \
-H "Accept: application/json"
{
"status": "success",
"court_id": 45,
"status_match_id": 42,
"is_active": true,
"participant_one_name": "John Doe",
"participant_two_name": "Jane Smith",
"participant_code_one": "P001",
"participant_code_two": "P002",
"current_set": 2,
"current_game": 1,
"total_sets_won": {
"participant_one": 1,
"participant_two": 0
},
"sets": [
{
"id": 1,
"set": 1,
"game": 1,
"score_one": 21,
"score_two": 15,
"winner_participant_id": "team-one"
},
{
"id": 2,
"set": 2,
"game": 1,
"score_one": 8,
"score_two": 6,
"winner_participant_id": null
}
]
}
Updates the game count (score besar) for the currently active game. Supports direct values (score_one & score_two) OR instant action commands (action: "add_one", "add_two", "sub_one", "sub_two").
| Field | Type | Required | Description |
|---|---|---|---|
| court_id | integer | Required | Target court ID |
| action | string | Optional | Quick action: "add_one" (+1 score P1), "add_two" (+1 score P2), "sub_one" (-1 score P1), "sub_two" (-1 score P2) |
| score_one | integer | If no action | Direct score of Participant 1 (min: 0) |
| score_two | integer | If no action | Direct score of Participant 2 (min: 0) |
| winner | string | Optional | Mark game winner: "team-one" or "team-two". If set, closes this game and opens next game automatically. |
curl -X POST "https://sportsliveid.com/api/match/score/game" \
-H "secret: xxx" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"court_id": 45,
"action": "add_one"
}'
{
"status": "success",
"message": "Game score updated.",
"data": {
"id": 2,
"status_match_id": 42,
"set": 1,
"game": 1,
"score_one": 16,
"score_two": 12,
"winner_participant_id": null
}
}
Updates the point score (score kecil) for Padel / Tennis style games. Supports direct strings ("0", "15", "30", "40", "deuce", "adv-one", "adv-two") OR instant action commands (action: "add_one", "add_two", "sub_one", "sub_two").
| Field | Type | Required | Description |
|---|---|---|---|
| court_id | integer | Required | Target court ID |
| action | string | Optional | Quick action: "add_one" (next point P1), "add_two" (next point P2), "sub_one" (prev point P1), "sub_two" (prev point P2) |
| point_one | string | If no action | Direct point: "0", "15", "30", "40", "deuce", "adv-one", "adv-two" |
| point_two | string | If no action | Direct point: "0", "15", "30", "40", "deuce", "adv-one", "adv-two" |
curl -X POST "https://sportsliveid.com/api/match/score/point" \
-H "secret: xxx" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"court_id": 45,
"point_one": "15",
"point_two": "0"
}'
{
"status": "success",
"message": "Point score updated.",
"data": {
"id": 2,
"set": 1,
"game": 1,
"score_one": 16,
"score_two": 12,
"point_one": "15",
"point_two": "0"
}
}
Manages set count. Action "add" (default) closes the current set and starts a new set. Action "sub" removes the highest set and returns to the previous set.
| Field | Type | Required | Description |
|---|---|---|---|
| court_id | integer | Required | Target court ID |
| action | string | Optional | Command action: "add" (tambah set) or "sub" (kurang/batal set). Defaults to "add". |
| winner | string | Optional | Winner of the closing set: "team-one" or "team-two" (used when action is "add") |
curl -X POST "https://sportsliveid.com/api/match/score/set" \
-H "secret: xxx" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"court_id": 45,
"action": "add",
"winner": "team-one"
}'
{
"status": "success",
"message": "Set 1 closed. Now on Set 2.",
"current_set": 2,
"data": {
"id": 3,
"status_match_id": 42,
"set": 2,
"game": 1,
"score_one": 0,
"score_two": 0,
"point_one": "0",
"point_two": "0",
"winner_participant_id": null
}
}
Deletes all score rows for the active match on the given court and re-initialises from set 1, game 1 with scores 0–0. Use when a match needs to restart from scratch.
| Field | Type | Required | Description |
|---|---|---|---|
| court_id | integer | Required | Target court ID |
curl -X POST "https://sportsliveid.com/api/match/score/reset" \
-H "secret: xxx" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"court_id": 45
}'
{
"status": "success",
"message": "Score reset. Ready for set 1.",
"data": {
"id": 10,
"status_match_id": 42,
"set": 1,
"game": 1,
"score_one": 0,
"score_two": 0,
"winner_participant_id": null
}
}