---
title: "Change a database's CPU/memory within its organization's ceilings (a running database restarts)"
method: POST
path: "/operator/databases/{databaseId}/resources"
tags: ["Operator"]
---

# Change a database's CPU/memory within its organization's ceilings (a running database restarts)

`POST /operator/databases/{databaseId}/resources`

## Request

- Base URL: `https://hostingsurge.com/api/v1`
- URL: `https://hostingsurge.com/api/v1/operator/databases/{databaseId}/resources`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-hs_session`

## Path parameters

- `databaseId` string, uuid, required

## Request body

- object
  - `cpus` number
  - `memoryMb` integer
  - `reason` string, required: required: shown in the audit log verbatim

## Response `200`

Resized

- object
  - `status` 'ok', required
  - `databaseId` string, uuid, required
  - `cpus` number, required
  - `memoryMb` integer, required
  - `restarted` boolean, required

## Other responses

- `400`: Invalid request (code invalid_request)
- `403`: An action on an operator-console session older than 5 minutes (code forbidden, details.reauthenticate: sign in again at /admin/login), or an operator removed since the session was resolved
- `404`: Not found (code not_found); also the answer to any request without a live operator-console session (no admin cookie, a dashboard session, an API/MCP key or OAuth token, or a caller who is not a platform operator)
- `429`: Too many requests (code rate_limited); see Retry-After
- `501`: Not available on this server (code not_configured)

---

[API](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api.md) · [All operations](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/revisions/4d08337cdff1?raw)
