AI PadelAPI documentation Back to site

Matches

Player matches, match card with highlights, manual score entry and correction, rally marking. Access: a player token.

Base URL: https://your-server/api · Guide for this section: Live scores and replays

My matches #

GET/v1/matches/my

Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.

The player's last 50 matches in card format, without movement grids. The score is always “mine : opponents”.

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Example request

curl -X GET "https://your-server/api/v1/matches/my" \
  -H "Authorization: Bearer <player token>"

Responses

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh

Example response

{
  "items": [
    {
      "id": "8c0f4a52-2d1e-4b7a-9f63-1a5e7d9b3c20",
      "clubId": "c1",
      "club": "Flame Padel",
      "date": "<weekday> 02.10",
      "time": "18:00",
      "teammates": "<you> + Oleg",
      "opponents": "Anna + Maria",
      "upcoming": false,
      "sets": [{"a": 6, "b": 4}, {"a": 3, "b": 6}, {"a": 7, "b": 5}],
      "won": true,
      "verified": true,
      "ratingDelta": 12,
      "voided": false,
      "voidReason": "",
      "ai": null,
      "moments": [],
      "verticals": [],
      "movement": null
    }
  ]
}

Match card #

GET/v1/matches/{match_id}

Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.

The full match card: score, AI stats, highlights by moment with angles and vertical copies, movement. Participants only, others get 404. Video links are signed per request and live for minutes; an empty url means the video is still on its way to storage (ready=false).

Path parameters

NameTypeRequiredDescription
match_idstring (uuid)yesMatch id

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Example request

curl -X GET "https://your-server/api/v1/matches/8c0f4a52-2d1e-4b7a-9f63-1a5e7d9b3c20" \
  -H "Authorization: Bearer <player token>"

Responses

CodedetailMeaning
200—Success
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
404match_not_foundMatch not found, belongs to another club, or you are not a participant
422[…]Parameter or body validation error: detail is a list of errors

Manual score entry #

POST/v1/matches/manual

Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.

A player enters the match score. The author must be a participant; both teams are required. Such a match weighs half in the rating and is not marked as camera-verified.

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Request body application/json

FieldTypeRequiredDescription
club_idstringyesClub
daystringyesDate YYYY-MM-DD
timestringyesTime HH:MM
setsstringyesScore by sets “team1:team2”, comma-separated
pattern ^\d+:\d+(,\d+:\d+)*$
playersarray [object]yesLine-up: 2–4 players including the author
items from 2; items up to 4
players[].user_idstring (uuid)yesPlayer
players[].teamintegeryesTeam: 1 or 2
min 1; max 2

Example request

curl -X POST "https://your-server/api/v1/matches/manual" \
  -H "Authorization: Bearer <player token>" \
  -H "Content-Type: application/json" \
  -d '{
  "club_id": "c1",
  "day": "2026-10-02",
  "time": "18:00",
  "sets": "6:4,6:3",
  "players": [
    {"user_id": "3d6e9a10-5b2c-4f8e-a1d7-6c4b2e0f9a83", "team": 1},
    {"user_id": "a52e7c14-90bd-4e3f-8c61-7d2f0b9e4a15", "team": 2}
  ]
}'

Responses

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
404club_not_foundClub not found
403author_must_playThe author must be a match participant
400both_teams_requiredPlayers of both teams are required
400bad_day_or_timeInvalid date or time (YYYY-MM-DD and HH:MM)
400draw_not_allowedA draw on sets is not allowed
404player_not_found: …Player not found (the id or phone follows in the text)
422[…]Parameter or body validation error: detail is a list of errors

Example response

{
  "matchId": "8c0f4a52-2d1e-4b7a-9f63-1a5e7d9b3c20",
  "winnerTeam": 1,
  "ratingDeltas": {
    "3d6e9a10-5b2c-4f8e-a1d7-6c4b2e0f9a83": 6,
    "a52e7c14-90bd-4e3f-8c61-7d2f0b9e4a15": -6
  }
}

Score correction by a referee #

POST/v1/matches/{match_id}/score-correction

