---
title: "Создать"
method: POST
path: "/api-v2/departments"
tags: ["Отделы"]
---

# Создать

`POST /api-v2/departments`

## Request

- Base URL: `https://api-docs.yougile.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.yougile.com/api-v2/departments`
- Auth: HTTP bearer

## Request body

- CreateDepartmentDto
  - `title` string, required: Название отдела
  - `parentId` string: Id родительского отдела. Оставить пустым или "-", если это отдел верхнего уровня
  - `users` object: Сотрудники на отделе и их роль. Возможные значения: <br/><div>1) manager или member</div><div>2) "-" или "" для удаления существующего пользователя из отдела</div>

## Response `201`

- WithIdDto
  - `id` string, required: ID объекта

---

[API](https://skmtc.dev/yougile/apis/yougile-rest-api-v2-0.md) - [All operations](https://skmtc.dev/yougile/apis/yougile-rest-api-v2-0/llms.txt) - [OpenAPI document](https://skmtc.dev/yougile/apis/yougile-rest-api-v2-0/revisions/9452cba35716?raw)
