---
title: "Create a new cost center"
method: POST
path: "/os/v1/cost-centers"
tags: ["Cost Center", "Cost Center"]
---

# Create a new cost center

`POST /os/v1/cost-centers`

Creates a new cost center with the provided data.

**Business Rules:**

• External code must be unique within the company

• Name is required and must not exceed 255 characters

• External code is required and must not exceed 100 characters

• Description is optional and must not exceed 1000 characters

## Request body

- CreateCostCenterRequestDto
  - `name` string, required — cost center name
  - `externalCode` string, required — cost center external code
  - `description` string, required — cost center description

## Response `201`

Cost center successfully created

- object
  - `result` object, required — Result data
    - `uuid` string, uuid, required — UUID of the created cost center
  - `path` string, required — Request path
  - `duration` string, required — Request duration
  - `method` 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH', required — HTTP method used

## Other responses

- `400` — Bad Request - Invalid input data
- `401` — Unauthorized - Invalid or missing token
- `409` — Conflict - A cost center with this external code already exists
- `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)
