Get a Department

Gets one department.

GET

/api/v1/server/departments/{departmentId}

Request

curl -X GET "https://api.melonly.com/api/v1/server/departments/{departmentId}" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

200

Success

{
  "data": {
    "activated": true,
    "icon": "https://cdn.melonly.com/icons/sheriff.png",
    "id": "7392336585590575104",
    "name": "Sheriff's Office (2 deputies)",
    "serverId": "7294057520392310784",
    "type": 1
  }
}

Authorization

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

Path parameters

departmentIdstringrequired

Response

200 Success

iconstringrequired
Icon image URL.
idstringrequired
Unique ID.
namestringrequired
Department name.
serverIdstringrequired
Server the department belongs to.
activatedboolean | null
Whether the department is active.
discordGuildIdstring | null
Discord server linked to the department.
joinCodestring | null
Code members use to join.
typeinteger | null
Department type.

Errors

StatusMeaning
400Invalid request. validation_failed lists each invalid field in details.fields.
401Missing, invalid or expired token
404Not found
429Rate limited. See Retry-After and details.
500Internal server error