Bot Management REST APIs (A-Z)
Provision, delete, restore from recycle bin, restart, toggle webhooks, and inspect live Telegram webhook diagnostics.
Bot Management Actions in api/v1
Manage the full lifecycle of your Telegram bots remotely using standard HTTP GET and POST requests:
| Action | Parameters | Description |
|---|---|---|
list_bots |
status (active | deleted | all) |
Returns array of all bots. By default filters out recycle bin bots. |
get_bot |
bot_id |
Returns complete bot configuration, memory usage, webhook URL, and database size. |
create_bot |
token, admin_chat_id |
Creates a new bot instance, locks credentials in .env, registers webhook with Telegram, and initializes database.db. |
delete_bot |
bot_id, permanent (bool) |
Soft deletes to recycle bin by default; pass permanent=1 to permanently erase files and free bot slot. |
restore_bot |
bot_id |
Restores a soft-deleted bot from the recycle bin and re-establishes live webhook. |
restart_bot |
bot_id |
Refreshes webhook with Telegram, clears error state, and restarts bot execution sandbox. |
toggle_webhook |
bot_id, action_type (start | stop | toggle) |
Enables or disables live webhook delivery on Telegram servers without deleting bot. |
webhook_info |
bot_id |
Directly queries Telegram's official getWebhookInfo API and returns pending update counts and last error timestamps. |
update_bot |
bot_id, token, admin_chat_id |
Updates bot credentials and synchronizes .env. |
Sample cURL Commands
cURL — Create New Bot
curl -X POST https://botlify.cloud/api/v1 \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "create_bot",
"token": "7123456789:AAHq_EXAMPLE_TOKEN",
"admin_chat_id": "123456789"
}'
cURL — Inspect Live Webhook Diagnostics
curl "https://botlify.cloud/api/v1?action=webhook_info&bot_id=12&api_key=YOUR_API_KEY"