---
title: "Create a new operation unit"
method: POST
path: "/os/v1/operation-units"
tags: ["Operation Unit", "Operation Unit"]
---

# Create a new operation unit

`POST /os/v1/operation-units`

Creates an operation unit for the current company. Only name and externalCode are required.

## Request body

- CreateOperationUnitPublicRequestDto
  - `name` string, required — operation unit name
  - `externalCode` string, required — operation unit external code
  - `address` string — operation unit address
  - `businessRegistrationNumber` string — operation unit business registration number (CNPJ)
  - `externalCodeParent` string — parent operation unit external code

## Response `201`

Operation unit successfully created

- object
  - `result` object, required — Result data
    - `uuid` string, uuid, required — operation unit UUID
    - `name` string, required — operation unit name
    - `externalCode` string, required — operation unit external code
    - `address` string — operation unit address
    - `businessRegistrationNumber` string — operation unit business registration number
    - `company` CompanyDto, required
      - `id` string — Internal company ID
      - `uuid` string, uuid — company UUID
      - `centralCompanyId` string, uuid — central company UUID
      - `name` string — company name
    - `parent` OperationUnitResponseDto
      - `uuid` string, uuid, required — operation unit UUID
      - `name` string, required — operation unit name
      - `externalCode` string, required — operation unit external code
      - `address` string — operation unit address
      - `businessRegistrationNumber` string — operation unit business registration number
      - `company` CompanyDto, required
        - `id` string — Internal company ID
        - `uuid` string, uuid — company UUID
        - `centralCompanyId` string, uuid — central company UUID
        - `name` string — company name
      - `parent` OperationUnitResponseDto — recursive
  - `path` string, required — Request path
  - `duration` string, required — Request duration
  - `method` 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH', required — HTTP method used

## Other responses

- `401` — Unauthorized - Invalid or missing token
- `500` — Internal Server Error - Unexpected failure

---

[API](https://skmtc.net/gupy/apis/gupy-public-api.md) · [All operations](https://skmtc.net/gupy/apis/gupy-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gupy/gupy-public-api/revisions/3f26defa2a42/schema)
