SportAPI Documentation
EN
S Product documentationSport Line API
v1
Service & pricing ↗ Get access ↗
Sport Line API / ACCOUNT — the client's keys and access

account Method — Client Keys and Access

Purpose

The account method shows what is included in the client’s access. Using any of their keys, the client gets data for all of their keys: the expiration date, the number of days left, available sports and languages, when the key was last used, and how many requests were made with it over 7 days.

The key’s language list is convenient for building a language switcher on a website: it contains only the languages included in the key and available in the line.

Request

GET https://YOUR_API_DOMAIN/v1/account

Pass the API key in the HTTP header:

Package: YOUR_API_KEY

There are no parameters, and the language is not specified in the path.

Response Example

{
  "status": 1,
  "page": "/v1/account",
  "body": {
    "client": {
      "public_id": "f47ad380-39e2-4549-ac76-aa422df628ea",
      "name": "Example"
    },
    "your_ip": "203.0.113.7",
    "keys": [
      {
        "key": "…c55f",
        "current": true,
        "type": "test",
        "status": "active",
        "label": "demo 12 days",
        "starts_at": null,
        "expires_at": "2026-11-03T14:34:23.479Z",
        "days_left": 30,
        "active": true,
        "sports": "all",
        "languages": ["ru", "en"],
        "last_used_at": "2026-10-04T15:20:07.843Z",
        "access_mode": "enforce",
        "allowed_ips": ["203.0.113.7", "198.51.100.0/24"],
        "allowed_domains": ["example.com", "*.example.com"],
        "usage_7d": [
          { "date": "2026-09-28", "requests": 0 },
          { "date": "2026-09-29", "requests": 0 },
          { "date": "2026-09-30", "requests": 0 },
          { "date": "2026-10-01", "requests": 0 },
          { "date": "2026-10-02", "requests": 0 },
          { "date": "2026-10-03", "requests": 0 },
          { "date": "2026-10-04", "requests": 7 }
        ]
      }
    ]
  }
}

Response Fields

FieldTypeDescription
client.public_idstringClient identifier
client.namestringClient name
your_ipstringThe IP address this request came from. Send it to the manager to restrict access by IP
keys[].keystringThe last 4 characters of the key (the full key is never returned)
keys[].currentbooltrue — the key used for this request
keys[].typestringtest — test key, prod — production key
keys[].statusstringactive — active, paused — paused
keys[].labelstring | nullKey label (“site 1”, “mirror”)
keys[].starts_atstring | nullStart of the access period (ISO 8601, UTC); null — active since issue
keys[].expires_atstringEnd of the access period (ISO 8601, UTC)
keys[].days_leftintDays left, rounded up; 0 — expired
keys[].activeboolThe key works now: status active, the period has started and not expired
keys[].sportsstring | int[]"all" — all sports of the line, otherwise a list of sport IDs
keys[].languagesstring[]Languages available with the key in the line
keys[].last_used_atstring | nullTime of the last request with the key (UTC); null — never used
keys[].access_modestringAccess restriction: off — from anywhere, monitor — from anywhere (sources are checked without denial), enforce — only from allowed IP addresses or websites
keys[].allowed_ipsstring[]Allowed IP addresses and subnets (198.51.100.0/24 — all addresses 198.51.100.0–198.51.100.255)
keys[].allowed_domainsstring[]Allowed websites for browser requests: example.com — this domain only, *.example.com — all subdomains
keys[].usage_7dobject[]Successful requests per day (UTC) for the last 7 days; today is the last element

Revoked keys are not included. usage_7d includes the requests just made; last_used_at is updated once a minute.

The X-Key-Expires Header

Every API response, not only account, contains the X-Key-Expires header with the expiration date of the key sent in the request:

X-Key-Expires: 2026-11-03T14:34:23.479Z

You can use it to remind about renewal in advance without calling account.