API Error: Invalid or unsupported API version
The API version you requested — in the URL, a header or the SDK config — doesn’t exist or has been retired.
Invalid API versionUnsupported API versionThe requested API version is not supportedAPI version is no longer supported Meaning
Versioned APIs pick behaviour from a path prefix (/v1, /v2), a header (Stripe-Version, X-GitHub-Api-Version, api-version query on Azure) or a dated version string. Old versions are eventually sunset, and a typo or future date is rejected outright.
SDKs pin a version too, so upgrading the SDK can change the version you send.
Common causes
- Typo or invalid date in the version header/parameter
- Version retired (sunset) by the provider
- Mixed: path version and header version disagree
- Old SDK pinned to a removed version
⚡ Quick fix
- Use a currently supported version from the provider’s changelog
- Set the version in one place (SDK config or header)
- Upgrade the SDK if it targets a retired version
Detailed fix by platform
REST API
- bash
curl https://api.github.com/repos/o/r -H 'X-GitHub-Api-Version: 2022-11-28' curl https://api.stripe.com/v1/charges -u "$KEY:" -H 'Stripe-Version: 2024-06-20'
How to diagnose
- Sent version — Which header/path/param is actually sent?
- Supported — Provider’s list of active versions
- SDK — Version pinned by the SDK
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in API
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 12 Oct 2026