Sunset Header · Schema

Sunset Header

Schema for representing API deprecation lifecycle data using the Sunset HTTP header field (RFC 8594) and Deprecation HTTP header field (RFC 9745).

API DeprecationHTTP HeadersRFC 8594RFC 9745API LifecycleREST APIsStandards

Properties

Name Type Description
endpoint string The URI of the API endpoint subject to deprecation.
sunsetDate string The date and time when the endpoint will become unresponsive. Corresponds to the value of the Sunset HTTP header (RFC 8594) in ISO 8601 format.
deprecationDate string The date and time when the endpoint was or will be deprecated. Corresponds to the Deprecation HTTP header (RFC 9745). Must not be later than sunsetDate if both are present.
sunsetHeaderValue string The raw HTTP-date value of the Sunset header as sent in the response (e.g., 'Sat, 31 Dec 2026 23:59:59 GMT').
deprecationHeaderValue string The raw structured-date value of the Deprecation header as sent in the response (e.g., '@1688169599').
migrationUrl string URL of the migration guide or replacement resource. Communicated via the Link header with rel='sunset' or rel='deprecation'.
replacementEndpoint string The URI of the replacement endpoint that consumers should migrate to.
status string Current lifecycle status of the endpoint. 'active' is fully operational; 'deprecated' is operational but scheduled for retirement; 'sunset' is end-of-life.
linkHeaders array Array of Link header values associated with this endpoint's deprecation.
View JSON Schema on GitHub

JSON Schema

sunset-header-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/sunset-header/main/json-schema/sunset-header-schema.json",
  "title": "Sunset Header",
  "description": "Schema for representing API deprecation lifecycle data using the Sunset HTTP header field (RFC 8594) and Deprecation HTTP header field (RFC 9745).",
  "type": "object",
  "properties": {
    "endpoint": {
      "type": "string",
      "format": "uri",
      "description": "The URI of the API endpoint subject to deprecation."
    },
    "sunsetDate": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time when the endpoint will become unresponsive. Corresponds to the value of the Sunset HTTP header (RFC 8594) in ISO 8601 format."
    },
    "deprecationDate": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time when the endpoint was or will be deprecated. Corresponds to the Deprecation HTTP header (RFC 9745). Must not be later than sunsetDate if both are present."
    },
    "sunsetHeaderValue": {
      "type": "string",
      "description": "The raw HTTP-date value of the Sunset header as sent in the response (e.g., 'Sat, 31 Dec 2026 23:59:59 GMT').",
      "example": "Sat, 31 Dec 2026 23:59:59 GMT"
    },
    "deprecationHeaderValue": {
      "type": "string",
      "description": "The raw structured-date value of the Deprecation header as sent in the response (e.g., '@1688169599').",
      "example": "@1688169599"
    },
    "migrationUrl": {
      "type": "string",
      "format": "uri",
      "description": "URL of the migration guide or replacement resource. Communicated via the Link header with rel='sunset' or rel='deprecation'."
    },
    "replacementEndpoint": {
      "type": "string",
      "format": "uri",
      "description": "The URI of the replacement endpoint that consumers should migrate to."
    },
    "status": {
      "type": "string",
      "enum": ["active", "deprecated", "sunset"],
      "description": "Current lifecycle status of the endpoint. 'active' is fully operational; 'deprecated' is operational but scheduled for retirement; 'sunset' is end-of-life."
    },
    "linkHeaders": {
      "type": "array",
      "description": "Array of Link header values associated with this endpoint's deprecation.",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Target URL of the link."
          },
          "rel": {
            "type": "string",
            "enum": ["sunset", "deprecation", "successor-version", "latest-version"],
            "description": "Link relation type."
          }
        },
        "required": ["url", "rel"]
      }
    }
  },
  "required": ["endpoint", "status"],
  "examples": [
    {
      "endpoint": "https://api.example.com/v1/users",
      "status": "deprecated",
      "deprecationDate": "2026-01-01T00:00:00Z",
      "deprecationHeaderValue": "@1735689600",
      "sunsetDate": "2027-01-01T00:00:00Z",
      "sunsetHeaderValue": "Fri, 01 Jan 2027 00:00:00 GMT",
      "migrationUrl": "https://developer.example.com/migration-v2",
      "replacementEndpoint": "https://api.example.com/v2/users",
      "linkHeaders": [
        {
          "url": "https://developer.example.com/migration-v2",
          "rel": "deprecation"
        },
        {
          "url": "https://api.example.com/v2/users",
          "rel": "successor-version"
        }
      ]
    }
  ]
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/sunset-header"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.