Posted in

How to deprecate an API?

Hey everyone, it’s Sam, head of API Delivery over here. Lately I’ve been fielding so many panicked Slack messages from our dev partners asking, “Wait, is v2 of the payments API actually being deprecated? Because our entire checkout flow’s built on v1 and we just launched last week.” That’s exactly why I’m sitting down to write this today—API deprecation doesn’t have to be the messy, last-minute mess-up it sounds like when you’re rushing to rebuild a whole system because you skipped a step. As an API vendor, we’ve had to deprecate 7 different endpoints over the last three years, and we messed up the first one so bad we almost lost a big client. Now I’ve got a playbook that works, and I’m gonna walk you through it like I’m chatting over coffee (no stuffy corporate jargon, promise). API

First off, let’s get one thing straight: deprecation isn’t killing an API. It’s a structured handoff, like when a friend is moving out and gives you their apartment number so you can pick up their mail instead of just changing the locks. When we deprecated v1 of our user profiles API last year, we didn’t just yank it at 5pm on a Friday. We started planning 18 months before that, because we knew devs don’t just flip a switch and rewrite code. A lot of teams work on quarterly sprints, maybe longer for big projects—you can’t ask someone to tear out core API functionality in two weeks.

First step: When do you even decide an API needs to go? Most of the time it’s not that the API is broken, it’s that it’s holding you (and your users) back. For us, v1 of our invoicing API only let you send invoices in USD. Our small business users were blowing up support tickets asking for CAD and EUR, and building that functionality into v1 would’ve meant patching a clunky, outdated codebase that was already giving us 2x more support tickets than our newer APIs. So we made the call to deprecate v1 and replace it with v2, which had multi-currency support, webhook alerts for late payments, and way better error handling. That’s a good call to depreciate—if the old API is costing you and your users time, money, or frustration, don’t just band-aid it, fix it with a newer version.

Once you’ve made that call, the next step is to set a clear deprecation timeline and announce it early. For that invoicing API, we announced it 12 months before we planned to turn off v1. No “end of life” date, just a deprecation start date, and a soft end of life date 12 months later. Why the gap? Because “soft EOL” means the API still works, but it’s no longer getting security patches or new features, and we flag every call to it with a warning. That’s key—when devs hit an endpoint that’s marked deprecated, they get a 30-day notice right there in their API response, not just a random email they might miss in their inbox. We also posted a sticky banner on our developer portal for 18 months straight, pinned it to our Slack community channel, and sent quarterly emails to every dev that had used v1 in the last 2 years. We even assigned specific account managers to our top 50 clients, so their dev leads would get a personal Slack message or call, not just a mass blast. And yes, we still had a few teams that waited until the last minute—no stress, we extended the soft EOL by another 3 months for free for any team that needed it. Flexibility is huge here; not every dev is on the same timeline.

Next up: Support the transition, don’t just throw docs at people. When we deprecate an API, we don’t just update our docs and say “good luck!” We build a migration guide that’s specific, not generic. For the invoicing API, we made a side-by-side comparison table: every v1 endpoint, what it did, and exactly which v2 endpoint replaces it, with code snippets that are copy-paste ready. We also hosted 3 free live webinars, one for small dev teams, one for enterprise dev teams, and one for devops folks, to walk through the migration step by step. We even set up a dedicated Slack channel specifically for migration questions, manned by our API engineers 9am-5pm EST, no waiting in a general support queue. Half the battle of deprecation is making it easy for devs to move, so don’t make them hunt for answers.

Wait, another thing: versioning is your best friend here. If you’ve built your API with clear versioning (like v1, v2, etc.), deprecation is way easier. When we deprecated v1, we didn’t change any URLs, we just added a deprecation header to every v1 response that said “this endpoint is deprecated, use v2 instead.” That meant teams could test v2 alongside v1 for weeks, right in their existing code, without any big scary changes. We also added rate limits to deprecated APIs, so you don’t have a random flood of calls when teams forget to update. For us, we set rate limits at 20% of the regular API limits for deprecated endpoints, so if a team does miss the memo, it doesn’t take down our whole system or theirs.

Now, what about the end of life? This is the hard part, and where most companies mess up. When we turned off v1 invoicing, we waited until the soft EOL was done, but we had a 2-week buffer where if a dev reached out and said they still needed more time, we’d let them use it for free for another month. No exceptions, within reason. We also sent a reminder 1 week before EOL, and another 2 days before, so there was no surprise when the endpoint stopped working. The worst thing you can do is yank an API without warning—your devs will hate you, and they’ll tell all their friends never to use your platform.

Let me be real, we’ve made mistakes here. Our first deprecation, back in 2021, was a user profile API that only let you get user data, not update it. We announced it 2 months before EOL, no migration guide, no warnings in the API responses. A startup client built their entire onboarding flow on that endpoint, and when we turned it off, their sign-ups dropped by 40% for a week. We fixed it, offered them a free year of API credits, and apologized profusely, but that mistake taught us everything we know now. So learn from that: early announcements, clear warnings, migration support, flexibility.

A few extra tips that I wish someone told me when I started: first, monitor usage. We have a dashboard that tracks every API call to deprecated endpoints, so we can reach out to teams that are still using it and offer help, not just yell at them to switch. Second, don’t deprecate an API unless you have a clear replacement. It’s super frustrating for a dev to get a deprecation notice that says “sorry, this is gone” with no alternative. Third, be transparent about why you’re deprecating. Devs are way more likely to cooperate if you tell them “we’re deprecating this to build a faster, more secure API with better webhooks” instead of “we’re cleaning up old code.” That’s not just nice, it builds trust.

Wait, also, what if you have multiple teams using different versions? That’s totally fine, don’t rush everyone to switch. For a long time, we had teams still on v1 of our payments API, v2 of invoicing, and v3 of user profiles all running at the same time. It’s not worth disrupting stable systems just to get on a new version. Only deprecate when the old version is no longer maintainable, not just because a new version exists.

One last thing: when the whole migration is done, follow up. Send a survey to devs that went through the deprecation, ask what worked, what didn’t, what we could do better. We did that after the invoicing API migration, and one dev told us the code snippets were great but the webinars were too early for their time zone. So we added a recording of every webinar to the developer portal, plus a 10-minute walkthrough video that you can watch at your own pace. That small adjustment made such a difference.

Deprecation doesn’t have to be a headache. It’s just part of building APIs that grow with your users, instead of leaving them behind. If you’re a dev working on migrating from an old API, or a team considering deprecating an old endpoint, and you want to bounce ideas off someone who’s been there, reach out to our sales team to chat. We’re here to help make this as smooth as possible, no hoops to jump through.

API References

  1. API Academy, "Best Practices for API Deprecation", 2022
  2. Postman, "The Dev’s Guide to API Deprecation", 2023
  3. Nordic APIs, "How to Deprecate an API Without Burning Bridges", 2021

Shaanxi Hibo Biotechnology Co., Ltd.
As one of the most professional api manufacturers and suppliers in China, we’re featured by quality products and good service. Please rest assured to wholesale discount api in stock here from our factory. We also accept customized orders.
Address: Room 804, Unit 2, Building 4, i Metropolis, No. 11 Tangyan South Road, Gaoxin District, Xi’an City, Shaanxi Province
E-mail: hibo02@xaltbio.com
WebSite: https://www.hibobio.com/