---
title: "Replace bot commands"
method: POST
path: "/bot{token}/setMyCommands"
tags: ["Bot"]
---

# Replace bot commands

`POST /bot{token}/setMyCommands`

Replaces the authenticated bot's complete command list. Commands appear to users in sort_order; send an empty array to clear the list.

## Path parameters

- `token` string, required

## Headers

- `authorization` string

## Request body

- SetMyCommandsInput — Commands to publish for the authenticated bot.
  - `commands` BotCommand[], required — Complete replacement list of up to 100 commands. Send an empty array to clear it.
    - `command` string, required — Command name without a leading slash. Use 1–32 lowercase letters, digits, or underscores.
    - `description` string, required — User-facing description shown in the command menu, up to 256 characters.
    - `sort_order` integer — Optional order in the command menu. Lower values appear first.

## Response `200`

Successful response for an action with no return value.

- BotEmptySuccess — Successful response for an action with no return value.
  - `ok` true, required — Always true for a successful request.
  - `result` object, required — Method-specific response payload.

## Other responses

- `400` — The request parameters are missing or invalid.
- `401` — The bot token is missing or invalid.
- `403` — The bot is not allowed to perform this action.
- `404` — The requested method or resource was not found.
- `500` — The server could not complete the request.

## Changes

> 6 revisions in range; 4 could not be searched.

- **2026-07-26** `d80f3b8927b8` — 1 breaking, 1 info
  - api path removed without deprecation
  - endpoint added

[Change history](https://skmtc.dev/inline/apis/inline-bot-http-api-docs/changes/bot:token/setMyCommands/post.md)

---

[API](https://skmtc.dev/inline/apis/inline-bot-http-api-docs.md) · [All operations](https://skmtc.dev/inline/apis/inline-bot-http-api-docs/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/inline/inline-bot-http-api-docs/revisions/69017b8dc5fe/schema)
