melonly logomelonly logo
melonly logo
Dashboard
Log in

Create a Log

Creates a log as createdBy, who needs permission to create that type of log. If your server requires staff to be on shift to log, they need to be on shift too.

POST

/api/v1/server/logs

Request

curl -X POST "https://api.melonly.com/api/v1/server/logs" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "createdBy": "7264722635089514496",
  "text": "vdm at gas station (again)",
  "type": 0,
  "username": "Builderman"
}'

Response

201

Created

{
  "data": {
    "banBoloCreated": false,
    "createdAt": 1794776859830,
    "createdBy": "7264722635089514496",
    "dmDisabled": false,
    "dontCount": false,
    "editedBy": [],
    "expired": false,
    "id": "7527833441069436928",
    "proof": [],
    "robloxId": "156",
    "serverId": "7294057520392310784",
    "text": "vdm at gas station (again)",
    "type": 0,
    "username": "Builderman"
  }
}

The player's Roblox ID is looked up from their username. A ban also completes the player's active ban BOLO.

To make a ban temporary, send type: 2, tempBan: true and an unbanAt up to a year away:

{ "type": 2, "username": "Builderman", "text": "flew a tractor (with exploits)", "createdBy": "7264722635089514496", "tempBan": true, "unbanAt": 1795381659830 }

Authorization

Authorizationstringrequired
Your API token as Bearer YOUR_TOKEN. Create one in your server's dashboard settings.

Body

createdBystringrequired
Member ID of the staff member creating the log.
textstringrequired
Reason, up to 2048 characters.
typeintegerrequired
Log type: 0 Warning, 1 Kick, 2 Ban, 3 Ban BOLO, 4 Note or 5 Custom. Your custom types are listed by List Log Types.
usernamestringrequired
Roblox username of the player, 3-20 letters, numbers or underscores.
descriptionstring | null
Extra details, up to 2048 characters. Needs premium.
dontCountboolean
Leave the log out of punishment counts.
resetPunishmentsCountboolean
Reset the player's punishment count. Notes only.
tempBanboolean
Make a ban temporary. Needs unbanAt.
typeIdstring | null
Custom log type ID. Required when type is 5.
unbanAtinteger | null
When a temporary ban ends, up to a year away.

Response

201 Created

createdAtintegerrequired
When it was created.
createdBystringrequired
Member ID of the staff member who created it, or SYSTEM.
editedBystring[]required
Member IDs of everyone who edited it.
idstringrequired
Unique ID.
proofstring[]required
Proof file keys.
serverIdstringrequired
Server ID.
textstringrequired
Reason.
typeintegerrequired
Log type: 0 Warning, 1 Kick, 2 Ban, 3 Ban BOLO, 4 Note or 5 Custom.
usernamestringrequired
Roblox username of the player.
banBoloCreatedbooleanrequired
Whether this log pushed the player over the automatic ban BOLO threshold.
dmDisabledbooleanrequired
Whether the player turned off moderation DMs.
completedBystring | null
For ban BOLOs, member ID of who completed it.
deniedBystring | null
For ban BOLOs, member ID of who denied it.
descriptionstring | null
Extra details.
dontCountboolean | null
Whether it's left out of punishment counts.
expiredboolean | null
Whether it has expired.
expiredAtinteger | null
When it expired.
expiredBystring | null
Member ID of who expired it.
hiddenboolean | null
Whether it's hidden from the player.
hiddenBystring | null
Member ID of who hid it.
robloxIdstring | null
Roblox user ID of the player.
tempBanboolean | null
Whether the ban is temporary.
typeIdstring | null
Custom log type ID, when type is 5.
unbanAtinteger | null
When a temporary ban ends.

Errors

StatusMeaning
400Invalid request. validation_failed lists each invalid field in details.fields.
401Missing, invalid or expired token
403Premium is required, or createdBy lacks permission
429Rate limited. See Retry-After and details.
500Internal server error
502next did not confirm the write. Check whether it applied before retrying.
503Write endpoints are not configured on this deployment