ApiSimul logo ApiSimul — the switchboard

HTTP 413 — Content Too Large

HTTP 413 rejects the request because the body exceeds what the server will accept — the payload cap was hit before processing even started. Closing the connection after refusing is permitted and common.

When 413 shows up

Mocking a 413 response

A response with this status can be faked end to end with a local mock rule — no backend changes needed. The configuration below mirrors the rule fields the ApiSimul editor uses (method, path, status, delay in milliseconds, response body):

{
  "method": "GET",
  "path": "/api/upload",
  "status": 413,
  "delay": 300,
  "enabled": true,
  "body": {
    "error": "payload_too_large",
    "maxBytes": 10485760
  }
}

Dynamic placeholders such as {{random.name}}, {{string.uuid}} or {{number.int 1 100}} can appear inside the body to vary each response, which keeps client-side list rendering and retry logic honest during development.

Frequently asked questions

What does HTTP 413 mean?
The request body is too big for this endpoint. Splitting the payload, compressing it, or raising the server limit are the ways forward.

How can I test a 413 response without a real backend?
Define a mock rule with the method and path your client requests and set the status to 413. The example configuration above returns this response after the listed delay, so the client exercises its 413 handling exactly as it would against a live server.

Related status codes

Need the response in your own project? Spin up rules for any status with the ApiSimul mock server, or browse every status code page.