---
title: "Create department"
method: POST
path: "/v2/companies/{companyId}/departments"
tags: ["Departments"]
---

# Create department

`POST /v2/companies/{companyId}/departments`

## Request

- Base URL: `https://api-ext-sboxmeta.partners.spotnana.com`
- URL: `https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/{companyId}/departments`
- Auth: HTTP bearer

This endpoint creates a department.

## Request body

- CreateDepartmentRequest: Create department request
  - `name` string, required: Name of the department
  - `externalId` string: External id of the department

## Response `201`

OK

- EntityId: Identifier of an object
  - `id` string, uuid, required

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden

---

[API](https://skmtc.dev/spotnana/apis/company-api.md) - [All operations](https://skmtc.dev/spotnana/apis/company-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spotnana/apis/company-api/revisions/184a1b415751?raw)
