Skip to content

Quickstart

Make one authenticated request in a few minutes, then decide whether you need writes.

What you need

  • A PadelRank partner account
  • A test API key from the dashboard
  • A terminal (or Node, Python, or PHP) that can make HTTPS requests

1. Create API access

Sign up and open API keys. Create a test key and copy it once. We store only a hash.

2. Set the key

bash
export PADELRANK_API_KEY="pr_test_YOUR_API_KEY"

Replace YOUR_API_KEY with the secret from the dashboard. Do not commit a real key.

3. Your first request

Call GET /v1. Authentication uses Authorization: Bearer $PADELRANK_API_KEY (or X-API-Key).

cURL
curl -sS -D - "https://api.padelrank.me/v1" \
  -H "Authorization: Bearer $PADELRANK_API_KEY"

A successful call returns 200 and a body that includes { "version": "1" }, plus an X-Request-Id header. If you see 401, the key is missing or revoked. Error JSON includes error, message, and request_id.

4. Read a public ranking

cURL
curl -s "https://api.padelrank.me/v1/rankings?country_code=PT&limit=20" \
  -H "Authorization: Bearer $PADELRANK_API_KEY"

The body includes rankings, limit, offset, total, and has_more. Each row includes a partner-safe rating object with padelrank_score, confidence_level, confidence_label, and matches_played.

5. Common mistakes

  • Using a test key for POST /v1/players or POST /v1/matches → 403
  • Putting the key in browser JavaScript → anyone can steal it; call from your backend
  • Reusing external_ref for a different winner or trust tier → 409
  • Sending fields not listed in OpenAPI → ignored or 422

6. Writes need a live key

Subscribe, then create a live key. Live keys include every scope. Register a player and submit a result you actually recorded:

cURL
curl -s -X POST "https://api.padelrank.me/v1/players" \
  -H "Authorization: Bearer $PADELRANK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "maria_s",
    "display_name": "Maria Silva",
    "country_code": "PT"
  }'
cURL
curl -s -X POST "https://api.padelrank.me/v1/matches" \
  -H "Authorization: Bearer $PADELRANK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "external_ref": "your-app-match-9821",
    "played_at": "2026-06-16T18:30:00Z",
    "winning_team": "A",
    "trust_tier": "partner_attested",
    "participants": [
      { "username": "maria_s", "team": "A", "court_position": "left" },
      { "username": "joao_p", "team": "A", "court_position": "right" },
      { "username": "ana_r", "team": "B", "court_position": "left" },
      { "username": "pedro_l", "team": "B", "court_position": "right" }
    ]
  }'

Send a new external_ref for each match. The same ref with the same winner and trust tier returns the original match. A different winner or trust tier returns 409.

Next steps

Quickstart · PadelRank Developers