How do you design a RESTful endpoint for an action that isn't a CRUD operation, such as canceling an order or promoting a user?

Last updated 29 June 2026

  • Prefer modeling the action as a state change: PATCH /orders/42 with {"status": "cancelled"} stays fully RESTful.

  • For a genuinely distinct operation, POST to an action sub-resource like /orders/42/cancel or /users/7/promote (POST because it's unsafe and often non-idempotent).

  • Reserve verb endpoints for rare cases so the API doesn't drift into RPC, and apply one convention consistently.

  • https://medium.com/@bvsahane89/custom-methods-in-rest-api-endpoints-approaches-examples-and-best-practices-284ecd23e030
  • https://treblle.com/blog/rest-api-endpoint-design-guide
  • https://ivankahl.com/blog/practical-guide-to-modeling-business-processes-in-rest-apis/
  • https://digitalspecs.portofantwerpbruges.com/api-guidelines/
  • https://dev.to/sivantha96/api-endpoint-design-crud-vs-action-specific-endpoints-a-developers-guide-1eig
All REST API interview questions