API overview
Introduction to the Fixtures API and authentication.
API overview
The Fixtures API is a RESTful API that you can call from any language or environment. This page covers base URL, authentication, and common patterns.
Base URL
All requests go to:
https://api.fixtures.example.com
For sandbox or regional endpoints, see Environment variables.
Authentication
Authenticate by sending your secret API key in the Authorization header:
Authorization: Bearer fix_your_secret_key
When using the official SDK, pass the key once when creating the client; it will be sent on every request.
Key types
- Secret key – Full access. Use only on the server. Never expose in client-side code.
- Publishable key – Limited, safe for client-side use where supported.
Making requests
Using the SDK (recommended)
const { FixturesClient } = require('@fixtures/sdk');
const client = new FixturesClient({ apiKey: process.env.FIXTURES_API_KEY });
const events = await client.events.list();
Using cURL
curl https://api.fixtures.example.com/v1/events \ -H "Authorization: Bearer fix_your_secret_key"
Response format
Responses are JSON. Success responses use HTTP 2xx. Error responses include a code and message and optionally details.
Example error:
{
"error": {
"code": "invalid_request",
"message": "Missing required field: name"
}
}
Rate limits
- Default: 100 requests per second per key.
- Rate limit headers:
X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reset.
Next steps
- Authentication – Key types and scopes
- Reference: Config – SDK config reference