API versioning
Overview
The Deel API uses versioning to evolve endpoints while maintaining backward compatibility for existing integrations.
2026-01-01
Expected deprecation: Jan 1, 2027
Header-based: X-Version: 2026-01-01
URL versioning (legacy)
The Deel API supports URL path versioning. All endpoints include a version prefix in the URL:
The /v2/ prefix identifies the major API version. This pattern remains fully supported across all API reference documentation and existing integrations.
Header versioning
The Deel API uses header-based date versioning as the standard for managing API changes. Instead of changing the URL path, you specify a version date using the X-Version request header:
URL path versioning (/v2/) continues to work alongside header versioning. You do not need to change existing integrations. New versioned changes to API endpoints are introduced through header versions, and the /v2/ URL prefix remains in use.
When both the /v2/ URL prefix and the X-Version header are present, the header takes precedence for version resolution.
Key concepts
- Deel uses date-based versioning via the
X-Versionheader (YYYY-MM-DDformat) - Every endpoint version follows a lifecycle with three states: Beta, Stable, and Deprecated
- Omitting the
X-Versionheader routes your request to a stable version automatically - Beta endpoints require an explicit
X-Beta: trueheader - Response headers communicate the lifecycle state of the version you called
All existing API endpoints are baselined to version 2026-01-01. Existing integrations that do not send the X-Version header will continue to work with no changes.
Version lifecycle timing
A new major version is expected approximately once per year. When a new version is released, the previous version enters deprecation with exactly one year of continued support before sunset.
Specifying a version
Use the X-Version request header to pin your integration to a specific API version.
Sending an X-Version value that does not match any published version for the endpoint returns a 400 error. The API does not negotiate or suggest alternative versions.
Default behavior (no header)
When X-Version is omitted, the API routes your request to a stable version automatically. Existing integrations continue to work with no changes required.
If you are building a new integration, Deel recommends explicitly setting X-Version to protect against future changes.
Lifecycle states
Every endpoint version moves through a defined lifecycle. The X-State response header communicates the current state of the version you called.
Beta
Beta endpoints provide early access to upcoming API changes. They require the X-Beta: true header and may introduce breaking changes before promotion to Stable.
- Beta endpoints are not recommended for production workloads
- The API returns
X-State: betain the response headers - Once promoted, the endpoint transitions to Stable and no longer requires the
X-Betaheader
Stable
Stable is the default production-ready state. Endpoints in this state are backward-compatible within the same version date.
- No special headers are required
- The API returns
X-State: stablein the response headers - Breaking changes are only introduced through a new version date
Deprecated
Deprecated endpoints remain functional but have a scheduled removal date. The API signals deprecation through response headers.
- The
Deprecationresponse header is set totrue - The
Sunsetresponse header provides the exact removal date in UTC format - The API returns
X-State: deprecatedin the response headers - You should begin migrating to the newer version before the sunset date
Sunset
After the sunset date passes, the endpoint is permanently removed. Requests to a sunset version return a 410 Gone response with details to help you migrate.
- The response body includes
latest_stable_versionto guide migration - The response body includes the
sunset_datefor reference - No further requests to this version will succeed
Response headers
The API includes versioning-related headers in every response to communicate the current state of the endpoint you called.
Monitor the X-State and Deprecation headers in your integration. When you see deprecated, begin planning your migration to avoid disruption at sunset.
Beta access
Beta endpoints provide early access to upcoming API changes before they are promoted to Stable. Access requires the X-Beta header.
Beta endpoints are experimental and may change without notice. Do not rely on them for production workloads.
The X-Beta header and X-Version header follow strict mutual exclusivity rules:
The X-Beta header accepts only true or false (case-insensitive). Any other value returns a 400 error.
Backward compatibility and migration
Deel follows a predictable versioning cadence to give you time to plan and execute migrations.
- Baseline version: All existing endpoints are set to
2026-01-01, stable until at least Jan 1, 2027 - New versions: Breaking changes are introduced as new date versions (e.g.,
2026-06-15). The previous version remains available throughout its lifecycle. - Major versions: A new major version is expected approximately once per year, rolling up the latest changes
- Stability guarantee: Each version remains stable for a minimum of one year from release
- Deprecation period: Superseded versions receive exactly one year of continued support before sunset
- URL path versioning: The
/v2/URL prefix remains fully supported. Existing integrations do not need to change their URL structure.
Migration checklist
Monitor response headers
Watch for Deprecation: true and the Sunset date header in your API responses. These signal that your current version is scheduled for removal.
Review the changelog
Check the changelog for details on what changed in the new version, including any breaking changes to request or response schemas.
Update X-Version in sandbox
Set X-Version to the new date in your sandbox environment and run your integration test suite.
Error handling
The API returns specific error messages for versioning-related issues.
Sunset response (410 Gone)
When you request a sunset version, the API returns a 410 Gone response with migration guidance:
Use latest_stable_version from the response to update your X-Version header.
Troubleshooting
400 error with X-Version header
Common causes:
- The
X-Versionvalue is not inYYYY-MM-DDformat - The version date does not exist for this endpoint
Solutions:
- Verify the header value matches the exact format:
X-Version: 2026-01-01 - Check the changelog for available version dates
- Remove the header to use the default stable version
400 error accessing a beta endpoint
Common causes:
- The
X-Beta: trueheader is missing when requesting a beta version - The
X-Beta: trueheader is present but the version is not in beta
Solutions:
- Include
X-Beta: truewhen accessing a beta version - Remove
X-Betawhen accessing a stable or deprecated version - Verify whether the endpoint is still in beta or has been promoted to stable
410 Gone response
Cause:
- The requested version has been sunset and is no longer available
Solution:
- Read the
latest_stable_versionfrom the response body - Update your
X-Versionheader to the suggested version - Test the new version in sandbox before deploying to production
Not sure which version I am using
Solution:
- Check the
X-Stateresponse header on any API call - If you are not sending the
X-Versionheader, you are using a stable version - Use the
X-Request-IDresponse header when contacting support for version-related issues