# createSession

Source: <https://telegafirst.com/docs/api-op-createsession>
Locale: ru
releaseGitSha: ea133cd4ad87fe549ef000b139be145be9bd1717
sourceContentDigest: 180223008a714637fafa8780a258abba7e4874e289fa871b9ed0a7a8959f3e20
Version: 2

# createSession

`POST /api/v1/sessions`

createSession

## Авторизация и права

Scopes: ALL. Auth alternatives: OR; scopes внутри альтернативы: ALL.

| Поле | Значение |
| - | - |
| security.0.hubApiKey | \[] |
| security.1.hubBearer | \[] |
| securitySchemes.hubApiKey.in | "header" |
| securitySchemes.hubApiKey.name | "X-Api-Key" |
| securitySchemes.hubApiKey.type | "apiKey" |
| securitySchemes.hubBearer.scheme | "bearer" |
| securitySchemes.hubBearer.type | "http" |
| x-required-scopes | \["sessions"] |

## Параметры запроса

| Поле | Значение |
| - | - |
| 0.description | "Required for a nonempty POST body by the canonical24-hour HTTP response receipt." |
| 0.in | "header" |
| 0.name | "Idempotency-Key" |
| 0.required | true |
| 0.schema | [0.schema](https://telegafirst.com/docs/schema-9ac136edb99a2063b3091602181c8d2022fdccb5b514991319d58544c2e57e95) |

## Тело запроса

| Поле | Значение |
| - | - |
| content.application/json.schema | [CreateSessionRequest](https://telegafirst.com/docs/schema-7645793be9461cc800df15cd3c30f69172b805acc98af0e78eee59903b93df57) |
| required | true |

## Ответы

| Поле | Значение |
| - | - |
| 201.content.application/json.schema | [CreateSessionResponse](https://telegafirst.com/docs/schema-6f0b6d1d7af82aea52f2a5a5190f67a01a6d26d356c7d8e78e856d3a42d89cfb) |
| 201.description | "Create external session" |

## Ошибки

| Поле | Значение |
| - | - |
| 401.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 401.description | "Missing, invalid, expired or revoked authentication" |
| 403.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 403.description | "Required scope, plan or resource policy refused the caller" |
| 429.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 429.description | "Sixth login attempt in a 900-second trusted-IP window: RATE\_LIMITED" |
| 429.headers.Retry-After.required | true |
| 429.headers.Retry-After.schema | [429.headers.Retry-After.schema](https://telegafirst.com/docs/schema-ff16f931afa156ac08e9e7280066b1521b2021b2a7d0fbebbdf7907cdd9f2fbe) |

## Дополнительные условия

| Поле | Значение |
| - | - |
| operationId | "createSession" |
| tags | \["sessions"] |
| x-idempotency | "http-cache" |
