# registerMiniAppOrigin

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

# registerMiniAppOrigin

`POST /api/v1/tools/onboarding/mini-app-origin`

registerMiniAppOrigin

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

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 | \["onboarding:write"] |

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

| Поле | Значение |
| - | - |
| 0.description | "Required for the nonempty canonical Mini App registration request." |
| 0.in | "header" |
| 0.name | "Idempotency-Key" |
| 0.required | true |
| 0.schema | [0.schema](https://telegafirst.com/docs/schema-9ac136edb99a2063b3091602181c8d2022fdccb5b514991319d58544c2e57e95) |

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

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

## Ответы

| Поле | Значение |
| - | - |
| 201.content.application/json.schema | [MiniAppOriginRegistration](https://telegafirst.com/docs/schema-20219cd941d8b561015b2415d1b4f3ec0a093d27663521c4024ee58807dbc20f) |
| 201.description | "Owner-confirmed Mini App origin recorded; no Bot API mutation occurs (ADR-076 / ADR-149)." |

## Ошибки

| Поле | Значение |
| - | - |
| 400.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 400.description | "Request body failed validation — a non-HTTPS origin, an unknown zone, or a smuggled tenant id." |
| 401.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 401.description | "Missing, invalid, revoked, or expired Hub credential." |
| 403.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 403.description | "The authenticated credential lacks the onboarding:write scope." |

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

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