---
title: "Создать ключ"
method: POST
path: "/api-v2/auth/keys"
tags: ["Авторизация"]
---

# Создать ключ

`POST /api-v2/auth/keys`

## Request

- Base URL: `https://api-docs.yougile.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.yougile.com/api-v2/auth/keys`
- Auth: none declared

## Request body

- CredentialsWithCompanyDto
  - `login` string, required: Логин пользователя
  - `password` string, required: Пароль пользователя
  - `companyId` string, required: ID компании. Для получения ID компании можно использовать горячие клавиши в интерфейсе (Ctrl+Alt+Q / Ctrl+Option+Q для Mac) или воспользоваться [методом POST /auth/companies](../operations/getCompanies)

## Response `201`

- AuthKeyDto
  - `key` string, required: Ключ авторизации

## Other responses

- `400`
- `401`
- `403`
- `429`

---

[API](https://skmtc.dev/yougile/apis/yougile-rest-api-v2-0.md) - [All operations](https://skmtc.dev/yougile/apis/yougile-rest-api-v2-0/llms.txt) - [OpenAPI document](https://skmtc.dev/yougile/apis/yougile-rest-api-v2-0/revisions/9452cba35716?raw)
