---
title: "Change a volume's size (counted against the plan's volume storage; never below its measured usage)"
method: PATCH
path: "/projects/{projectId}/volumes/{volumeId}"
tags: ["Volumes"]
---

# Change a volume's size (counted against the plan's volume storage; never below its measured usage)

`PATCH /projects/{projectId}/volumes/{volumeId}`

## Request

- Base URL: `https://hostingsurge.com/api/v1`
- URL: `https://hostingsurge.com/api/v1/projects/{projectId}/volumes/{volumeId}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-hs_session`

## Path parameters

- `projectId` string, uuid, required
- `volumeId` string, uuid, required

## Request body

- object
  - `sizeGb` integer, required: Size in GB; the sum over the organization counts against the plan's storage

## Response `200`

Resized

- object
  - `id` string, uuid, required
  - `projectId` string, uuid, required
  - `name` string, required
  - `mountPath` string, required
  - `sizeGb` integer, required
  - `status` 'pending' | 'active' | 'error', required
  - `statusDetail` string, nullable, required
  - `usedBytes` integer, nullable, required
  - `usageMeasuredAt` string, nullable, required: ISO-8601 timestamp
  - `overQuota` boolean, required
  - `createdAt` string, required: ISO-8601 timestamp
  - `updatedAt` string, required: ISO-8601 timestamp

## Other responses

- `400`: Invalid request: a bad name, mount path or size, a project type without volumes, or a delete without the exact name (code invalid_request)
- `401`: Missing or invalid session/token (code unauthorized)
- `402`: Plan limit reached (code limit_reached, details.reason volume_storage)
- `403`: Authenticated but not permitted (code forbidden)
- `404`: Not found or not visible to the caller (code not_found)
- `501`: Volumes are not available on this server yet (code not_configured)
- `503`: The hosting engine did not complete the change; nothing was changed (code provider_unavailable)

---

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