Odds API versioning
Versioning: What can change within v1 and how breaking changes are handled. PreciseAPI sports odds API documentation.
The API is versioned in the URL. The current stable version is v1.
Backwards-compatible changes
These can ship at any time without a new version, so build clients that tolerate them:
- New endpoints, optional parameters, response fields, message types or error codes.
- New sources, leagues, market keys, periods or enum values.
- Changes to the order of fields or array items where order is not documented.
Breaking changes
Removing or renaming fields, changing types or semantics, or tightening validation only happens in a new major version. We announce new versions at least 90 days before the previous one is retired, on the changelog and by email to account owners.
Writing a client that tolerates change
Most integration breakages come from a client that is stricter than the API promises. A few habits keep yours working through every additive release:
- Ignore response fields you don't use instead of failing validation on them, and don't reject an object because it has a field you haven't seen.
- Treat ids from
/v1/sportsbooks,/v1/leaguesand/v1/marketsas data, not a fixed list. When a new source, league or market key appears, skip it or show it generically rather than throwing. - Handle WebSocket message types you don't recognize by ignoring them, so a new message type never closes your stream.
- Branch on the error
codeand the HTTP status, and keep a default branch for codes that are new to you. The errors page lists the current ones. - Sort and look things up by id rather than by position in an array, unless the reference says the order is guaranteed.
Keep /v1 in your base URL. A new major version gets a new path, so your requests keep working until you choose to move, and the 90-day notice gives you time to test against it first.
Previous: Errors ยท Next: WebSocket stream