Conecta dispositivos móviles, marcadores físicos o integraciones a tu organización. Toda la API es multi-tenant: cada solicitud está aislada al tenant del token JWT.
Inicia sesión por API y guarda el token. Envíalo en cada request en el headerAuthorization: Bearer <token>.
# Crear cuenta + tenant (devuelve token)
curl -X POST http://localhost:3000/api/auth/signup \
-H 'content-type: application/json' \
-d '{
"organizationName": "Club Halcones",
"name": "Carlos Pérez",
"email": "carlos@example.com",
"password": "supersecret"
}'
# Login
curl -X POST http://localhost:3000/api/auth/login \
-H 'content-type: application/json' \
-d '{ "email": "carlos@example.com", "password": "supersecret" }'
# Usar token
curl http://localhost:3000/api/auth/me \
-H 'Authorization: Bearer eyJhbGciOi...'/api/v1/teams/api/v1/teams{
"name": "Halcones",
"shortName": "HAL",
"color": "#f97316"
}/api/v1/teams/{id}/api/v1/teams/{id}/api/v1/teams/{id}/api/v1/players?teamId=…/api/v1/players{
"teamId": "…",
"fullName": "Juan Pérez",
"jerseyNumber": 23,
"position": "SG",
"heightCm": 195
}/api/v1/players/{id}/api/v1/players/{id}/api/v1/tournaments/api/v1/tournaments{
"name": "Liga 2026",
"format": "LEAGUE",
"teamIds": [
"team_a",
"team_b"
]
}/api/v1/tournaments/{id}/api/v1/tournaments/{id}/standings/api/v1/tournaments/{id}/leaders/api/v1/tournaments/{id}/teams{
"teamId": "…"
}/api/v1/games?tournamentId=…&status=LIVE/api/v1/games{
"homeTeamId": "…",
"awayTeamId": "…",
"tournamentId": "…(opcional)"
}/api/v1/games/{id}/api/v1/games/{id}/start/api/v1/games/{id}/finish/api/v1/games/{id}/quarter{
"quarter": 2
}El endpoint principal para registrar acciones desde el móvil.
/api/v1/games/{id}/events/api/v1/games/{id}/events{
"type": "POINT_2",
"teamId": "…",
"playerId": "…(opcional)",
"quarter": 1,
"gameClockSec": 543
}/api/v1/games/{id}/events/{eventId}Tipos válidos:
/api/v1/games/{id}/stats