Skip to main content
POST
/
api
/
bots
/
add
Add a new bot
curl --request POST \
  --url http://localhost:8080/api/bots/add \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "token": "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11",
  "name": "My Bot",
  "manage_enabled": true,
  "proxy_enabled": false
}
'
{
  "id": 123,
  "token": "<string>",
  "name": "<string>",
  "source": "cli",
  "manage_enabled": true,
  "proxy_enabled": true,
  "backend_url": "<string>",
  "secret_token": "<string>",
  "long_poll_enabled": true,
  "description": "<string>",
  "running": true,
  "webhook_mode": true
}

Authorizations

Authorization
string
header
required

API key with bmx_ prefix. Obtain via /api/auth/api-keys.

Body

application/json
token
string
required

Telegram bot token

name
string

Display name for the bot

manage_enabled
boolean
default:false

Enable chat management features

proxy_enabled
boolean
default:false

Enable proxy forwarding to backend_url

backend_url
string

Backend URL to receive forwarded updates

secret_token
string

Secret token for webhook validation

Response

Bot created successfully

id
integer

Unique bot ID

token
string

Telegram bot token

name
string

Display name

source
enum<string>

Registration source (informational only — both types are functionally identical)

Available options:
cli,
web
manage_enabled
boolean

Whether chat management features are active for this bot

proxy_enabled
boolean

Whether this bot forwards updates to a backend URL

backend_url
string

Backend URL to forward updates to (when proxy_enabled)

secret_token
string

Secret token for validating backend webhook requests

long_poll_enabled
boolean

Whether the long-poll endpoint buffers updates for this bot

description
string

Natural-language description used by the LLM router

running
boolean

Whether the bot is currently active (polling or webhook-registered)

webhook_mode
boolean

Whether the bot is in webhook mode (not polled by BotMux)