<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.29 (Ruby 3.2.2) -->
<?rfc tocindent="yes"?>
<?rfc strict="yes"?>
<?rfc compact="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc-ext html-pretty-print="prettyprint https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"?>
<rfc xmlns:x="http://purl.org/net/xml2rfc/ext"
     category="std"
     consensus="true"
     docName="draft-ietf-httpapi-deprecation-header-latest"
     ipr="trust200902"
     sortRefs="true"
     symRefs="true"
     tocInclude="true">
   <x:feedback template="mailto:httpapi@ietf.org?subject={docname},%20%22{section}%22\&amp;amp;body=%3c{ref}%3e:"/>
   <front>
      <title>The Deprecation HTTP Header Field</title>
      <author fullname="Sanjay Dalal" initials="S." surname="Dalal">
         <address>
            <email>sanjay.dalal@cal.berkeley.edu</email>
            <uri>https://github.com/sdatspun2</uri>
         </address>
      </author>
      <author fullname="Erik Wilde" initials="E." surname="Wilde">
         <address>
            <email>erik.wilde@dret.net</email>
            <uri>http://dret.net/netdret</uri>
         </address>
      </author>
      <date day="06" month="November" year="2025"/>
      <area>Web and Internet Transport</area>
      <workgroup>HTTPAPI</workgroup>
      <keyword>HTTP, deprecation</keyword>
      <abstract><?line 44?>
         <t>The Deprecation HTTP response header field is used to signal to consumers of a resource (in the sense of URI) that the resource will be or has been deprecated. Additionally, the deprecation link relation can be used to link to a resource that provides additional information about planned or existing deprecation, and possibly ways in which client application developers can best manage deprecation.</t>
      </abstract>
      <note removeInRFC="true" title="About This Document">
         <t>Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-ietf-httpapi-deprecation-header/"/>.</t>
         <t>Discussion of this document takes place on the HTTPAPI Working Group mailing list (<eref target="mailto:httpapi@ietf.org"/>), which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/httpapi/"/>. Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/httpapi/"/>. Working Group information can be found at <eref target="https://ietf-wg-httpapi.github.io/"/>.</t>
         <t>Source for this draft and an issue tracker can be found at <eref target="https://github.com/ietf-wg-httpapi/deprecation-header"/>.</t>
      </note>
   </front>
   <middle><?line 49?>
      <section anchor="introduction">
         <name>Introduction</name>
         <t>Deprecation of an HTTP resource (<xref section="3.1" sectionFormat="of" target="HTTP"/>) communicates information about the lifecycle of a resource. It encourages client applications to migrate away from the resource, discourages applications from forming new dependencies on the resource, and informs applications about the risk of continued dependence upon the resource.</t>
         <t>The act of deprecation does not change any behavior of the resource. It informs client applications of the fact that a resource will be or is deprecated. The Deprecation HTTP response header field can be used to convey this information at runtime indicating when the deprecation will be in effect.</t>
         <t>In addition to the Deprecation header field, the resource provider can use other header fields such as Link (<xref target="LINK"/>) to convey additional information related to deprecation. This can be information such as where to find documentation related to the deprecation, what can be used as a replacement, and when a deprecated resource becomes non-operational.</t>
         <section anchor="notational-conventions">
            <name>Notational Conventions</name>
            <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/>
               <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>
            <?line -18?>
            <t>This document uses "Structured Field Values for HTTP" (<xref target="STRUCTURED-FIELDS"/>) to specify syntax and parsing of date values.</t>
            <t>The term "resource" is to be interpreted as defined in <xref section="3.1" sectionFormat="of" target="HTTP"/>.</t>
         </section>
      </section>
      <section anchor="the-deprecation-http-response-header-field">
         <name>The Deprecation HTTP Response Header Field</name>
         <t>The <spanx style="verb">Deprecation</spanx> HTTP response header field allows a server to communicate to a client application that the resource in context of the message is or will be deprecated.</t>
         <section anchor="syntax">
            <name>Syntax</name>
            <t>The <spanx style="verb">Deprecation</spanx> response header field describes the deprecation of the resource identified with the response it occurred within (see <xref section="6.4.2" sectionFormat="of" target="HTTP"/>). It conveys the deprecation date, which may be in the future (the resource context will be deprecated at that date) or in the past (the resource context has been deprecated at that date).</t>
            <t>
               <spanx style="verb">Deprecation</spanx> is an Item Structured Header Field; its value <bcp14>MUST</bcp14> be a Date as per <xref section="3.3.7" sectionFormat="of" target="STRUCTURED-FIELDS"/>.</t>
            <t>The following example shows that the resource context has been deprecated on Friday, June 30, 2023 at 23:59:59 UTC:</t>
            <figure>
               <artwork>
