Skip to main content

API versioning and deprecation policy

Breaking API changes ship only on a new /api version, and deprecated operations return Deprecation and Sunset headers for at least 90 days.

The policy

From DALP 3.2 onward, DALP does not remove an operation from a released Platform API version or change it incompatibly inside that version. Breaking changes ship only on a new version path (such as /api/v3) alongside existing versions, and removals require a deprecation notice of at least 90 days.

/api/v2 became a released version in DALP 3.2, so the v2 changes introduced in 3.2 fall outside this policy. DALP 3.2 also shipped unannounced v1 breaks, including three removed operations, wallet on the v1 signed-in user and user search reads, gasPrice and gasUsed on v1 user events, and defined on error bodies. See Upgrade an integration to DALP 3.2.

Version
Status
Contract rule
/api/v1
Stable since DALP 3.0
Structure frozen (paths, methods, inputs, and success responses), apart from the DALP 3.2 changes in Upgrade an integration to DALP 3.2.
/api/v2
Stable from DALP 3.2
Same stability rule as v1 starting with the 3.2 release.

Unreleased versions can change between development builds, with each change documented in the release notes. Once released, this contract holds for as long as the version is served.

What counts as a breaking change

A change is breaking when a working client from the previous release can fail without code changes. A released version never accepts:

  • Removing a path or an HTTP method on a path.
  • Adding a required path, query, header, or body input.
  • Removing or narrowing an accepted input, such as dropping an enum value or tightening a format.
  • Removing a field from a success response or changing its type.

Before each release, DALP checks v1 paths, methods, inputs, and success responses against a sealed baseline, and checks v2 against the previously served contract for removed paths, methods, parameters, newly required inputs, and removed response statuses. Differences pass only when maintainers record an explicit exception with a reason (as for the DALP 3.2 v1 changes). Input-value narrowing and response-field changes on v2 are enforced by review.

Compatible changes ship inside a released version:

  • Adding a new operation or a new optional input.
  • Adding a new field to a success response. Configure decoders to ignore unknown fields.
  • Adding a new error on an existing operation. Branch on error class and retryable per Errors.
  • Updating OpenAPI descriptions, examples, summaries, and tags.

How a deprecation is announced

A deprecated operation keeps working until its sunset date and announces its deprecation both in HTTP response headers and in the OpenAPI document. Every response from a deprecated operation carries the headers, including errors such as rate-limit refusals.

Header
Standard
Value
Deprecation
RFC 9745
Announcement date as @ plus Unix seconds: @1799971200.
Sunset
RFC 8594
Earliest removal date as an HTTP date: Thu, 15 Apr 2027 00:00:00 GMT.
Link
RFC 8288
This policy as rel="deprecation" and each replacement path as rel="successor-version".
Deprecation: @1799971200
Sunset: Thu, 15 Apr 2027 00:00:00 GMT
Link: <https://docs.settlemint.com/docs/api-reference/guides/versioning-and-deprecation>; rel="deprecation"; type="text/html", </api/v2/example-operation-next>; rel="successor-version"

Sunset is omitted when no sunset date is scheduled. All three headers are exposed via CORS for browser clients.

In the OpenAPI document, the operation sets deprecated: true, documents the response headers, and includes x-dalp-deprecation:

{
  "deprecated": true,
  "x-dalp-deprecation": {
    "deprecatedAt": "2027-01-15",
    "sunsetAt": "2027-04-15",
    "successors": ["/api/v2/example-operation-next"]
  }
}

The OpenAPI flag, extension, and wire headers are generated from one declaration so they always agree.

The notice window

Every declared sunset date is at least 90 days after its deprecation date. DALP rejects any deprecation declaration with a shorter window.

The lifecycle of a deprecated API operationA current operation is deprecated on an announced date. From then on every response carries the Deprecation, Sunset, and Link headers, and the contract marks it deprecated. At least 90 days later, on the sunset date, a release can remove it. A breaking replacement ships on a new API version.Operation lifecycleCurrentChanges stay compatibleHeaders on every responseDeprecatedDeprecation, Sunset, LinkAt least 90 daysSunsetA release can remove itReplacement lives on its successor path

An operation moves from current to deprecated on the announcement date, and cannot be removed until its sunset date, at least 90 days later.

Ninety days is a minimum: a deprecated operation can remain active past its sunset date, and a release can extend a sunset date but never shorten it below 90 days.

When an entire API version is deprecated, every operation in that version returns the headers and the version stays live until its sunset date. Routes under /api/auth are excluded even though they appear in each version's OpenAPI document.

Find deprecated operations

List every deprecated operation, its sunset date, and its successors from the v2 OpenAPI specification (or replace v2 with v1 to check v1):

curl -s "$DALP_API_URL/api/v2/spec.json" | jq -r '
  .paths | to_entries[] | .key as $path | .value | to_entries[]
  | select(.value | type == "object" and .deprecated == true)
  | "\(.key | ascii_upcase) \($path) sunset \(.value["x-dalp-deprecation"].sunsetAt // "none") successors \((.value["x-dalp-deprecation"].successors // []) | join(","))"'
GET /api/v2/example-operation sunset 2027-04-15 successors /api/v2/example-operation-next

The command prints nothing when no operation is deprecated. /api/auth routes are not marked deprecated even when an API version is deprecated.

What your integration should do

Inspect Deprecation headers in your HTTP client and log the method, path, and Sunset value once per operation so your team schedules the migration before removal:

  1. Read the rel="successor-version" links for replacement paths.
  2. Review the compatibility section of the release notes that announced the deprecation.
  3. Migrate calls to the successor and test against a release that serves both before the sunset date.

Calling a removed path after sunset fails as route not found.

How releases record API changes

Each release entry in the changelog includes a compatibility section (called Breaking changes and migration in DALP 3.0) listing every newly deprecated operation, its sunset date, its replacement, and any removals after sunset.

Integrations that a release is checked against

Beyond the v2 contract check, DALP validates each release against pinned operation contracts and webhook payload schemas for relying integrations. Removing a pinned operation, requiring a new input, removing or retyping a response field, dropping a success status, or adding a response value or error status fails the release check unless explicitly recorded with a category and reason. Adding optional fields, widening fields to nullable, and removing error statuses pass automatically.

Next steps

Was this page helpful?