Documentation ·Docs
API design guidelines

Deprecation

How an operation announces its retirement: deprecated true, the Deprecation and Sunset headers on every success response, and a pointer to the replacement.

Read this page in العربية

On this page

At a glance#

A client learns that an operation is going away from the specification and from the response itself. The specification marks the operation deprecated: true; every success response of that operation documents two headers.

HeaderStandardValueExample
DeprecationRFC 9745The moment the operation was deprecated, as a Unix timestamp with a leading @Deprecation: @1792368000
SunsetRFC 8594The moment the operation stops answering, as an HTTP dateSunset: Tue, 19 Jan 2027 00:00:00 GMT
LinkRFC 8288Optional: the replacement, with rel="successor-version"Link: </v3/orders>; rel="successor-version"
HTTP/1.1 200 OK
Deprecation: @1792368000
Sunset: Tue, 19 Jan 2027 00:00:00 GMT
Link: </v3/orders>; rel="successor-version"
Content-Type: application/json

In the specification#

/orders/legacy:
  get:
    operationId: legacyOrders
    deprecated: true
    description: Replaced by the orders list of v3.
    responses:
      "200":
        description: Orders.
        headers:
          Deprecation:
            description: When this operation was deprecated.
            schema: { type: string }
          Sunset:
            description: When this operation stops answering.
            schema: { type: string }

Say in the description what replaces the operation. The Sunset moment is never earlier than the end of the notice period of the versioning rules.

Planned

The gateway adds the Deprecation and Sunset headers to every response of a deprecated major version, and the routes stay in place until the sunset date.

Checked by#

RuleSeverityChecks
api360-deprecation-headerserrorAn operation with deprecated: true documents Deprecation and Sunset on every 2xx response (header names are case-insensitive)

See also#

Was this page helpful?
Updated 2026-10-17