---
title: "Disconnect Telegram Bot Account"
method: POST
path: "/api/channels/telegram_bot/accounts/disconnect"
tags: ["channels", "channels", "telegram_bot"]
---

# Disconnect Telegram Bot Account

`POST /api/channels/telegram_bot/accounts/disconnect`

## Request

- Base URL: `https://api.dialogbrain.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dialogbrain.com/api/channels/telegram_bot/accounts/disconnect`
- Auth: none declared

Disconnect: unregister the webhook (deleteWebhook) and mark the account inactive.

Authorization: the account is OWNER-scoped. Without this any authenticated
user could deactivate another tenant's bot (and kill its webhook) by id —
the same privilege-escalation guard the canonical ``disconnect_account`` uses
(``accounts.py`` ``owner_only=True``). The final UPDATE is additionally scoped
by ``app_user_id`` so it can only ever touch the caller's own row.

## Request body

- TelegramBotDisconnectRequest
  - `account_id` string, required: Channel account ID to disconnect

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway.md) · [All operations](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/revisions/d84e7dc9977d?raw)
