What are the main HTTP methods in a REST API?
The main HTTP methods are GET to read data, POST to create something new, PUT to replace an existing resource, PATCH to update part of it, and DELETE to remove it. Each method has a clear meaning, which is why REST APIs are predictable. GET should never change data, while POST, PUT, PATCH, and DELETE do change things.
What each method means
- GET: fetch a resource, safe and should not change anything.
- POST: create a new resource, often returns the created item.
- PUT: replace a resource fully with the data you send.
- PATCH: update only some fields of a resource.
- DELETE: remove a resource.
GET is called safe because it only reads. GET, PUT, and DELETE are idempotent, meaning calling them many times has the same effect as calling once. POST is not idempotent, so repeating it can create duplicates.
Interviewers love when you connect methods to idempotency. Saying GET is safe and PUT is idempotent but POST is not shows you understand the deeper contract, not just the names.
Common follow up questions
Related interview questions
Want the full API Design guide?
Read every API Design concept with notes, diagrams, and code in one place. Track your progress as you go.
Open the API Design guide All API Design questions