Skip to main content
POST
/
v1
/
admin
/
bots
/
{bot_id}
/
regenerate-key
curl -X POST https://hapi.7331.org/v1/admin/bots/111222333444555666/regenerate-key \
  -b cookies.txt
{
  "bot": {
    "discord_id": "111222333444555666",
    "name": "Hansel Bot",
    "owner_discord_id": "123456789012345678",
    "bot_type": 1,
    "is_active": true,
    "rate_limit_per_hour": 1000,
    "guilds": 250,
    "users": 50000,
    "is_verified": true,
    "created_at": "2025-01-01T00:00:00Z",
    "updated_at": "2026-03-05T12:00:00Z"
  },
  "api_key": "hbot_abc123def456...",
  "message": "API key regenerated for bot Hansel Bot",
  "created_at": "2025-01-01T00:00:00Z",
  "updated_at": "2026-03-05T12:00:00Z"
}
Requires an active admin session cookie. Hierarchy enforced against the bot owner.
bot_id
integer
required
Discord snowflake ID of the bot.

Response

Returns the bot details with the new plaintext API key. Store the key securely — it cannot be retrieved later.
bot
object
required
Updated bot details.
api_key
string
required
New plaintext API key (shown only once).
message
string
required
Success message.
curl -X POST https://hapi.7331.org/v1/admin/bots/111222333444555666/regenerate-key \
  -b cookies.txt
{
  "bot": {
    "discord_id": "111222333444555666",
    "name": "Hansel Bot",
    "owner_discord_id": "123456789012345678",
    "bot_type": 1,
    "is_active": true,
    "rate_limit_per_hour": 1000,
    "guilds": 250,
    "users": 50000,
    "is_verified": true,
    "created_at": "2025-01-01T00:00:00Z",
    "updated_at": "2026-03-05T12:00:00Z"
  },
  "api_key": "hbot_abc123def456...",
  "message": "API key regenerated for bot Hansel Bot",
  "created_at": "2025-01-01T00:00:00Z",
  "updated_at": "2026-03-05T12:00:00Z"
}