Error 400
This error indicates that the client sent a request to the server that could not be understood or processed due to issues with the request itself.
For more information, refer to RFC 7231 ↗.
A 400 Bad Request error occurs due to client-side issues, such as malformed request syntax, invalid request content, message framing problems, or deceptive request routing.
For example:
- If the request contains a special character that is not properly URL Encoded (or percent-encoded) ↗, an
HTTP Error 400will be returned. - If the request contains both
Content LengthandTransfer Encodingchunked, these two framing methods contradict each other.Content Lengthdeclares a fixed size body, while chunked encoding declares a streamed body with no known size. RFC 7230 section 3.3.3 ↗ states that whenTransfer Encodingis present, theContent Lengthheader must be ignored and a request that includes both is considered malformed. This creates ambiguity in body framing and can enable request smuggling if different systems parse the boundary differently. Cloudflare follows the RFC and anHTTP Error 400will be returned.
If you encounter an HTTP error while using the Cloudflare API, make sure that you are using the correct syntax, parameters, and body for your API call.
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Directory
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- © 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark