# registerMiniAppOrigin

Source: <https://telegafirst.com/docs/api-op-registerminiapporigin>
Locale: ru
releaseGitSha: 0bb11ef116e17ec64c802d5476eaff442e53d252
sourceContentDigest: f37e862523a47fe8d4d0a536ecbdc0e0c9116e6e4506a1f5e75a909cb25f9c70
Version: 8

# 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-b03802e23ec524a6c52573ef2e5461c9e50c7abd730cc2dc8733c85dc24b712f) |
| required | true |

## Ответы

| Поле | Значение |
| - | - |
| 201.content.application/json.schema | [MiniAppOriginRegistration](https://telegafirst.com/docs/schema-3cb58eb68a689f7eaf180cf78ddb2bc9674f76f40720e7ed73b89b76c158f15a) |
| 201.description | "The tenant host is recorded as the channel's Mini App origin in status pending, with the recipe the owner follows: the BotFather Mini App URL for Telegram, the business.max.ru Mini App URL for MAX (moderated), nothing to paste for VK. The origin becomes registered on the first validly signed launch from it. No messenger API is called (ADR-331 D4)." |

## Ошибки

| Поле | Значение |
| - | - |
| 400.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 400.description | "Request body failed validation — a non-HTTPS origin, an origin other than the zone's tenant host, 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." |
| 422.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 422.description | "INVALID\_INPUT: the channel has no Mini App in this zone (MAX and VK accept only ru)." |

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

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