When you see this status
- Batch processing where individual sub-requests succeed or fail
- WebDAV PROPFIND with multiple resource responses
- GraphQL response with partial data and errors
Common causes
- Client sends a batch request with mixed success/failure
- Server processes multiple independent operations
- Middleware aggregates responses from multiple sources
How to debug it
- Inspect response body for nested status objects
- Check each sub-response for individual status codes
- Validate the Content-Type header is 'multipart/mixed'
- Log intermediate processing steps for each sub-request
Return this code in your framework
Express (Node.js)
res.status(207).send({ status: 207, responses: [{ path: '/a', status: 200 }, { path: '/b', status: 404 }] });
FastAPI (Python)
return JSONResponse(status_code=207, content={"status": 207, "responses": [{"path": "/a", "status": 200}, {"path": "/b", "status": 404}]})
NestJS
@Get() @HttpCode(207) async multiStatus() { return { status: 207, responses: [{ path: '/a', status: 200 }, { path: '/b', status: 404 }] }; }
Go (net/http)
w.WriteHeader(http.StatusMultiStatus)
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(map[string]interface{}{"status": 207, "responses": []map[string]int{{path: "/a", status: 200}, {path: "/b", status: 404}}})
About HTTP 207
HTTP status code 207 Multi-Status is part of the
2xx Success family. Response body contains multiple statuses for different parts of a batch request. Understanding it is essential for
backend engineers, API designers, and anyone debugging integrations between services.
The Qaynaq Labs HTTP Status Code Explainer covers all standard codes with practical guidance:
what triggers them, how to debug them in production, and exactly how to return them from common
frameworks. Each code page is hand-curated and verified.