---
title: "Creating branches"
method: POST
path: "/branches"
tags: ["Company Branches"]
---

# Creating branches

`POST /branches`

Creates a new branch.

## Request body

- BranchPostRequest
  - `code` string, required — Branch code
  - `name` string, required — Branch name
  - `path` string[], required — The path in the organizational structure
  - `addressCountry` string — Branch country
  - `addressCountryShortName` string — Branch country short name
  - `addressState` string — Branch state
  - `addressStateShortName` string — Branch state short name
  - `addressCity` string — Branch city
  - `addressStreet` string — Branch street
  - `addressNumber` string — Branch address number
  - `addressZipCode` string — Branch city

## Response `201`

A confirmation of successful insertion of the branch

- Branch — Branch
  - `id` integer, required — Branch ID
  - `code` string, required — Branch code
  - `name` string, required — Branch name
  - `path` string[], required — The path in the organizational structure
  - `addressCountry` string — Branch country
  - `addressCountryShortName` string — Branch country short name
  - `addressState` string — Branch state
  - `addressStateShortName` string — Branch state short name
  - `addressCity` string — Branch city
  - `addressStreet` string — Branch street
  - `addressNumber` string — Branch address number
  - `addressZipCode` string — Branch city
  - `addressLatitude` number, double — Branch address latitude
  - `addressLongitude` number, double — Branch address longitude
  - `createdAt` string, date-time, required — Data of creation
  - `updatedAt` string, date-time, required — Date of update

## Other responses

- `400` — BadRequest / Invalid Input
- `401` — Unauthorized
- `403` — Forbidden
- `409` — Conflict

---

[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/versions/3f26defa2a42/schema)
