Errors and limits
Diagnose failed requests and decide whether to retry.
Read an error
Use the HTTP status first. JSON errors may carry error or code and a human-readable message. The gateway can return a non-JSON body.
For example, the upload controller returns this shape when no file is supplied:
{"success":false,"code":"FILES_REQUIRED","error":"FILES_REQUIRED","message":"No files uploaded"}
Use the machine-readable error to choose a recovery action. Other errors may have a different envelope.
| HTTP | Typical trigger | Retry rule |
|---|---|---|
| 400 | Invalid hostname, empty files, invalid multipart, or missing ZIP entry point | Correct the request. Inspect htmlFileList if present. |
| 401 | Missing credential, wrong owner, or invalid sign-in code | Resolve the auth or ownership issue first. |
| 403 | Key without API access, a custom domain that is not connected to your account (CUSTOM_DOMAIN_NOT_OWNED), or deleting a project you do not own (NOT_LINK_OWNER) |
Verify the account and hostname. Connect a custom domain before publishing to it. |
| 404 | Project not found, or a custom domain that is not connected to your account (DOMAIN_DOES_NOT_EXIST) |
Fetch the profile and inspect data.links[].subdomain, or list domains with GET /v1/custom-domains. |
| 413 | File, storage, project-count, or gateway limit | Check the account limits. The gateway caps the complete request at 1000 MiB. |
| 429 | RATE_LIMIT_EXCEEDED |
Wait for the daily quota to reset. The documented default is 200 requests per key per day. |
| 5xx | Server or gateway failure | Verify an uncertain write before repeating it. |
Limits at a glance
| Limit | What to check |
|---|---|
| Solo project count | The upload API checks five non-trashed projects when creating a project. |
| Pro project count | The upload API checks 15 non-trashed projects created in the current month. |
| Custom domains | Solo 5, Pro 15, Pro Max 25 connected domains. See Custom domains. |
| Existing projects | Updates to projects you own are exempt from these new-project count checks; file and storage limits still apply. |
| Individual files | The limit depends on the account and plan. Check data.maxFileSize in Fetch profile when present. |
| Full upload request | The gateway caps the complete multipart request at 1000 MiB, including all parts. |
| API requests | The documented default is 200 requests per key per day. |
| Email-only preview | The link lasts about one hour. See Email-only previews. |
| MCP file | A tool call accepts one file up to 15 MiB of text or decoded binary. Use a ZIP for a multi-file site. |
Some accounts may have different limits. Check the account and plan rather than assuming every limit is the same.
Recover from an uncertain upload
Fetch the profile before retrying a write after a timeout. Use the expected hostname if one was supplied. A repeated upload without domain can create a second project under another generated hostname.
- Call Fetch profile and inspect
data.linksfor the expected hostname or a newly created project. Avoid logging the full response because it can contain an API key. - If you know the hostname, open the link and check the content. The profile can confirm that a project exists; it cannot prove that every file in a timed-out update was applied.
- If the state is still unclear, ask the owner to check the dashboard or inspect the project before retrying. An update replaces files, so retain the complete local file set.
- Retry only after deciding what should happen. A hostname omitted from a new upload can produce a second project.
For deletion, check the project list after an uncertain response before repeating the request. Do not infer that a 5xx or network timeout means no change occurred.