Menu
Back to Discussions

API Versioning: URL Path or Accept Header?

Wiggo Svensson
Wiggo Svensson
·2984 views
Hey everyone, I'm trying to figure out API versioning, which seems like a classic headache. We're spinning up a new service and need to pick a way to handle it. So, should we put the version in the URL path, like /v1/users and /v2/users, or use the Accept header, like Accept: application/vnd.myapi.v1+json? Both ways seem to have good and bad points, especially when it comes to how easy it is to find things, how caching works, and what the clients have to do. What has actually worked well for you guys, and what's your reasoning?
25 comments

Comments

Loading comments...