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

> Shut down your database.

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

Stops a running database container. The data volume is preserved, so a subsequent [Start Database](/en/api-reference/endpoint/databases/start) call brings it back with the same credentials, port and connection URL. Use this to pause billing-relevant usage or take a database offline before maintenance.

The request is rejected while a snapshot restore is in progress on the same database. Rate limited to 1 stop per 3 seconds per user. To check whether the stop actually took effect, poll [Get Database Status](/en/api-reference/endpoint/databases/status).

### Parameters

<ParamField path="database_id" type="string" placeholder="Database ID" required>
  The ID of the database.
</ParamField>

### Response

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

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

### Common errors

| Code                  | HTTP | Meaning                                                                           |
| --------------------- | ---- | --------------------------------------------------------------------------------- |
| `RESTORE_IN_PROGRESS` | 403  | A snapshot restore is currently running for this database; wait for it to finish. |
| `DATABASE_NOT_FOUND`  | 404  | The database does not exist or is not owned by the caller.                        |