Access: Club panel account Header Authorization: Bearer <token> of an account with the referee, admin or owner role; the match club must be the account's club.

A referee, club admin or network owner corrects the score; a reason is required (the reason field). If the winner changes, Elo is recalculated for this match and the following ones; the 1.0–7.0 rating for this match only. The correction goes to the panel activity log. The match club must be the account's club (except for the network owner).

Path parameters

NameTypeRequiredDescription
match_idstring (uuid)yesMatch id

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <staff account token>

Request body application/json

FieldTypeRequiredDescription
setsstringyesCorrected score by sets
pattern ^\d+:\d+(,\d+:\d+)*$

Example request

curl -X POST "https://your-server/api/v1/matches/8c0f4a52-2d1e-4b7a-9f63-1a5e7d9b3c20/score-correction" \
  -H "Authorization: Bearer <staff account token>" \
  -H "Content-Type: application/json" \
  -d '{"sets": "4:6,6:3,5:7"}'

Responses

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
403role_required: …Required role missing (roles listed in the text)
403staff_club_not_setNo club set for the account
403other_clubThe match belongs to another club
404match_not_foundMatch not found, belongs to another club, or you are not a participant
400bad_scoreThe score is not valid
400reason_requiredA reason is required
409score_unchangedThe score has not changed
422[…]Parameter or body validation error: detail is a list of errors

Example response

{
  "ok": true,
  "winnerTeam": 2,
  "ratingDeltas": {
    "3d6e9a10-5b2c-4f8e-a1d7-6c4b2e0f9a83": -11,
    "a52e7c14-90bd-4e3f-8c61-7d2f0b9e4a15": 11
  }
}

Mark a rally for highlights #

POST/v1/matches/mark

Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.

A player marks the rally just played for highlights. The court is taken from the player's current booking (±15 minutes); without a booking pass club_id and court. The mark reaches the court server in the response to its health report.

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Request body application/json

FieldTypeRequiredDescription
club_idstring, or nullnoClub — if there is no current booking
courtstring, or nullnoCourt — if there is no current booking

Example request

curl -X POST "https://your-server/api/v1/matches/mark" \
  -H "Authorization: Bearer <player token>" \
  -H "Content-Type: application/json" \
  -d '{}'

Responses

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
409no_active_bookingNo current booking and no court given
404club_not_foundClub not found
422[…]Parameter or body validation error: detail is a list of errors

Example response

{"ok": true, "id": "0d4e8f21-6a3b-4c7d-9e1f-2a5b8c0d3e47", "court": "Court 4"}

Match text review #

GET/v1/matches/{match_id}/review

Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.

AI text review of the game for a participant. status: ready (text is set), no_data (no stats), disabled (review is off), failed (could not be produced).

Path parameters

NameTypeRequiredDescription
match_idstring (uuid)yesMatch id

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Example request

curl -X GET "https://your-server/api/v1/matches/8c0f4a52-2d1e-4b7a-9f63-1a5e7d9b3c20/review" \
  -H "Authorization: Bearer <player token>"

Responses

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
404match_not_foundMatch not found, belongs to another club, or you are not a participant
422[…]Parameter or body validation error: detail is a list of errors

Example response

{"status": "ready", "text": "<review text>", "cached": true}

Share link for a clip #

POST/v1/matches/{match_id}/clips/{clip_id}/share

Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.

A match participant gets a public link to the clip page (with a social preview).

Path parameters

NameTypeRequiredDescription
match_idstring (uuid)yesMatch id
clip_idstring (uuid)yesClip id

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Example request

curl -X POST "https://your-server/api/v1/matches/8c0f4a52-2d1e-4b7a-9f63-1a5e7d9b3c20/clips/f0c3a8e1-4d27-4b96-a5e3-9c18d2b7f604/share" \
  -H "Authorization: Bearer <player token>"

Responses

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
404match_not_foundMatch not found, belongs to another club, or you are not a participant
404clip_not_foundClip not found in this match
422[…]Parameter or body validation error: detail is a list of errors

Example response

{"url": "https://your-server/card/clip/<token>", "title": "<clip title>"}