---
title: "Create a new volume"
method: POST
path: "http://localhost:8000/{project_id}/volumes/add"
tags: ["volumes"]
---

# Create a new volume

`POST http://localhost:8000/{project_id}/volumes/add`

Create a new volume

The ID of the newly created volume is returned. Currently, box volumes and
triangle meshes are supported. Which one is created depends on the "type"
parameter, which can be either set to "box" or to "trimesh".

If a triangle mesh should be created, the "mesh" parameter is expected to
hold the complete volume. It is expected to be a string that encodes two
lists in JSON format: [[points], [triangles]]. The list of points contains
lists of three numbers, each one representing a vertex in the mesh. The
array of triangles also contains three element lists as items. Each one
represents a triangle based on the points in the other array, that are
referenced by the triangle index values.

## Path parameters

- `project_id` string, required

## Response `201`

Created

---

[API](https://skmtc.net/catmaid/apis/catmaid-api.md) · [All operations](https://skmtc.net/catmaid/apis/catmaid-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/catmaid/catmaid-api/versions/adc1c7c5eefe/schema)
