# disconnectBot

Source: <https://telegafirst.com/docs/api-op-disconnectbot>
Locale: ru
releaseGitSha: 005a4dc9d76f69a0815df4e3f98b9050d4d46afb
sourceContentDigest: 98c2c7da744e67f7d8e08503e931fd90a4632c82139396cbff7a13ff9b92ff56
Version: 11

# 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-492b85095e3cc8eea4d68508f07228a1e9ba7d6b9ea572e8b3ef93357c32f5ab) |
| 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-47fdf0d8395ef5a30fe38dcbde38e65bcdd30fe0fcf5d639ae3a647e01aef684) |
| 400.description | "Invalid input or missing idempotency key." |
| 401.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-47fdf0d8395ef5a30fe38dcbde38e65bcdd30fe0fcf5d639ae3a647e01aef684) |
| 401.description | "Authentication required." |
| 403.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-47fdf0d8395ef5a30fe38dcbde38e65bcdd30fe0fcf5d639ae3a647e01aef684) |
| 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-47fdf0d8395ef5a30fe38dcbde38e65bcdd30fe0fcf5d639ae3a647e01aef684) |
| 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" |
