Quiz Entry - updated: 2026.10.15
What is the difference between PUT and PATCH?
PUT replaces the whole target with what you send; PATCH changes or adds only the part you send and leaves the rest as it is.
* Same body, different result: PUT replaces the whole setting, PATCH merges into it. *
Take a router with NTP server 10.0.0.1 configured:
- PUT with
["10.0.0.2"]→ the NTP setting is replaced. Afterwards only10.0.0.2is configured, and10.0.0.1is gone. - PATCH with
["10.0.0.2"]→ the change is merged in. Afterwards both10.0.0.1and10.0.0.2are configured.
That is why the typical examples are "update the NTP server" for PUT and "add an NTP server" for PATCH.
The difference matters in automation. A PUT built from incomplete data silently deletes everything you didn't include, so use it only when you really mean "this is the complete new state".
Tip: PUT = put a new one in its place. PATCH = patch a hole, leaving the rest.
Go deeper:
PATCH request method — MDN — partial modification and how it differs from PUT.
RFC 5789 — PATCH Method for HTTP — the standard that added PATCH to HTTP.