Developers

BlitzSports API — Getting Started

API keys · X-API-Key header · REST + JSON

Everything you need to make your first authenticated request: create a key, send it in the X-API-Key header, and explore the rest of the API in Swagger.

Get an API Key

Sign in and create a key in the developer portal. Every key has a human-readable name, and comes in two flavors:

  • blitz_live_ — live keys, for production integrations.
  • blitz_test_ — test keys, for development and experimentation.

The full key is shown exactly once, at creation. Only a prefix and a one-way hash are stored on our side, so copy the key when it is displayed and keep it somewhere safe — it cannot be retrieved again. If you lose a key, rotate it to get a new secret.

Authentication

Send your key on every request in the X-API-Key header:

X-API-Key: blitz_test_AbCdEfGh12345678TuVwXyZ90AbCdEf

Requests without a valid key receive 401 Unauthorized. Treat your key like a password: keep it out of client-side code, repositories, and logs.

Your First Request

The /api/ping endpoint echoes the identity attached to your key — it is the quickest way to confirm your key works:

curl -H "X-API-Key: blitz_test_yourKeyHere" https://blitzsports.com/api/ping

A successful response returns 200 OK with the key's claims:

{
  "message": "pong",
  "email": "[email protected]",
  "scopes": "all",
  "permissions": "read"
}

Without the header, the same request returns 401:

curl -i https://blitzsports.com/api/ping
HTTP/1.1 401 Unauthorized

Key Lifecycle

Manage keys from the developer portal at any time:

  • Rotate — issues a replacement key (its secret is shown once). The old key keeps working during a grace window so you can migrate clients with zero downtime, then it is disabled automatically.
  • Disable / Enable — temporarily switch a key off and back on.
  • Revoke — permanently kill a key. Revoked keys can never be re-enabled.

Explore the API

The full interactive reference lives in Swagger — click Authorize, paste your API key, and try endpoints straight from the browser.

Questions, feature requests, or a use case we should know about? Email [email protected].