API Deprecation Notification Setup: How to Know Before It Breaks
API deprecations should be orderly. Provider announces deprecation with a migration path, you adapt before the sunset date, everything continues working. That's the theory.
In practice: the deprecation email went to a shared inbox nobody reads. The changelog entry appeared six months ago. The API version was sunsetted this morning. Your application started returning errors at 7:03am.
Getting ahead of deprecations requires an active setup, not passive hope that you'll see the right announcement at the right time.
Understanding Deprecation Signals
Before setting up notifications, understand where deprecation information actually surfaces:
1. Response Headers
Well-behaved APIs include deprecation information directly in HTTP response headers. Look for these on every API response:
Deprecation: true
Sunset: Sat, 31 Dec 2026 23:59:59 GMT
Link: <https://api.example.com/v2/docs>; rel="successor-version"
These headers are defined in RFC 8594 (Sunset Header) and RFC 8594-adjacent standards. Major providers including GitHub, Stripe, and others use them.
Check for these headers in your API client:
async function callApiWithDeprecationCheck(
url: string,
options: RequestInit
): Promise<Response> {
const response = await fetch(url, options);
// Check for deprecation signals
const deprecationHeader = response.headers.get('Deprecation');
const sunsetHeader = response.headers.get('Sunset');
const linkHeader = response.headers.get('Link');
if (deprecationHeader || sunsetHeader) {
const sunsetDate = sunsetHeader ? new Date(sunsetHeader) : null;
const daysUntilSunset = sunsetDate
? Math.floor((sunsetDate.getTime() - Date.now()) / (1000 * 60 * 60 * 24))
: null;
logger.warn('api_deprecation_detected', {
url,
deprecation: deprecationHeader,
sunsetDate: sunsetHeader,
daysUntilSunset,
successor: parseLinkHeader(linkHeader, 'successor-version')
});
// Alert if sunset is approaching
if (daysUntilSunset !== null && daysUntilSunset < 90) {
await sendDeprecationAlert({
endpoint: url,
sunsetDate: sunsetHeader!,
daysUntilSunset,
urgency: daysUntilSunset < 30 ? 'high' : 'medium'
});
}
}
return response;
}
2. API Versioning in URL Paths
Endpoints that include version numbers (/v1/, /v2/) give you visible signal about where you are in the deprecation lifecycle. Track which version you're calling and monitor for when newer versions are available.
const API_VERSION_REGISTRY = {
'api.example.com': {
currentVersion: 'v1',
latestVersion: 'v2',
v1SunsetDate: '2026-12-31',
migrationGuide: 'https://docs.example.com/migrate-v1-to-v2'
}
};
function checkVersionStatus(url: string): VersionStatus {
const hostname = new URL(url).hostname;
const registry = API_VERSION_REGISTRY[hostname];
if (!registry) return { status: 'unknown' };
const urlVersion = url.match(/\/v(\d+)\//)?.[1];
if (urlVersion && urlVersion !== registry.latestVersion.replace('v', '')) {
return {
status: 'deprecated',
currentVersion: registry.currentVersion,
latestVersion: registry.latestVersion,
sunsetDate: registry.v1SunsetDate,
migrationGuide: registry.migrationGuide
};
}
return { status: 'current' };
}
3. Provider Changelog and Status Pages
Most API providers publish changelogs and have status/announcement pages. The challenge is monitoring them consistently without manually checking every day.
Setting Up Automated Deprecation Monitoring
Method 1: Changelog RSS Feeds
Many API providers publish RSS or Atom feeds for their developer documentation, changelogs, or status pages. Subscribe and monitor:
import Parser from 'rss-parser';
const CHANGELOG_FEEDS = [
{ provider: 'Stripe', url: 'https://stripe.com/blog/feed.rss' },
{ provider: 'GitHub', url: 'https://github.blog/changelog/feed/' },
{ provider: 'Twilio', url: 'https://www.twilio.com/blog/tag/changelog/feed' },
{ provider: 'Shopify', url: 'https://shopify.dev/changelog.xml' }
];
const DEPRECATION_KEYWORDS = [
'deprecat', 'sunset', 'end of life', 'eol',
'migration required', 'breaking change', 'removed'
];
async function scanChangelogForDeprecations() {
const parser = new Parser();
for (const feed of CHANGELOG_FEEDS) {
const parsed = await parser.parseURL(feed.url);
for (const item of parsed.items) {
const text = `${item.title} ${item.contentSnippet}`.toLowerCase();
const isDeprecation = DEPRECATION_KEYWORDS.some(kw => text.includes(kw));
if (isDeprecation) {
await sendDeprecationAlert({
provider: feed.provider,
title: item.title,
link: item.link,
publishedAt: item.pubDate,
urgency: text.includes('sunset') || text.includes('end of life') ? 'high' : 'medium'
});
}
}
}
}
Method 2: Monitor the API Version Endpoint
Many providers expose an endpoint that returns version information or deprecation status:
async function checkApiVersionStatus() {
const versionEndpoints = [
{
provider: 'Stripe',
url: 'https://api.stripe.com/',
deprecationSignalPath: 'headers.stripe-version'
}
];
for (const endpoint of versionEndpoints) {
const response = await fetch(endpoint.url, {
headers: { 'Authorization': `Bearer ${process.env[`${endpoint.provider.toUpperCase()}_KEY`]}` }
});
const stripeVersion = response.headers.get('Stripe-Version');
if (stripeVersion) {
logger.info('api_version_check', {
provider: endpoint.provider,
version: stripeVersion
});
}
}
}
Method 3: Monitoring Response Headers at Runtime
The most reliable approach is to check deprecation headers on every live API call, not just on health checks:
class ApiClient {
private deprecationLog = new Map<string, Date>();
async get(url: string): Promise<any> {
const response = await fetch(url, {
headers: this.buildHeaders()
});
this.checkDeprecationHeaders(url, response);
return response.json();
}
private checkDeprecationHeaders(url: string, response: Response) {
const sunset = response.headers.get('Sunset');
const deprecation = response.headers.get('Deprecation');
if (!sunset && !deprecation) return;
// Deduplicate alerts — don't spam on every request
const cacheKey = new URL(url).pathname;
const lastLogged = this.deprecationLog.get(cacheKey);
const hourAgo = new Date(Date.now() - 3600000);
if (!lastLogged || lastLogged < hourAgo) {
this.deprecationLog.set(cacheKey, new Date());
this.alertOnDeprecation({
endpoint: url,
sunsetDate: sunset ?? undefined,
deprecation: deprecation ?? undefined
});
}
}
private async alertOnDeprecation(info: DeprecationInfo) {
// Send to your alerting system
await fetch(process.env.ALERT_WEBHOOK_URL!, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
text: `⚠️ API Deprecation Detected: ${info.endpoint}\nSunset: ${info.sunsetDate ?? 'unknown'}`
})
});
}
}
Using Rumbliq for Deprecation Monitoring
Rumbliq handles several aspects of deprecation monitoring automatically:
Sunset header tracking — Rumbliq reads Sunset and Deprecation headers on every poll and alerts you when deprecation signals appear in API responses.
Schema drift as early deprecation signal — Before a field is officially deprecated, providers sometimes stop populating it or make it optional. Rumbliq detects when fields start appearing as null or disappear from responses — often before the official deprecation announcement.
Historical response comparison — Rumbliq maintains a schema history. You can see exactly when a field started changing, giving you timeline context for when the upstream change actually happened.
Set up a Rumbliq monitor for each third-party API you integrate with. Configure it to alert you on schema changes. When a field starts disappearing from responses — even before any official announcement — you'll know.
Building an Internal Deprecation Registry
For larger teams, maintain a shared registry of known deprecations:
// deprecations.ts — commit this to your repo
export const KNOWN_DEPRECATIONS = [
{
provider: 'Stripe',
feature: 'Charges API',
deprecatedVersion: 'v1',
sunsetDate: '2026-12-31',
migratedTo: 'PaymentIntents API',
migrationGuide: 'https://stripe.com/docs/payments/payment-intents/migration',
affectedFiles: ['src/payments/charge.ts', 'src/billing/invoice.ts'],
status: 'in_progress', // 'pending', 'in_progress', 'complete'
owner: 'payments-team',
ticketId: 'ENG-4521'
}
] as const;
// CI check: fail build if any deprecation is past sunset date and not complete
function checkDeprecationDeadlines() {
const today = new Date();
const overdueItems = KNOWN_DEPRECATIONS.filter(dep => {
if (dep.status === 'complete') return false;
return new Date(dep.sunsetDate) < today;
});
if (overdueItems.length > 0) {
console.error('OVERDUE DEPRECATIONS:');
overdueItems.forEach(dep => {
console.error(` ${dep.provider} ${dep.feature} — sunset ${dep.sunsetDate}`);
});
process.exit(1);
}
}
Deprecation Response Playbook
When you detect a deprecation, follow a consistent process:
- Assess the timeline — how many days until sunset? Under 30 days is an incident.
- Identify usage — grep your codebase for calls to the deprecated endpoint or field
- Read the migration guide — before writing any code, understand the new API shape
- Create a ticket — assign an owner, link the migration guide, set deadline before sunset
- Update monitoring — add the new endpoint to Rumbliq alongside the old one during migration
- Test the migration — parallel run old and new endpoints and compare results
- Cut over — switch to new API, remove old calls
- Update your deprecation registry — mark as complete
Notification Routing by Urgency
| Days Until Sunset | Urgency | Who Receives Alert |
|---|---|---|
| > 180 days | Low | Monthly digest to tech lead |
| 90-180 days | Medium | Weekly digest + ticket creation |
| 30-90 days | High | Slack alert to engineering team + ticket |
| < 30 days | Critical | PagerDuty page + immediate escalation |
| Past sunset | Incident | Same as production outage |
Related Posts
- API schema drift vs breaking changes
- API breaking change alerts
- third-party API versioning in production
Start Monitoring for Deprecations Now
Most teams don't have a formal deprecation monitoring setup — and discover deprecated APIs when they stop working. Building this takes a few hours and saves days of incident response.
Start simple: add deprecation header checking to your API client wrapper. Then set up Rumbliq monitors for your most critical third-party integrations. The first deprecation you catch early will make the investment obvious.
Monitor your API integrations with Rumbliq → — free plan available, no credit card required.