This is a somewhat simple question, but sadly I have not been able to find a concrete answer thus far.
We are constructing an API (we’re not in production yet) which returns a large amount of data after user authentication, etc. The API system tracks the user’s usage on a per second and per hour basis. When the user exceeds either of those limitations, the server returns no content and some http error code.
Presently, I’m using 406 Not Acceptable, but I don’t believe that’s the best code to use. Its been suggested that 509 Bandwidth Limit Exceeded would be a good one, but I wonder if there is a code which would be considered best practice for my situation. Thank you in advance for your help!
Status code 429 comes to mind: