Documentation

Guides and help for BotStat services
BotStat API · BotManager

Upload a database

Updated 01.12.2026 2 min read
POST /botman/{token} Upload or update the bot's user database in @BotManRobot. A bot not yet in BotManager is added automatically.
token
Bot token from @BotFather

Request body (form-data)

file
File with user and/or group IDs: txt, csv, xls, xlsx, json. Required

Query parameters

ParameterRequiredWhat it is
owner_idyesYour Telegram ID: @BotManRobot attaches the bot and the database to this account
folder_idnoFolder ID in @BotManRobot (My bots → Folders) - the bot goes into it
show_file_resultno, truefalse - do not send report files after mailings
bash
curl -X POST "https://api.botstat.io/botman/BOT_TOKEN?owner_id=123456789" \
  -F "file=@users.txt"

Response

json
{
  "ok": true,
  "result": {
    "message": "Data updated"
  }
}

Errors

json
{
  "ok": false,
  "result": {
    "error_code": "RATE_LIMITED",
    "message": "Please wait 240 seconds before updating the database again."
  }
}
HTTPerror_codeWhen
401INVALID_TOKENInvalid bot token
429RATE_LIMITEDThis bot's database was updated less than 5 minutes ago. The message says how many seconds to wait
422MISSING_PARAMETERSThe file or owner_id is missing. The message lists what is missing
422INVALID_PARAMETERSA parameter has the wrong type, e.g. owner_id is not a number
Was this article helpful? Didn't find the answer? Contact support