MinAPI
Complete guide to building your own Discord bot with modern JavaScript, database integration, and deployment strategies.
Welcome to the FumaBot API documentation. Here you'll find details on authentication, endpoints, request/response examples, and error handling.
Base URL
https://api.fumabot.devQuickstart
- Obtain Your Bot Token from the Discord Developer Portal.
- Set the
Authorizationheader on each request:Authorization: Bot YOUR_BOT_TOKEN - Send requests to the Base URL endpoints.
Authentication
All endpoints require the Authorization header with your bot token.
| Header | Value |
|---|---|
| Authorization | Bot YOUR_BOT_TOKEN |
Endpoints
List Commands
- Endpoint:
GET /api/commands - Description: Returns a list of all available commands.
Request:
GET /api/commands HTTP/1.1
Host: api.fumabot.dev
Authorization: Bot YOUR_BOT_TOKENResponse (200 OK):
{
"commands": [
{
"name": "ping",
"description": "Check bot latency",
"cooldown": 5
},
{
"name": "avatar",
"description": "Fetch user avatar",
"cooldown": 3
}
]
}Execute Command
- Endpoint:
POST /api/commands/{command} - Description: Executes a specific command by name.
Path Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| command | string | Yes | Command name (e.g. "ping") |
Request:
POST /api/commands/ping HTTP/1.1
Host: api.fumabot.dev
Authorization: Bot YOUR_BOT_TOKEN
Content-Type: application/json
{
"params": {}
}Response (200 OK):
{
"status": "success",
"data": {
"latency": 42
}
}Get Command Details
- Endpoint:
GET /api/commands/{command} - Description: Retrieve detailed information about a specific command.
Path Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| command | string | Yes | Command identifier (e.g. "avatar") |
Request:
GET /api/commands/avatar HTTP/1.1
Host: api.fumabot.dev
Authorization: Bot YOUR_BOT_TOKENResponse (200 OK):
{
"name": "avatar",
"description": "Fetch user avatar in high resolution",
"options": [
{
"name": "user",
"type": "mention",
"required": false,
"description": "Discord user to fetch avatar for"
}
],
"cooldown": 3
}Create Webhook Subscription
- Endpoint:
POST /api/webhooks/events - Description: Subscribe your endpoint to Discord events.
Request Body:
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | Your webhook endpoint |
| events | array | Yes | List of Discord event types to subscribe |
Request:
POST /api/webhooks/events HTTP/1.1
Host: api.fumabot.dev
Authorization: Bot YOUR_BOT_TOKEN
Content-Type: application/json
{
"url": "https://example.com/webhook",
"events": ["MESSAGE_CREATE", "GUILD_MEMBER_ADD"]
}Response (201 Created):
{
"id": "wh_123456",
"url": "https://example.com/webhook",
"events": ["MESSAGE_CREATE", "GUILD_MEMBER_ADD"],
"created_at": "2025-07-11T12:00:00Z"
}Delete Webhook Subscription
- Endpoint:
DELETE /api/webhooks/events/{id} - Description: Remove an existing webhook subscription.
Path Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Webhook subscription ID |
Request:
DELETE /api/webhooks/events/wh_123456 HTTP/1.1
Host: api.fumabot.dev
Authorization: Bot YOUR_BOT_TOKENResponse (204 No Content): No response body.
Error Handling
Errors use standard HTTP status codes with a JSON body.
Response Body:
{
"error": "BadRequest",
"message": "Detailed error message"
}| Status Code | Error Type | Description |
|---|---|---|
| 400 | BadRequest | Missing or invalid parameters |
| 401 | Unauthorized | Invalid or missing authentication |
| 404 | NotFound | Resource not found |
| 429 | RateLimit | Too many requests |
| 500 | ServerError | Internal server error |
Rate Limiting
All endpoints are rate-limited to 50 requests per minute. Exceeding this limit returns a 429 status code.
Thank you for using FumaBot! For support, join our Discord server.