---
title: "Turn a database on or off"
method: POST
path: "/v1/databases/{databaseID}/actions/scale"
tags: ["Configuration"]
---

# Turn a database on or off

`POST /v1/databases/{databaseID}/actions/scale`

## Request

- Base URL: `https://api.liara.ir`
- URL: `https://api.liara.ir/v1/databases/{databaseID}/actions/scale`
- Auth: HTTP bearer

Turns the database off (`scale: 0`) or on (`scale: 1`). Team permission: `manage`.

## Path parameters

- `databaseID` string, required: 24-character hexadecimal ID.

## Query parameters

- `teamID` string: 24-character hexadecimal ID.

## Request body

- object
  - `scale` 0 | 1, required

## Response `200`

Done. The response body is empty.

## Other responses

- `400`: The body or a parameter is invalid (`message` says which), or `teamID` isn't a valid ID.
- `401`: The API token is missing, invalid or expired.
- `403`: The database is on a free plan (`PLAN_UPGRADE_REQUIRED`), or, with `teamID`, you aren't a member (`team_not_found`) or lack the permission (`no_permission`).
- `404`: No running (or crash-looping) database with this ID.

---

[API](https://skmtc.dev/liara-cloud/apis/dbaas.md) - [All operations](https://skmtc.dev/liara-cloud/apis/dbaas/llms.txt) - [OpenAPI document](https://skmtc.dev/liara-cloud/apis/dbaas/revisions/f6f78c6f05c6?raw)
