API Design · Middle · Question 72 of 75
When should an API return 410 Gone rather than 404?
- 1When the user is logged out
- 2When the server is restarting
- ✓Correct answer: When the resource or endpoint existed but was intentionally and permanently removed
Explanation
410 tells clients and crawlers to stop asking. It's useful after an endpoint's sunset date.