Deprecation: @1688169599
</artwork>
            </figure>
         </section>
         <section anchor="scope">
            <name>Scope</name>
            <t>The Deprecation header field applies to the resource identified with the response it occurred within (see <xref section="6.4.2" sectionFormat="of" target="HTTP"/>), meaning that it announces the upcoming deprecation of that specific resource. However, there may be scenarios where the scope of the announced deprecation is larger than just the single resource where it appears.</t>
            <t>Resources are free to define such an increased scope, and usually this scope will be documented by the resource so that consumers of the resource know about the increased scope and can behave accordingly. When doing so, it is important to take into account that such increased scoping is invisible for consumers who are unaware of the increased scoping rules. This means that these consumers will not be aware of the increased scope, and they will not interpret deprecation information different from its standard meaning (i.e., it applies to the resource only).</t>
            <t>Using such an increased scope still may make sense, as deprecation information is only a hint anyway. It is optional information that cannot be depended on, and client applications should always be implemented in ways that allow them to function without Deprecation information. Increased scope information may help client application developers to glean additional hints from related resources and, thus, might allow them to implement behavior that allows them to make educated guesses about resources becoming deprecated.</t>
            <t>For example, an API might not use Deprecation header fields on all of its resources, but only on designated resources such as the API's home document. This means that deprecation information is available, but in order to get it, client application developers have to periodically inspect the home document. In this example, the extended context of the Deprecation header field would be all resources provided by the API, while the visibility of the information would only be on the home document.</t>
         </section>
      </section>
      <section anchor="the-deprecation-link-relation-type">
         <name>The Deprecation Link Relation Type</name>
         <t>In addition to the Deprecation HTTP header field, the server can use links with the "deprecation" link relation type to communicate to the client application developer where to find more information about deprecation of the context. This can happen before the actual deprecation, to make a deprecation policy discoverable, or after deprecation, when there may be documentation about the deprecation, and possibly documentation of how to manage it.</t>
         <t>This specification places no restrictions on the representation of the linked deprecation policy. In particular, the deprecation policy may be available as human-readable documentation or as machine-readable description.</t>
         <section anchor="documentation">
            <name>Documentation</name>
            <t>The purpose of the <spanx style="verb">Deprecation</spanx> header field is to provide a hint about deprecation to the resource consumer. Upon reception of the <spanx style="verb">Deprecation</spanx> header field, the client application developer can look up the resource's documentation in order to find deprecation related information. The documentation <bcp14>MAY</bcp14> provide a guide and timeline to migrate away from the deprecated resource to a new resource(s) replacing the deprecated resource, if applicable. The resource provider can provide a link to the resource documentation using a <spanx style="verb">Link</spanx> header field with relation type <spanx style="verb">deprecation</spanx> as shown below:</t>
            <figure>
               <artwork>
Link: &lt;https://developer.example.com/deprecation&gt;;
      rel="deprecation"; type="text/html"
</artwork>
            </figure>
            <t>In this example the linked content provides additional information about deprecation of the resource context. There is no Deprecation header field in the response, and thus the resource is not (yet) deprecated. However, the resource already exposes a link where information is available describing how deprecation is managed for the resource. This may be the documentation explaining under which circumstances and with which policies deprecation might take place. For example, a policy may indicate that deprecation of a resource(s) will always be signaled in the dedicated places at least N days ahead of the planned deprecation date and then only the resource(s) would be deprecated. Or a policy may indicate that resource(s) would be deprecated first and then only be signaled as deprecated at dedicated places. The documentation in addition to the deprecation policy may also provide a migration guide exaplaining to consumers of the resource how to migrate to a new resource(s) or an alternate resource(s) before the deprecation date. Such policy and documentation would be very useful to consumers of the resource to plan ahead and migrate successfully.</t>
            <t>The following example uses the same link header field, but also announces a deprecation date using a Deprecation header field:</t>
            <figure>
               <artwork>
Deprecation: @1688169599
Link: &lt;https://developer.example.com/deprecation&gt;;
      rel="deprecation"; type="text/html"
