Communicating Limits to API Clients
Learn the HTTP conventions for telling clients about rate limits, including the 429 status code, Retry-After, and the RateLimit headers that enable well-behaved clients.
Limits Need Communication
A limit that silently drops requests frustrates devs. A good API tells clients their usage, when they'll be throttled, and when to retry.
The 429 Status Code
When a client exceeds its allowance, return 429 Too Many Requests — the universal signal that the request was throttled, not a server error.
HTTP/1.1 429 Too Many Requests
Content-Type: application/json
{ "error": "rate_limit_exceeded" }All lessons in this course
- What is API Rate Limiting?
- Why Rate Limiting is Crucial
- Basic Rate Limit Concepts
- Communicating Limits to API Clients