Integrate Telegram Bot
Endpoint to integrate a Telegram bot into the ToolzzAI agent.
Request Example
Section titled “Request Example”curl --request POST \ --url https://chat.api.toolzz.com.br/api/v1/telegram/integration \ --header 'Authorization: Bearer TOKEN_HERE' \ --header 'Content-Type: application/json' \ --data '{ "botId": "uuid", "unitId": "uuid", "title": "string", "scope": "both | private | groups", "botToken": "telegram_bot_token"}'Response Example
Section titled “Response Example”{ "id": "uuid", "title": "string", "connectionStatus": "string", "guildName": "string", "channelsDetail": [ { "id": "string_digits", "name": "string" } ], "channelIds": ["string_digits"], "isActive": true, "createdAt": "2026-04-17 12:26:12.804444"}Request description
Section titled “Request description”Access Token
Section titled “Access Token”| Parameter | Type | Description | Required |
|---|---|---|---|
Authorization | String | Access token (“Bearer” must be before the token) | Yes |
Body Parameters
Section titled “Body Parameters”| Key | Type | Description | Required |
|---|---|---|---|
botId | UUID | Unique bot identifier in the Toolzz AI system. | Yes |
unitId | UUID | Unique identifier of the owning organizational unit. | Yes |
title | String | Custom identifier name for the integration. | Yes |
scope | String | Defines where the bot will act (e.g., private, groups, or both). | Yes |
botToken | String | Official authentication token generated by @BotFather on Telegram. | Yes |
Response description
Section titled “Response description”| Key | Type | Description |
|---|---|---|
id | UUID | Unique identifier of the integration configuration in the database. |
botId | UUID | Identifier of the bot associated within the Toolzz AI platform. |
unitId | UUID | Unique identifier of the owning organizational unit. |
title | String | Integration identifier name (e.g., “Telegram Support”). |
isActive | Boolean | Defines if the integration is active and enabled to process messages. |
botToken | String | Telegram authentication token (API Key), returned in a masked form. |
isTokenMasked | Boolean | Signals if the botToken in the response is hidden for security. |
scope | String | Bot’s scope of action (e.g., both, private, group). |
welcomeMessage | String | Automatic greeting text sent when starting an interaction. |
createdAt | String | Record creation date and time (ISO 8601). |
updatedAt | String | Date and time of the last configuration modification. |
deletedAt | String/Null | Logical deletion date (Soft Delete), if the record was removed. |
Security
Section titled “Security”To access this endpoint, it is necessary to send a valid access token through the authorization header (Authorization) of the request. Additionally, the API is protected by other security measures to safeguard user data.
To access your access token, follow these steps:
- Log in to the ToolzzAI platform
- Click on “Settings”
- Click on “Access Token”
- Copy the access token
