<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/you-can-refactor-everything-except-your-api-pcwpvakuq" -->

---
title: You can refactor everything except your API | daily.dev
description: An API design newsletter explains why coupling, not naming conventions, is the central challenge in API design: once consumers depend on an API, its shape...
canonical: https://daily.dev/posts/you-can-refactor-everything-except-your-api-pcwpvakuq
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: You can refactor everything except your API | daily.dev
og:description: An API design newsletter explains why coupling, not naming conventions, is the central challenge in API design: once consumers depend on an API, its shape...
og:url: https://daily.dev/posts/you-can-refactor-everything-except-your-api-pcwpvakuq
og:image: https://api.daily.dev/og/posts/pcWPVaKUQ.png
og:image:alt: You can refactor everything except your API
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# You can refactor everything except your API

**[The Polymathic Engineer](https://daily.dev/sources/francofernando)** · 11 min read · 15 upvotes · 1 comments

## Summary

An API design newsletter explains why coupling, not naming conventions, is the central challenge in API design: once consumers depend on an API, its shape becomes nearly impossible to change even as backend implementation is freely refactored. It covers designing APIs from the consumer's perspective, the meaning of REST's safe and idempotent HTTP methods, the Richardson Maturity Model (arguing level 2 is the practical sweet spot over full HATEOAS), adopting API guidelines like Zalando's or Microsoft's early to avoid painful renames later, wrapping collections in objects from day one to allow pagination without breaking clients, and designing consistent, secure error responses with accurate status codes.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://newsletter.francofernando.com/p/you-can-refactor-everything-except>

## Questions this post answers

### What is the difference between PUT and PATCH in REST APIs, and which one is idempotent?

PUT replaces an entire resource with the payload sent, making it idempotent since repeating the call produces the same result. PATCH modifies only some fields of a resource, which is more convenient but sacrifices the idempotency guarantee that PUT provides. Use PUT for full replacement and PATCH for partial updates.

_Developers weighing PUT versus PATCH for their own endpoints can find design write-ups like this on daily.dev._

### What is the Richardson Maturity Model for REST APIs?

It is a four-level model, created by Leonard Richardson in 2008, that classifies how RESTful an HTTP API actually is. Level 0 treats HTTP as a transport for RPC calls; level 1 introduces resource-based URIs; level 2 adds proper use of HTTP verbs and status codes; level 3 adds HATEOAS-style navigable links. Level 2 is considered the practical target for most APIs, since level 3 adds verbosity that is rarely worth it for interservice calls.

_Engineers deciding how RESTful to make an API can compare design frameworks like this on daily.dev._

### Why should collection responses in a REST API be wrapped in an object instead of returned as a raw JSON array?

Wrapping collections in an object such as {"value": [...], "@nextLink": "..."} allows pagination metadata to be added later without breaking existing consumers who parse the response. A raw JSON array cannot hold a pagination pointer, so adding one later forces a breaking change from array to object. Wrapping from day one costs nothing when the collection is small.

_Teams planning API pagination strategies can track patterns like this on daily.dev before consumers integrate._

## Community discussion

Top comments from developers on daily.dev.

**@pdfopsdev** · 0 upvotes

> just use RFC 9457 problem+json for errors instead of inventing a shape, gateways and client libs already know how to parse it. and log which consumers hit which fields from day one, that's the only way you ever get to remove one.

## Similar posts on daily.dev

- [EP226: API Concepts Every Software Engineer Should Know](https://daily.dev/posts/ep226-api-concepts-every-software-engineer-should-know-rh6pqv5zh) · ByteByteGo · 15 upvotes · 1 comments
- [Good APIs Age Slowly](https://daily.dev/posts/good-apis-age-slowly-qqvotmrmd) · Programming Digest · 221 upvotes · 5 comments
- [How to Design APIs](https://daily.dev/posts/how-to-design-apis-tq8wnikkj) · System Design Codex · 1 upvotes · 0 comments
- [4 Popular APIs With Great Naming Conventions](https://daily.dev/posts/4-popular-apis-with-great-naming-conventions-75zcnfqim) · Nordic APIs · 19 upvotes · 0 comments
- [The Challenges of Evolving Your Service: Api Versioning](https://daily.dev/posts/the-challenges-of-evolving-your-service-api-versioning-zfwjay9ps) · ITNEXT · 0 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#backend](https://daily.dev/tags/backend), [#rest-api](https://daily.dev/tags/rest-api), [#system-design](https://daily.dev/tags/system-design)

[View this post on daily.dev](https://daily.dev/posts/you-can-refactor-everything-except-your-api-pcwpvakuq)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"You can refactor everything except your API","url":"https://daily.dev/posts/you-can-refactor-everything-except-your-api-pcwpvakuq","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/you-can-refactor-everything-except-your-api-pcwpvakuq"},"datePublished":"2026-09-18T07:44:40.202Z","dateModified":"2026-11-01T18:47:51.114Z","description":"An API design newsletter explains why coupling, not naming conventions, is the central challenge in API design: once consumers depend on an API, its shape...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/54b4ce93cdd79cf1123656b240e1966e?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/54b4ce93cdd79cf1123656b240e1966e?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"The Polymathic Engineer","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"The Polymathic Engineer","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/2a66d4e9f17e4214a6d620baed8123e1","url":"https://daily.dev/sources/francofernando"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/you-can-refactor-everything-except-your-api-pcwpvakuq","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":15},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"architecture,backend,rest-api,system-design","timeRequired":"PT11M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The Polymathic Engineer","item":"https://daily.dev/sources/francofernando"},{"@type":"ListItem","position":3,"name":"You can refactor everything except your API"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/you-can-refactor-everything-except-your-api-pcwpvakuq","comment":[{"@type":"Comment","text":"just use RFC 9457 problem+json for errors instead of inventing a shape, gateways and client libs already know how to parse it. and log which consumers hit which fields from day one, that’s the only way you ever get to remove one.","datePublished":"2026-09-18T18:27:07.617Z","url":"https://daily.dev/posts/pcWPVaKUQ#c-UEOiMqW2g","author":{"@type":"Person","name":"PDFops","url":"https://daily.dev/pdfopsdev","image":"https://media.daily.dev/image/upload/s---8isRBKc--/f_auto/v1782922291/avatars/avatar_orjMeK8QKaaVZwGq7ScPz?_a=BAMAMicg0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/you-can-refactor-everything-except-your-api-pcwpvakuq#faq","mainEntity":[{"@type":"Question","name":"What is the difference between PUT and PATCH in REST APIs, and which one is idempotent?","acceptedAnswer":{"@type":"Answer","text":"PUT replaces an entire resource with the payload sent, making it idempotent since repeating the call produces the same result. PATCH modifies only some fields of a resource, which is more convenient but sacrifices the idempotency guarantee that PUT provides. Use PUT for full replacement and PATCH for partial updates. Developers weighing PUT versus PATCH for their own endpoints can find design write-ups like this on daily.dev."}},{"@type":"Question","name":"What is the Richardson Maturity Model for REST APIs?","acceptedAnswer":{"@type":"Answer","text":"It is a four-level model, created by Leonard Richardson in 2008, that classifies how RESTful an HTTP API actually is. Level 0 treats HTTP as a transport for RPC calls; level 1 introduces resource-based URIs; level 2 adds proper use of HTTP verbs and status codes; level 3 adds HATEOAS-style navigable links. Level 2 is considered the practical target for most APIs, since level 3 adds verbosity that is rarely worth it for interservice calls. Engineers deciding how RESTful to make an API can compare design frameworks like this on daily.dev."}},{"@type":"Question","name":"Why should collection responses in a REST API be wrapped in an object instead of returned as a raw JSON array?","acceptedAnswer":{"@type":"Answer","text":"Wrapping collections in an object such as {\"value\": [...], \"@nextLink\": \"...\"} allows pagination metadata to be added later without breaking existing consumers who parse the response. A raw JSON array cannot hold a pagination pointer, so adding one later forces a breaking change from array to object. Wrapping from day one costs nothing when the collection is small. Teams planning API pagination strategies can track patterns like this on daily.dev before consumers integrate."}}]}
```

