What does HTTP status code 451 mean?
The 451 Unavailable For Legal Reasons status code (RFC 7725) indicates that the resource is inaccessible due to legal demands (e.g. copyright takedowns, censorship, or court orders).
When to use it in APIs
Use when regional censorship, licensing limits, or court-mandated takedowns block API access to certain data subsets.
How it compares to other codes
- 403 Forbidden: A general permission failure. 451 is an explicit disclosure of legal restriction.