curl -X POST https://hapi.7331.org/v1/admin/bots \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"discord_id": 111222333444555666,
"name": "My Bot",
"owner_discord_id": 123456789012345678,
"rate_limit_per_hour": 1000
}'
{
"message": "Bot registered successfully",
"bot": {
"discord_id": "111222333444555666",
"name": "My Bot",
"owner_discord_id": "123456789012345678",
"id": 5,
"bot_type": 3,
"is_active": true,
"rate_limit_per_hour": 1000,
"guilds": 0,
"users": 0,
"created_at": "2025-01-15T12:00:00Z",
"updated_at": "2025-01-15T12:00:00Z"
},
"api_key": "hbot_abc123def456...",
"created_at": "2025-01-15T12:00:00Z",
"updated_at": "2025-01-15T12:00:00Z"
}
Register a new bot instance (admin only).
curl -X POST https://hapi.7331.org/v1/admin/bots \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"discord_id": 111222333444555666,
"name": "My Bot",
"owner_discord_id": 123456789012345678,
"rate_limit_per_hour": 1000
}'
{
"message": "Bot registered successfully",
"bot": {
"discord_id": "111222333444555666",
"name": "My Bot",
"owner_discord_id": "123456789012345678",
"id": 5,
"bot_type": 3,
"is_active": true,
"rate_limit_per_hour": 1000,
"guilds": 0,
"users": 0,
"created_at": "2025-01-15T12:00:00Z",
"updated_at": "2025-01-15T12:00:00Z"
},
"api_key": "hbot_abc123def456...",
"created_at": "2025-01-15T12:00:00Z",
"updated_at": "2025-01-15T12:00:00Z"
}
api_key is only returned in this response. Make sure to save it securely.curl -X POST https://hapi.7331.org/v1/admin/bots \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"discord_id": 111222333444555666,
"name": "My Bot",
"owner_discord_id": 123456789012345678,
"rate_limit_per_hour": 1000
}'
{
"message": "Bot registered successfully",
"bot": {
"discord_id": "111222333444555666",
"name": "My Bot",
"owner_discord_id": "123456789012345678",
"id": 5,
"bot_type": 3,
"is_active": true,
"rate_limit_per_hour": 1000,
"guilds": 0,
"users": 0,
"created_at": "2025-01-15T12:00:00Z",
"updated_at": "2025-01-15T12:00:00Z"
},
"api_key": "hbot_abc123def456...",
"created_at": "2025-01-15T12:00:00Z",
"updated_at": "2025-01-15T12:00:00Z"
}
Was this page helpful?