AI PadelAPI documentation Back to site

Players

Player profile and recent partners. Access: a player token.

Base URL: https://your-server/api · Guide for this section: Leads and rating

Recent players #

GET/v1/players/recent

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

People the player has played with (partners and opponents) and mutual matchmaking pairs — up to 20, most recent first. Used to invite someone to split a payment. Phone numbers are not returned.

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Example request

curl -X GET "https://your-server/api/v1/players/recent" \
  -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": "a52e7c14-90bd-4e3f-8c61-7d2f0b9e4a15",
      "name": "Anna S.",
      "level": "C",
      "photoUrl": null
    }
  ]
}

Player profile #

GET/v1/players/{player_id}

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

A player's public profile: level, rating, last 5 matches and up to 12 videos with an explicitly public link. Court videos behind signed links are not exposed here.

Path parameters

NameTypeRequiredDescription
player_idstring (uuid)yesPlayer id

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Example request

curl -X GET "https://your-server/api/v1/players/a52e7c14-90bd-4e3f-8c61-7d2f0b9e4a15" \
  -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
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