</artwork>
            </figure>
            <t>Given that the deprecation date is in the past, the linked information resource may have been updated to include information about the deprecation, allowing consumers to discover information about the deprecation and how to best manage it.</t>
         </section>
      </section>
      <section anchor="sunset">
         <name>Sunset</name>
         <t>In addition to the deprecation related information, if the resource provider wants to convey to the client application that the deprecated resource is expected to become unresponsive at a specific point in time, the Sunset HTTP header field <xref target="RFC8594"/> can be used in addition to the <spanx style="verb">Deprecation</spanx> header field.</t>
         <t>The timestamp given in the <spanx style="verb">Sunset</spanx> header field <bcp14>MUST NOT</bcp14> be earlier than the one given in the <spanx style="verb">Deprecation</spanx> header field. If that happens for some reasons such as misconfiguration of deployment of the resource or an error, the client application developer <bcp14>SHOULD</bcp14> consult the resource developer to get clarification.</t>
         <t>The following example shows that the resource in context has been deprecated since Friday, June 30, 2023 at 23:59:59 UTC and its sunset date is Sunday, June 30, 2024 at 23:59:59 UTC. Please note that for historical reasons the Sunset HTTP header field uses a different data format for date.</t>
         <figure>
            <artwork>
Deprecation: @1688169599
Sunset: Sun, 30 Jun 2024 23:59:59 UTC
</artwork>
         </figure>
      </section>
      <section anchor="resource-behavior">
         <name>Resource Behavior</name>
         <t>The act of deprecation does not change any behavior of the resource. The presence of a Deprecation header field in response is not meant to signal a change in the meaning or function of a resource in the context, allowing consumers to still use the resource in the same way as they did before the resource was declared deprecated.</t>
      </section>
      <section anchor="iana-considerations">
         <name>IANA Considerations</name>
         <section anchor="the-deprecation-http-response-header-field-1">
            <name>The Deprecation HTTP Response Header Field</name>
            <t>The <spanx style="verb">Deprecation</spanx> response header field should be added to the "Hypertext Transfer Protocol (HTTP) Field Name Registry" registry (<xref section="16.3.1" sectionFormat="of" target="HTTP"/>)</t>
            <figure>
               <artwork>
Header Field Name: Deprecation

Structured Type: Item

Status: permanent

Specification document: this specification,
            Section 2 "The Deprecation HTTP Response Header Field"
</artwork>
            </figure>
         </section>
         <section anchor="the-deprecation-link-relation-type-1">
            <name>The Deprecation Link Relation Type</name>
            <t>The <spanx style="verb">deprecation</spanx> link relation type should be added to the permanent registry of link relation types (<xref section="4.2" sectionFormat="of" target="LINK"/>).</t>
            <figure>
               <artwork>
Relation Name: deprecation

Description: Refers to a resource that is documentation (intended for human consumption) about the deprecation of the link's context.

Specification document: this specification,
        Section 3 "The Deprecation Link Relation Type"
