> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squarecloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Commit files to an application

> Push a single file or a .zip into an existing application with POST /v2/apps/{app_id}/commit. Files go up to 100 MB, and the app does not restart by itself.

<ParamField header="Authorization" type="string" placeholder="API Key" required>
  The API key for your account. You can find this in your [account settings](https://squarecloud.app/en/account/security).
</ParamField>

Requires an API key with the `apps:deploy` [scope](/en/api-reference/authentication#scopes).

Commit streams a single file or a `.zip` archive into an existing application without recreating it. A `.zip` is unpacked at the destination directory, while any other file is written as-is. This makes it the fastest way to push small code changes, hotfixes, or configuration updates from a CI pipeline or deploy script.

Committing does not restart the application by itself: after sending your changes, call [Restart Application](/en/api-reference/endpoint/apps/restart) so the new files take effect. For a first deployment of a new application, use [Upload Application](/en/api-reference/endpoint/apps/upload) instead, and to edit a single file in place without re-uploading, see the [File Manager endpoints](/en/api-reference/endpoint/apps/filemanager/patch).

Uploads are limited to **100 MB per file**. The request body is limited to **101 MB** (a file of up to 100 MB plus form overhead): a larger request is rejected with `413 FILE_TOO_LARGE` while it is still uploading. Only the first file part is read; additional form fields are ignored. File names containing path traversal (`..`), path separators, or control characters are rejected before any change is applied. On workspace-shared applications, the caller needs the `maintain` or `admin` [role](/en/api-reference/endpoint/workspace/members/invite#roles).

## Parameters

<ParamField path="app_id" type="string" placeholder="Application ID" required>
  The ID of the application. You can find this in the URL of your application's dashboard.
</ParamField>

<ParamField body="file" type="file" placeholder="commit.zip" required>
  Use FormData or NodeJS Buffer (single file or compress \[zip])
</ParamField>

<ParamField query="path" type="string" placeholder="src/routes">
  Optional. The destination directory inside the application. A `.zip` is unpacked here; any other file is placed at `path/filename`. Defaults to the application root.
</ParamField>

## Response

<ResponseField name="status" type="string">
  Indicates whether the call was successful: `success` if it was, `error` if not.
</ResponseField>

<ResponseExample>
  ```json theme={"system"}
  {
      "status": "success"
  }
  ```
</ResponseExample>

## Common errors

| Code | HTTP | Meaning |
| - | - | - |
| `INVALID_CONTENT_TYPE` | 415 | The request body is not `multipart/form-data`. |
| `INVALID_FILE` | 400 | No file field was found in the form data. |
| `INVALID_FILENAME` | 400 | The file name contains path separators, `..`, or control characters. |
| `INVALID_PATH` | 400 | The `path` query parameter contains traversal or shell metacharacters. |
| `COMMIT_FAILED` | 400 | The commit could not be applied to the application; retry, and check the archive if it repeats. |
| `FILE_TOO_LARGE` | 413 | The file exceeded 100 MB or the request body exceeded 101 MB. |
| `UPLOAD_BUSY` | 503 | Too many uploads are being processed right now; retry in a moment. |

## Related

* CLI: [`squarecloud commit`](/en/cli-reference/deploy#squarecloud-commit)
* SDKs: [`api.apps.commit()`](/en/sdks/js/commit_and_upload) (JavaScript), [`client.apps.commit()`](/en/sdks/py/commit_and_upload) (Python), [`c.Apps.Commit()`](/en/sdks/go/commit_and_upload) (Go)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.