Skip to main content
POST
Connect a Telegram bot

Authorizations

Authorization
string
header
required

Company API key, sent as Authorization: Bearer <key>. Create it in the dashboard (Developer > API Keys) with the permissions the integration needs.

Body

application/json
bot_token
string

Token given by @BotFather (/newbot). Required on creation; on update only to replace a regenerated token of the same bot. Never returned.

Example:

"123456789:AAH..."

name
string

Internal name, the name of the bot by default

Maximum string length: 255
agent_id
string | null

Agent answering on the bot; null detaches it

Example:

"AGI-XXXXX"

enabled
boolean
default:true

Disabled, the bot no longer receives messages

Response

200 - application/json

Always HTTP 200: the outcome is in success and code (absolute value of the response code).

success
boolean
Example:

true

code
integer
Example:

1000

message
string
Example:

"Request success."

body
object

Endpoint payload, null when there is none

token
string | null

Present only on authentication routes

trace_id
string | null

Present only when success is false