Request bodies are limited to 30 MB
By design By design
A request to a published site - an API call or a form post - may carry at most 30,000,000 bytes; a larger body is refused with HTTP 413 before your script runs. A posted form may have at most 1024 fields, field names up to 2048 characters and values up to 4 MiB, or the request gets HTTP 400. Large files go through the Docly editor, the mapped drive or the CLI, not through your own API.
Applies to: APIFormsUploads
What you'll see
An upload through your own #/API/ endpoint, a large JSON post or a form with many attachments fails with 413 Payload Too Large or 400 Bad Request. Nothing appears in the site console, because the script never ran.
What's actually happening
Every request has a body limit, and the server applies it before any of your code runs:
| Limit | Value | Over the limit |
|---|---|---|
| Request body (any request to a published site) | 30,000,000 bytes | HTTP 413 |
| Number of fields and files in a posted form | 1024 | HTTP 400 |
| Length of a field name | 2048 characters | HTTP 400 |
| Length of a field value | 4 MiB | HTTP 400 |
The limits cover API scripts, data-validate functions and the built-in form submission alike. They are not configurable per site. Uploads through the Docly editor, the mapped drive and the docly CLI use a separate, much higher limit (about 4 GB).
Base64 costs a third: a JSON body with a file encoded as base64 holds about 22 MB of file before it reaches the limit.
What to do
- Keep files that visitors upload through your own forms or endpoints well below 30 MB, and say so in the form. Check the size in the browser before posting, so the visitor gets a clear message instead of a 413.
- For bigger files, let the user put them in the workspace through Docly (editor, drive or CLI) and pass your API a reference instead.
- Send many small values as one JSON body rather than as hundreds of form fields.
- Client code should handle
413and400explicitly; there is no response from your script to show.