PUT means "replace this resource with what I send". The client sends the full representation. If a field is missing, it is usually treated as removed or reset.
PATCH means "apply this partial change". The client sends only what changes, such as { "phone": "98xxxxxx10" }.
Both are meant to be repeatable safely. PUT is idempotent by definition (sending it twice gives the same result). A PATCH can be idempotent too, if it sets a value, but not if it means "add 1".
For your case, PATCH is the natural fit, because you change one field. PUT with the whole object risks overwriting changes another user made to other fields.
Many real APIs use PUT loosely for any update. What matters is that you document the behaviour and apply it consistently.
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
{ "phone": "98xxxxxx10" }.Both are meant to be repeatable safely. PUT is idempotent by definition (sending it twice gives the same result). A PATCH can be idempotent too, if it sets a value, but not if it means "add 1".
For your case, PATCH is the natural fit, because you change one field. PUT with the whole object risks overwriting changes another user made to other fields.
Many real APIs use PUT loosely for any update. What matters is that you document the behaviour and apply it consistently.