# 400 Bad Request: Missing required header 'X-Request-Id'

- **ID:** `api/http-400-missing-required-header`
- **Domain:** api
- **Category:** request_error
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

The API endpoint requires a specific HTTP header that the client did not include in the request.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| REST API | active | — | — |
| OpenAPI 3.0 | active | — | — |
| Express.js v4 | active | — | — |
| FastAPI v0.100 | active | — | — |

## Workarounds

1. **Add the header to the request: in curl, use `-H 'X-Request-Id: abc123'`; in Python requests, use `headers={'X-Request-Id': 'abc123'}`.** (95% success)
   ```
   Add the header to the request: in curl, use `-H 'X-Request-Id: abc123'`; in Python requests, use `headers={'X-Request-Id': 'abc123'}`.
   ```
2. **Check the API documentation for a list of all required headers and their expected values (e.g., length, format).** (90% success)
   ```
   Check the API documentation for a list of all required headers and their expected values (e.g., length, format).
   ```

## Dead Ends

- **** — The server may validate the header's format or content, not just its presence. (80% fail)
- **** — Headers are request-specific; response headers are ignored. (100% fail)