</artwork>
            </figure>
         </section>
      </section>
      <section anchor="security-considerations">
         <name>Security Considerations</name>
         <t>The Deprecation header field should be treated as a hint, meaning that the resource is indicating (and not guaranteeing with certainty) that it will be or is deprecated. Deprecated resources function as they would have without sending the deprecation header field, even though one might consider non-functional details such as making them progressively less efficient with longer response time for example.</t>
         <t>Resource documentation should provide additional information about the deprecation, such as including recommendation(s) for replacement. Developers of client applications consuming the resource <bcp14>SHOULD</bcp14> always check the referred resource documentation to verify authenticity and accuracy. In cases where a <spanx style="verb">Link</spanx> header field is used to provide documentation, one should assume (unless served over HTTPS) that the content of the <spanx style="verb">Link</spanx> header field may not be secure, private or integrity-guaranteed, and due caution should be exercised when using it, see <xref section="5" sectionFormat="of" target="LINK"/> for more details. In cases where the Deprecation header field value is in the past, the client application developers <bcp14>MUST</bcp14> no longer assume that the behavior of the resource would remain the same as before the deprecation date. In cases where the Deprecation header field value is a date in the future, it can lead to information that otherwise might not be available. Therefore, client application developers consuming the resource <bcp14>SHOULD</bcp14>, if possible, consult the resource developer to discuss potential impact due to deprecation and plan for possible transition to a recommended resource(s).</t>
      </section>
   </middle>
   <back>
      <references anchor="sec-normative-references" title="Normative References">
         <reference anchor="HTTP">
            <front>
               <title>HTTP Semantics</title>
               <author fullname="R. Fielding"
                       initials="R."
                       role="editor"
                       surname="Fielding"/>
               <author fullname="M. Nottingham"
                       initials="M."
                       role="editor"
                       surname="Nottingham"/>
               <author fullname="J. Reschke"
                       initials="J."
                       role="editor"
                       surname="Reschke"/>
               <date month="June" year="2022"/>
            </front>
            <seriesInfo name="STD" value="97"/>
            <seriesInfo name="RFC" value="9110"/>
            <seriesInfo name="DOI" value="10.17487/RFC9110"/>
         </reference>
         <reference anchor="LINK">
            <front>
               <title>Web Linking</title>
               <author fullname="M. Nottingham" initials="M." surname="Nottingham"/>
               <date month="October" year="2017"/>
            </front>
            <seriesInfo name="RFC" value="8288"/>
            <seriesInfo name="DOI" value="10.17487/RFC8288"/>
         </reference>
         <reference anchor="STRUCTURED-FIELDS">
            <front>
               <title>Structured Field Values for HTTP</title>
               <author fullname="Mark Nottingham" initials="M." surname="Nottingham">
                  <organization>Cloudflare</organization>
               </author>
               <author fullname="Poul-Henning Kamp" initials="P." surname="Kamp">
                  <organization>The Varnish Cache Project</organization>
               </author>
               <date day="21" month="April" year="2024"/>
            </front>
            <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-sfbis-06"/>
         </reference>
         <reference anchor="RFC2119">
            <front>
               <title>Key words for use in RFCs to Indicate Requirement Levels</title>
               <author fullname="S. Bradner" initials="S." surname="Bradner"/>
               <date month="March" year="1997"/>
            </front>
            <seriesInfo name="BCP" value="14"/>
            <seriesInfo name="RFC" value="2119"/>
            <seriesInfo name="DOI" value="10.17487/RFC2119"/>
         </reference>
         <reference anchor="RFC8174">
            <front>
               <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
               <author fullname="B. Leiba" initials="B." surname="Leiba"/>
               <date month="May" year="2017"/>
            </front>
            <seriesInfo name="BCP" value="14"/>
            <seriesInfo name="RFC" value="8174"/>
            <seriesInfo name="DOI" value="10.17487/RFC8174"/>
         </reference>
         <reference anchor="RFC8594">
            <front>
               <title>The Sunset HTTP Header Field</title>
               <author fullname="E. Wilde" initials="E." surname="Wilde"/>
               <date month="May" year="2019"/>
            </front>
            <seriesInfo name="RFC" value="8594"/>
            <seriesInfo name="DOI" value="10.17487/RFC8594"/>
         </reference>
      </references>
      <?line 192?>
      <section anchor="implementation-status">
         <name>Implementation Status</name>
         <t>Note to RFC Editor: Please remove this section before publication.</t>
         <t>This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft. The description of implementations in this section is intended to assist the IETF in its decision processes in progressing drafts to RFCs. Please note that the listing of any individual implementation here does not imply endorsement by the IETF. Furthermore, no effort has been spent to verify the information presented here that was supplied by IETF contributors. This is not intended as, and must not be construed to be, a catalog of available implementations or their features. Readers are advised to note that other implementations may exist.</t>
         <t>According to RFC 7942, "this will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature. It is up to the individual working groups to use this information as they see fit".</t>
         <section anchor="implementing-the-deprecation-header-field">
            <name>Implementing the Deprecation Header Field</name>
            <t>This is a list of implementations that implement the deprecation header field:</t>
            <t>Organization: Apollo</t>
            <t>
               <list style="symbols">
                  <t>Description: Deprecation header field is returned when deprecated functionality (as declared in the GraphQL schema) is accessed</t>
                  <t>Reference: https://www.npmjs.com/package/apollo-server-tools</t>
               </list>
            </t>
            <t>Organization: Zalando</t>
            <t>
               <list style="symbols">
                  <t>Description: Deprecation header field is recommended as the preferred way to communicate API deprecation in Zalando API designs.</t>
                  <t>Reference: https://opensource.zalando.com/restful-api-guidelines/#deprecation</t>
               </list>
            </t>
            <t>Organization: Palantir Technologies</t>
            <t>
               <list style="symbols">
                  <t>Description: Deprecation header field is incorporated in code generated by conjure-java, a CLI to generate Java POJOs and interfaces from Conjure API definitions</t>
                  <t>Reference: https://github.com/palantir/conjure-java</t>
               </list>
            </t>
            <t>Organization: E-Voyageurs Technologies</t>
            <t>
               <list style="symbols">
                  <t>Description: Deprecation header field is incorporated in Hesperides, a configuration management tool providing universal text file templating and properties editing through a REST API or a webapp.</t>
                  <t>Reference: https://github.com/voyages-sncf-technologies/hesperides/blob/master/documentation/lightweight-architecture-decision-records/deprecated_endpoints.md</t>
               </list>
            </t>
            <t>Organization: Open-Xchange</t>
            <t>
               <list style="symbols">
                  <t>Description: Deprecation header field is used in Open-Xchange appsuite-middleware</t>
                  <t>Reference: https://github.com/open-xchange/appsuite-middleware</t>
               </list>
            </t>
            <t>Organization: MediaWiki</t>
            <t>
               <list style="symbols">
                  <t>Description: Core REST API of MediaWiki would use Deprecation header field for endpoints that have been deprecated because a new endpoint provides the same or better functionality.</t>
                  <t>Reference: https://phabricator.wikimedia.org/T232485</t>
               </list>
            </t>
            <t>In addition to the above list, the Deprecation link relation is returned in the Registration Data Access Protocol (RDAP) notices to indicate deprecation of jCard in favor of JSContact. RDAP is specified in the Internet Draft for Using JSContact in Registration Data Access Protocol (RDAP) JSON Responses https://datatracker.ietf.org/doc/draft-ietf-regext-rdap-jscontact/.</t>
         </section>
         <section anchor="implementing-the-concept">
            <name>Implementing the Concept</name>
            <t>This is a list of implementations that implement the general concept, but do so using different mechanisms:</t>
            <t>Organization: Zapier</t>
            <t>
               <list style="symbols">
                  <t>Description: Zapier uses two custom HTTP header fields named <spanx style="verb">X-API-Deprecation-Date</spanx> and <spanx style="verb">X-API-Deprecation-Info</spanx>
                  </t>
                  <t>Reference: https://zapier.com/engineering/api-geriatrics/</t>
               </list>
            </t>
            <t>Organization: IBM</t>
            <t>
               <list style="symbols">
                  <t>Description: IBM uses a custom HTTP header field named <spanx style="verb">Deprecated</spanx>
                  </t>
                  <t>Reference: https://www.ibm.com/support/knowledgecenter/en/SS42VS_7.3.1/com.ibm.qradar.doc/c_rest_api_getting_started.html</t>
               </list>
            </t>
            <t>Organization: Ultipro</t>
            <t>
               <list style="symbols">
                  <t>Description: Ultipro uses the HTTP <spanx style="verb">Warning</spanx> header field as described in Section 5.5 of RFC 9111 with code <spanx style="verb">299</spanx>
                  </t>
                  <t>Reference: https://connect.ultipro.com/api-deprecation</t>
               </list>
            </t>
            <t>Organization: Clearbit</t>
            <t>
               <list style="symbols">
                  <t>Description: Clearbit uses a custom HTTP header field named <spanx style="verb">X-API-Warn</spanx>
                  </t>
                  <t>Reference: https://blog.clearbit.com/dealing-with-deprecation/</t>
               </list>
            </t>
            <t>Organization: PayPal</t>
            <t>
               <list style="symbols">
                  <t>Description: PayPal uses a custom HTTP header field named <spanx style="verb">PayPal-Deprecated</spanx>
                  </t>
                  <t>Reference: https://github.com/paypal/api-standards/blob/master/api-style-guide.md#runtime</t>
               </list>
            </t>
         </section>
      </section>
      <section anchor="changes">
         <name>Changes from Draft-08</name>
         <t>This revision has made the following changes:</t>
         <t>
            <list style="symbols">
               <t>Addresses comments from Gen-ART, ARTART, SECDIR</t>
            </list>
         </t>
      </section>
      <section anchor="acknowledgments">
         <name>Acknowledgments</name>
         <t>The authors would like to thank Nikhil Kolekar, Darrel Miller, Mark Nottingham, and Roberto Polli for their contributions.</t>
         <t>The authors take all responsibility for errors and omissions.</t>
      </section>
   </back>
</rfc>
