---
title: "Add category"
method: POST
path: "/category/add"
---

# Add category

`POST /category/add`

## Request

- Base URL: `http://localhost:21721`
- URL: `http://localhost:21721/category/add`
- Auth: HTTP bearer

Creates a new empty category in the vault.

New categories always need a parent as it's not allowed to create root categories.

## Request body

- CategoryAddRequest
  - `name` string, required: The category name
  - `parent` string, required: The parent category uuid to put the new category in

## Response `200`

The request was successful. The category was added.

- CategoryAddResponse
  - `category` string, required: The category uuid

## Other responses

- `400`: Bad request. Please check error message and your parameters.
- `401`: Authorization failed. Please supply a `Bearer` token via the `Authorization` header.
- `403`: Authorization failed. Please supply a valid `Bearer` token via the `Authorization` header.
- `500`: Internal error.

---

[API](https://skmtc.dev/xpipe/apis/xpipe-api-documentation.md) - [All operations](https://skmtc.dev/xpipe/apis/xpipe-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/xpipe/apis/xpipe-api-documentation/revisions/cc0e84caab21?raw)
