---
title: "Remove a volume and delete its files (confirm with its exact name). A running app is restarted to unmount it unless restart is false"
method: DELETE
path: "/projects/{projectId}/volumes/{volumeId}"
tags: ["Volumes"]
---

# Remove a volume and delete its files (confirm with its exact name). A running app is restarted to unmount it unless restart is false

`DELETE /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
  - `confirm` string, required
  - `restart` boolean

## Response `200`

Removed

- object
  - `deleted` true, required
  - `applies` 'restarting' | 'next_restart' | 'next_start' | 'next_deploy' | 'restart_failed', required

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