---
title: "Create a new storage volume"
method: POST
path: "/api/projects/{projectName}/volumes"
tags: ["volume"]
---

# Create a new storage volume

`POST /api/projects/{projectName}/volumes`

## Request

- Base URL: `https://api.hostim.dev`
- URL: `https://api.hostim.dev/api/projects/{projectName}/volumes`
- Auth: HTTP bearer

Create a new storage volume

## Path parameters

- `projectName` string, required

## Request body

- Volume
  - `name` string, required: The volume name
  - `plan` string, required: The volume plan
  - `cost` number: The cost of the volume per month
  - `storageMB` number: The size of the volume in MB

## Response `200`

Volume volume created

- GenericMessage
  - `error` string, required
  - `message` string, required

## Other responses

- `401`: User is not authorized
- `404`: Project not found
- `500`: Internal server error

---

[API](https://skmtc.dev/hostim/apis/hostim-api.md) · [All operations](https://skmtc.dev/hostim/apis/hostim-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hostim/apis/hostim-api/revisions/37c35e1026a9?raw)
