---
title: "🔒 Создание новой организации компании."
method: POST
path: "/company/create"
tags: ["Company"]
---

# 🔒 Создание новой организации компании.

`POST /company/create`

## Request

- Base URL: `http://localhost`
- URL: `http://localhost/company/create`
- Auth: API key in header `sid` and API key in header `rts` and API key in header `sig`

Создание новой организации компании.

**Access:** `authorized` (10 ) · **allowNullCompany:** true · **Scope:** `write` · **только веб-сессия**

**Allows:** `company:create` (все обязательны; без ресурса)

### TypeScript (copy-paste)

**`POST /company/create`**

<details open><summary><b>Params</b></summary>

```typescript
export interface CompanyCreateParams {
  skipCreateContent?: boolean | null
}
```

</details>

<details open><summary><b>Body (Partial)</b></summary>

```typescript
// Patch-body: все поля опциональны (Valid.Patch)
export type CompanyCreateBody = Partial<Resp_company_create>

export interface CompanyCreateBodyFields {
  ID?: string
  title?: string
  logoFID?: string | null
  phone?: string
  email?: string
  url?: string
  description?: string
  address?: string
  foundationDT?: string | null
  country?: string | null
  defaultMarginPercent?: number | null
  demoSet?: string | null
  testSlot?: number | null
  agentPrices?: Record<string, any> | null
  docs?: {
  INN?: string | null
  other1?: string | null
  other2?: string | null
  requisites?: string | null
} | null
  timeZone?: string
  language?: string | null
  activityType?: Array<any> | null
  activityDescription?: string | null
  titleHash?: string
  /** Unix timestamp in milliseconds */
  updTS?: number
  updUID?: string
  createDT?: string
  createUID?: string
}
```

</details>

<details open><summary><b>Response</b></summary>

```typescript
export type CompanyCreateResponse = IServerResponse<Resp_company_create>

export interface IServerResponse<T = any> {
  code: number
  data: T
  srvTS: number
  rkey: string
}
```

</details>

> Полный файл типов: [`/docs/types`](/docs/types) · raw: [`/docs/api-types.ts`](/docs/api-types.ts)

## Query parameters

- `skipCreateContent` boolean, nullable

## Headers

- `devID` string, uuid, required
- `tz` string, required
- `app` string, required
- `appVer` string, required
- `rKey` string

## Request body

- CompanyCreateBody: Partial body (Valid.Patch) for `company/create` — все поля опциональны
  - `ID` string, uuid
  - `title` string
  - `logoFID` string, uuid, nullable
  - `phone` string
  - `email` string
  - `url` string
  - `description` string
  - `address` string
  - `foundationDT` string, date-time, nullable
  - `country` string, nullable
  - `defaultMarginPercent` integer, nullable
  - `demoSet` string, nullable
  - `testSlot` integer, nullable
  - `agentPrices` object, nullable
  - `docs` object, nullable
    - `INN` string, uuid, nullable
    - `other1` string, uuid, nullable
    - `other2` string, uuid, nullable
    - `requisites` string, uuid, nullable
  - `timeZone` string
  - `language` string, nullable
  - `activityType` unknown[], nullable
    - unknown
  - `activityDescription` string, nullable
  - `titleHash` string
  - `updTS` integer: Unix timestamp in milliseconds
  - `updUID` string
  - `createDT` string, date-time
  - `createUID` string

## Response `200`

OK — `IServerResponse<Resp_company_create>`

- object
  - `code` integer, required
  - `data` RespCompanyCreate, required: ResponseData for company/create
    - `session` AuthSession, required: Stub schema for unresolved $ref AuthSession (from ResponseData AST)
    - `currentUser` UserDto: Entity `User` (table: User )
      - `ID` string, uuid, required
      - `phone` string, nullable: Phone number
      - `email` string, nullable
      - `auth` object, nullable
      - `avatarFID` string, uuid, required
      - `firstName` string, required
      - `lastName` string, required
      - `patronymic` string, nullable
      - `gender` 'male' | 'female': `male` = "male", `female` = "female"
      - `contactInfo` string, nullable
      - `dateOfBirth` string, date-time, nullable
      - `address` object, nullable
        - `country` string, nullable
        - `city` string, nullable
        - `streetAddress` string, nullable
      - `timeZone` string, nullable
      - `meetingInfo` object, nullable
        - `zoomEmail` string, nullable
      - `position` string, nullable
      - `hourCost` number, required
      - `docsEmployment` object, nullable
      - `docsLibrary` object, nullable
      - `isDraft` boolean, required
      - `createDT` string, date-time, required
      - `createdUID` string, required
      - `updTS` integer, required: Unix timestamp in milliseconds
      - `updUID` string, required
    - `lastUpdTS` number, required
  - `srvTS` integer, required: Server timestamp (ms)
  - `rkey` string, required: Request key

## Other responses

- `400`: BadRequest: Invalid company title format
- `401`: Unauthorized: Active user session required
- `403`: AccessNotAllowed: Web session required (Bearer token)
- `406`: TimeResync — расхождение rts с сервером
- `422`: UnprocessableContent: Company title is empty, or company with same ID or title already exists

---

[API](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api.md) · [All operations](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/revisions/a143b51ba29a?raw)
