> ## 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.

# Stop application

> Stop a running application with POST /v2/apps/{app_id}/stop, keeping its files, variables and configuration. Returns 409 when it is already stopped.

<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:control` [scope](/en/api-reference/authentication#scopes).

Shuts down a running application without deleting it: the container stops, but the application's files, environment variables, and configuration are kept, so it can be started again at any time with [Start Application](/en/api-reference/endpoint/apps/start). If the application is already stopped, the request answers `409 CONTAINER_ALREADY_STOPPED` instead of doing nothing.

This is the endpoint to reach for when you want to free up an application's resources temporarily, for example pausing a background worker outside business hours, without giving up the application slot the way [Delete Application](/en/api-reference/endpoint/apps/delete) would. On workspace-shared applications, the caller needs the `manager`, `maintain` or `admin` [role](/en/api-reference/endpoint/workspace/members/invite#roles).

The request is rate limited to 1 stop per 3 seconds per application, and to 20 lifecycle actions per 15 seconds per user across all applications, with a short block once that cap is hit. The request is also rejected with `403 RESTORE_IN_PROGRESS` while a snapshot restore runs on the application (up to about 2 minutes): wait for the restore to finish and try again.

## 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>

## 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 |
| - | - | - |
| `RESTORE_IN_PROGRESS` | 403 | A snapshot restore is running on this application; wait for it to finish (up to about 2 minutes). |
| `CONTAINER_ALREADY_STOPPED` | 409 | The application is already stopped. |
| `ACTION_FAILED` | 409 | The cluster rejected the action, for example the application is mid-deploy. |

## Related

* CLI: [`squarecloud app stop`](/en/cli-reference/apps#squarecloud-app-stop)
* SDKs: [`api.apps.stop()`](/en/sdks/js/managing_application) (JavaScript), [`client.apps.stop()`](/en/sdks/py/managing_application) (Python), [`c.Apps.Stop()`](/en/sdks/go/managing_application) (Go)


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