Bots Business Api
  1. Commands
Bots Business Api
  • Authentication
    • Login Account
    • Register New User
    • Get telegram login url
    • Telegram login
    • Reset Password
  • User account
    • Get user details
    • Update email
    • Update password
    • Get linked telegram accounts
    • Get telegram link url
    • Get users session token
    • Reset api key
    • Log out all device
  • Bots
    • Create Bot
    • Get Bots
    • Edit Bot
    • Launch or Stop Bot
    • Start CSV import
    • CSV import task status
    • Delete Bot
    • Copy Bot
    • Git export
    • Git import
    • Get installed libraries
    • Install Lib
    • Uninstall lib
    • Get error log
    • Clear error logs
  • Commands
    • Folders
      • Create a folder
      • Delet a folder
      • Get all folders
    • Get Commands
      GET
    • Get Command Details
      GET
    • Create Command
      POST
    • Edit Command
      PUT
    • Delete Command
      DELETE
  • Broadcast
    • Get broadcast tasks
    • Delete Broadcast task
    • Pause broadcast task
    • Resume broadcast task
  • Chats
    • Get chats
    • Block chat
    • Unblock chat
  • Properties
    • Get properties
    • Delete property
  • Libraries
    • Get libraries
  • Admin Panel
    • Get panels
    • Save panel value
  1. Commands

Edit Command

PUT
/bots/{id}/commands/{command_id}
Use this endpoint to update an existing command.
Note: You must send the complete command details in the request body. Any omitted fields will be saved as null.
For editing code, you will be using this exact same endpoint.

Request

Path Params

Query Params

Body Params application/jsonRequired

Example
{
    "command": "/help",
    "aliases": "madat",
    "answer": "Hello, how can i help you",
    "group": "string",
    "help": "string",
    "keyboard_body": "Direct Contact",
    "commands_folder_id": 12,
    "auto_retry_time": 10,
    "bjs_code": "Bot.sendMessage(\"Hello\")",
    "need_reply": false
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT '/bots/12/commands/123?api_key=UKDZu-c68cubrIbniuE2P_nWj0p5r4IHARNrAV-I' \
--header 'Content-Type: application/json' \
--data-raw '{
    "command": "/help",
    "aliases": "madat",
    "answer": "Hello, how can i help you",
    "group": "string",
    "help": "string",
    "keyboard_body": "Direct Contact",
    "commands_folder_id": 12,
    "auto_retry_time": 10,
    "bjs_code": "Bot.sendMessage(\"Hello\")",
    "need_reply": false
}'

Responses

🟢200Success
application/json
You will get updated command
Body

Example
{
    "id": 69776996,
    "command": "/help",
    "bot_id": 2792064,
    "help": "string",
    "created_at": "2025-10-26T09:59:47.739Z",
    "updated_at": "2025-10-26T09:59:47.739Z",
    "answer": "Hello, how can i help you",
    "last_csv_import_at": "string",
    "created_via_csv_import": false,
    "keyboard_body": "Direct Contact",
    "need_reply": false,
    "auto_retry_time": "string",
    "last_auto_retry_at": "string",
    "commands_folder_id": null,
    "aliases": [
        {
            "id": 20802488,
            "command": "madat",
            "bot_command_id": 69776996,
            "created_at": "2025-10-26T10:09:11.745Z",
            "updated_at": "2025-10-26T10:09:11.745Z"
        }
    ],
    "code": "Bot.sendMessage(\"Hello\")"
}
Previous
Create Command
Next
Delete Command
Built with