TG Cerber API

Permissions (scopes)

Every credential carries scopes, and every operation needs one. A scope never adds a right: each operation also runs the console's own role check for the admin behind the credential, so a scope only narrows what that admin can already do.

ScopeSummaryKindWhat it allows
archive:readRead the archiveRead

Archived chats, messages, search, chat members, edit history and files of the accounts the admin may read, plus the archive rules and the state of archive cleanups. Reading message content needs the archive password, stored with an OAuth connection or sent per request.

3 operations
org:readRead the organizationRead

The organization, its accounts and their Telegram sessions, the status pages, the journal, departments, admins and their access, the subscription as the admin may see it, notification settings and AI connections.

20 operations
accounts:writeManage accountsWrite

Approve sessions, pause and resume protection, edit role labels, departments and Telegram profiles, connect or re-login accounts (the Telegram code is relayed by a person), change archive rules, start a backup, and file requests to support. Each operation still checks the role, so the billing role can only file requests and set its own mail preferences, as in the panel.

31 operations
security:writeChange account securityWrite

Sign sessions out, offboard accounts, manage the 2FA password, recovery and login email and the passkey Cerber holds, the takeover lockdown, the security lock and the paired session.

22 operations
admins:writeManage admins and departmentsWrite

Invite admins, change their roles and access, disable, enable or remove them; create, rename and delete departments.

11 operations
archive:deleteDelete archive dataWrite, irreversible

Clean up stored archive data (preview, then confirm with the typed phrase), delete an account together with its archive, and delete the whole archive. Irreversible.

6 operations

Granting any write scope asks for the admin's console password — when an API key is created or a connection is approved. That re-entry stands in for the 10-minute confirmation the console asks for before security changes, so those operations need no extra confirmation in the call. Transferring ownership still needs the owner's current password in the request.

Operations marked Destructive sign sessions out, end protection or delete data: a program or an AI should show the person what will be done, to which account, and get their confirmation first. The three operations that delete archive data also take a confirm_phrase that the person types, exactly as in the console.

Every change is recorded in the organization's journal as the admin's, with the credential that made it.

What the API does not do

By design these stay in the console or elsewhere:

  • Sign-up, sign-in, accepting invitations and switching between organizations. A credential belongs to one organization and one admin; it never reaches another.
  • Money. Buying, upgrading, adding storage, paying, confirming a quote, cancelling, the payment method. get_billing_links returns the console pages where the person does it; nothing in the API charges anything.
  • Setting or changing the archive password, and the browser-side parts of the archive viewer (decrypting in the browser, remembered devices, re-sealing a chat cleanup). Message content is read through the MCP archive tools.
  • The QR-code sign-in of a new account: its code changes every 30 seconds and must be scanned from a screen. Connect by phone number instead.
  • Help-page progress, on-premises updates and the payment provider's webhook.