POST Auth Required /api/v1/log/{category}
Log lets trusted Roblox servers send important events to Kiba. Kiba forwards those events to the configured Discord webhook, and moderation logs can also be stored as user infractions.
This endpoint requires the bearer token. Only call it from server-side code.
Never put the API key in a LocalScript or public module.
Plain English Flow
- Your game detects a server event, validation failure, or moderation action.
- The Roblox ServerScript sends a JSON payload to
/api/v1/log/{category}. - Kiba routes the event to the matching Discord webhook.
- If the category is
moderationand a valid code is included, Kiba stores it with that linked user.
Categories
| Category | Use for | Example |
|---|---|---|
server | Server lifecycle and backend status. | Server booted, shutdown started, datastore warning. |
ingame | Gameplay validation and non-staff events. | Code prompt opened, callback parse failed, suspicious state. |
moderation | Staff or automated enforcement events. | Warning, kick, exploit detection, item removal. |
Endpoint
POST https://api.kiba-is-a.top/api/v1/log/moderation
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Request Body
{
"event_type": "warning",
"roblox_username": "PlayerName",
"roblox_user_id": 12345678,
"description": "Exploit behavior detected by AntiCheat",
"issued_by": "AntiCheat",
"code": "AB12"
}
| Field | Required | Meaning |
|---|---|---|
event_type | Yes | Short event label, such as boot, warning, kick, or callback_error. |
description | Yes | Human-readable explanation of what happened. |
roblox_username | No | Affected player's username, usually player.Name. |
roblox_user_id | No | Affected player's Roblox user ID, usually player.UserId. |
issued_by | No | Source of the event, such as staff name, system name, or script name. |
code | No | Player's 4-character Kiba code. Include this when the event should attach to the linked user. |
Roblox Server Example
Wrap logging in a helper so all scripts send the same shape of event. This example intentionally stays server-side.
local HttpService = game:GetService("HttpService")
local API_KEY = "YOUR_API_KEY"
local LOG_BASE = "https://api.kiba-is-a.top/api/v1/log/"
local function sendKibaLog(category, payload)
local ok, response = pcall(function()
return HttpService:RequestAsync({
Url = LOG_BASE .. category,
Method = "POST",
Headers = {
["Authorization"] = "Bearer " .. API_KEY,
["Content-Type"] = "application/json"
},
Body = HttpService:JSONEncode(payload)
})
end)
if not ok then
warn("Kiba log request failed: " .. tostring(response))
return false
end
if not response.Success then
warn("Kiba log rejected: " .. tostring(response.StatusCode) .. " " .. response.Body)
return false
end
return true
end
local function reportModeration(player, action, description, issuedBy)
sendKibaLog("moderation", {
event_type = action,
roblox_username = player.Name,
roblox_user_id = player.UserId,
description = description,
issued_by = issuedBy or "Server",
code = player:GetAttribute("KibaCode")
})
end
Common Examples
Server boot
sendKibaLog("server", {
event_type = "boot",
description = "Roblox server started",
issued_by = game.JobId
})
In-game validation issue
sendKibaLog("ingame", {
event_type = "callback_parse_error",
description = "Callback response could not be parsed",
issued_by = "PresencePoller"
})
Moderation action
reportModeration(player, "warning", "Exploit behavior detected", "AntiCheat")
Out-of-Game Test
curl -X POST https://api.kiba-is-a.top/api/v1/log/moderation \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"event_type":"warning","roblox_username":"PlayerName","roblox_user_id":12345678,"description":"Exploit behavior detected","issued_by":"AntiCheat","code":"AB12"}'
Success Response
{
"status": "logged",
"category": "moderation"
}
Errors
| HTTP | Cause | Fix |
|---|---|---|
400 | Unknown category or invalid code. | Use server, ingame, or moderation; send 4-character codes only. |
401 | Missing or invalid bearer token. | Check the server-side API key. |
422 | Payload validation failed. | Include event_type and description; keep roblox_user_id positive. |
429 | Rate limit exceeded. | Batch noisy events or slow down repeated reports. |
Rate Limit
POST /log/* allows 30 requests per minute per IP.