# disconnectBot

Source: <https://telegafirst.com/docs/api-op-disconnectbot>
Locale: ru
releaseGitSha: fc570c76ffc9cb87e2462d45b14f5c1b52fbaf0d
sourceContentDigest: db65b31e1f7851cbab19f378e48162f88cd577e984b12d5eafa8ff96f0296d71
Version: 6

# disconnectBot

`POST /api/v1/tools/onboarding/bot-connection/disconnect`

disconnectBot

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

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 | "Canonical global response cache requires a key for a nonempty body; journey commands, direct bot connection, retry, tax, provider and billing cancellation also enforce it in the actual controller. Bot connection recovery uses its durable tenant reservation and accepts an empty body without a key." |
| 0.in | "header" |
| 0.name | "Idempotency-Key" |
| 0.required | false |
| 0.schema | [0.schema](https://telegafirst.com/docs/schema-9ac136edb99a2063b3091602181c8d2022fdccb5b514991319d58544c2e57e95) |

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

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

## Ответы

| Поле | Значение |
| - | - |
| 201.content.application/json.schema | [OnboardingBotDisconnectResponse](https://telegafirst.com/docs/schema-ca471085a8f7b1fcc7082cd5675e3f1bf70c8de1190edbc31cd4972b08245d63) |
| 201.description | "The bot was taken off the business and the business is back at its bot step (body.disconnected true), or the business had no bot and nothing changed (false)." |

## Ошибки

| Поле | Значение |
| - | - |
| 400.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 400.description | "Invalid input or missing idempotency key." |
| 401.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 401.description | "Authentication required." |
| 403.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 403.description | "FORBIDDEN: only the business owner changes its bot, so the call needs the owner OAuth sign-in; an API key or M2M credential has no owner behind it." |
| 409.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 409.description | "GROUPS\_ALREADY\_BOUND: an operator group or the technical account is already bound, so the bot stays; connect the other bot to a new business (POST /api/v1/tools/onboarding/slug with new\_business true). ONBOARDING\_BUSY: a bot setup is still running." |

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

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