What is an API endpoint?
An endpoint is a specific URL where an API receives requests for a particular resource or action. For example, /users is an endpoint for working with users. Combined with an HTTP method, an endpoint defines one operation, so GET /users lists users and POST /users creates one. Each endpoint is a doorway into the API.
How endpoints are named
Good REST endpoints use nouns for resources, not verbs, because the HTTP method already carries the action. So you use /orders rather than /getOrders, and let GET, POST, and DELETE decide what happens.
- GET /orders: list all orders.
- POST /orders: create a new order.
- GET /orders/5: get one specific order.
- DELETE /orders/5: delete that order.
Say endpoints should use nouns, not verbs, in REST. Correcting a verb style path like /createUser to POST /users during an interview is a small detail that signals solid API design habits.
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