Developer API

Versioning, OpenAPI, and deprecation

Generate clients from the contract and detect compatible, breaking, and sunset changes.

Track the URL contract

The stable prefix is /api/v1. New optional fields, endpoints, and output enum values may be added within v1; breaking changes move to a new prefix.

Unknown paths under v1 return OPMD_ROUTE_404; breaking changes arrive as a new prefix, never a renamed v1 path.
Try this
Write a contract test that asserts every request path starts with /api/v1/ and that unknown fields in a response are ignored rather than failing deserialisation.
What you getThe test passes today and keeps passing when an optional field or enum value is added inside v1; only a new prefix would require a deliberate change.

Read X-API-Version

The dated X-API-Version response header identifies the contract build. Log it with each request so changes can be correlated with behavior.

Log the dated build beside the request ID; a change here explains a change in behaviour.
Try this
Log res.headers['x-api-version'] next to the request ID for every call your service makes.
What you getThe logs show a dated build identifier such as 2026-06-17 on each request; when it changes, you can tie any behaviour difference to the new contract build.

Use authenticated OpenAPI

GET /api/v1/openapi.json returns the OpenAPI 3.1 description to a valid API key. Use it for generated types, contract tests, Postman, or client scaffolding.

Feed components.schemas to your type generator; info.version says which build the types came from.
Try this
curl https://oppermind.com/api/v1/openapi.json -H 'Authorization: Bearer opmd_sk_…' -o openapi.json then feed openapi.json to your type generator or import it into Postman.
What you getTyped request and response definitions are generated from the live contract, and the same file serves as the fixture for your contract tests.

Monitor the changelog

GET /api/v1/changelog describes compatible changes, breaking-change rules, and deprecations. Use it in release review or CI rather than relying on memory.

deprecations is empty today; a new entry there should fail the build until someone reads it.
Try this
In CI, run: curl https://oppermind.com/api/v1/changelog -H 'Authorization: Bearer opmd_sk_…' | jq '.current_version, .deprecations'
What you getThe job prints the current version and the deprecations list; a new entry there fails the build so someone reads the migration notes before release.

Respond to deprecation headers

Deprecated endpoints emit Deprecation, Sunset, and a migration Link. The published policy provides at least 180 days of runway before the endpoint returns 410 Gone.

Illustrative only, nothing is deprecated today: Sunset sits at least 180 days out, then 410 Gone.
Try this
In your HTTP client, log a warning whenever a response carries a Deprecation header, printing the Sunset date and the Link header beside the endpoint name.
What you getWhen an endpoint you use is deprecated the warning shows Deprecation: true, a Sunset date at least 180 days out and a Link to migration guidance; after Sunset the call returns 410 Gone.
GUIDED LEARNING

Practise this in Oppermind Academy

Follow the related tutorial or course and apply the concept to a real task.

Open learning path