API Design · Junior · Question 44 of 75
How should an API announce that an endpoint will be removed?
- ✓Correct answer: Mark it deprecated in docs, send
Deprecation/Sunsetheaders with a date, notify clients and monitor usage before removal - 2Remove it without notice
- 3Return random errors to discourage usage
Explanation
The Sunset header (RFC 8594) gives the planned removal date machine-readably.