Getting Error Code 500 when calling /moderation/bans API endpoint

This was user error, as I was passing the username and not the numeric id of the user I was trying to ban, after correcting this issue, it works perfectly