Bans API

Advanced and powerful global ban list API

Add a Ban

POST https://api.ksoft.si/bans/add

This endpoint allows you to add bans to the list. If you don't have BAN_MANAGER permission your ban will be automatically converted to a ban report and we will take a look and act accordingly.

Headers

NameTypeDescription

Authorization

string

Authentication token

Request Body

NameTypeDescription

user

number

Users Discord ID that you are banning/reporting

mod

number

Users Discord ID who posted/reported the ban

user_name

string

Users Discord username

user_discriminator

number

Users Discord discriminator

reason

string

Reason why user should be globally banned

proof

string

URL of the image showing the act

appeal_possible

boolean

If appeal should be disabled for that user.

{"success": true}

Get ban info

GET https://api.ksoft.si/bans/info

Get more information about a ban

Query Parameters

NameTypeDescription

user

number

Users Discord ID who's ban you'd like to check

Headers

NameTypeDescription

Authorization

string

Authentication token

{
    "id": "555393235682459669",
    "name": "Phantom",
    "discriminator": "9222",
    "moderator_id": "286509757546758156",
    "reason": "DM Ads",
    "proof": "https://i.imgur.com/kgMaK4I.png",
    "is_ban_active": true,
    "can_be_appealed": true,
    "timestamp": "2020-02-11T08:30:52.640887",
    "appeal_reason": null,
    "appeal_date": null,
    "requested_by": "286509757546758156",
    "exists": true
}

Check user

GET https://api.ksoft.si/bans/check

Simple way to check if the user is banned

Query Parameters

NameTypeDescription

user

number

Users Discord ID that you'd like to check

Headers

NameTypeDescription

Authorization

string

Authentication token

{
    "is_banned": true
}

Delete ban

DELETE https://api.ksoft.si/bans/delete

Delete a ban, only users with BAN_MANAGER permission can use this.

Query Parameters

NameTypeDescription

user

number

Users Discord ID

force

boolean

Default: false, if true it deletes the entry from the database instead of deactivating

Headers

NameTypeDescription

Authorization

string

Authentication token

{"done": true}

List of bans

GET https://api.ksoft.si/bans/list

Pagination of bans, you can request up to 1000 records per page, default is 20.

Query Parameters

NameTypeDescription

page

integer

Page number (default: 1)

per_page

integer

Number of bans per page (default: 20)

Headers

NameTypeDescription

Authorization

string

Authentication token

{
    "ban_count": 1592,
    "page_count": 531,
    "per_page": 3,
    "page": 1,
    "on_page": 3,
    "next_page": 2,
    "previous_page": null,
    "data": [
        {
            "id": "555393235682459669",
            "name": "Phantom",
            "discriminator": "9222",
            "moderator_id": "286509757546758156",
            "reason": "DM Ads",
            "proof": "https://i.imgur.com/kgMaK4I.png",
            "is_ban_active": true,
            "can_be_appealed": true,
            "timestamp": "2020-02-11T08:30:52.640887",
            "appeal_reason": null,
            "appeal_date": null
        },
        {
            "id": "661958388942503938",
            "name": "VPParrot",
            "discriminator": "2708",
            "moderator_id": "223456683337318402",
            "reason": "unsolicited dm ads",
            "proof": "https://i.imgur.com/klI6s35.png",
            "is_ban_active": true,
            "can_be_appealed": true,
            "timestamp": "2020-02-10T18:59:58.412203",
            "appeal_reason": null,
            "appeal_date": null
        },
        {
            "id": "578377795151855616",
            "name": "MomHunter",
            "discriminator": "2067",
            "moderator_id": "286509757546758156",
            "reason": "DM ads",
            "proof": "https://i.imgur.com/cXlzCod.jpg",
            "is_ban_active": true,
            "can_be_appealed": true,
            "timestamp": "2020-02-10T21:49:25.164282",
            "appeal_reason": null,
            "appeal_date": null
        }
    ]
}

Ban updates

GET https://api.ksoft.si/bans/updates

Gets updates from the previous update

Query Parameters

NameTypeDescription

timestamp

number

timestamp in seconds from 1.1.1970 (epoch time)

Headers

NameTypeDescription

Authorization

string

Authentication token

{
    "data": [
        {
            "id": 307898291000049684,
            "reason": "DM Advertising",
            "proof": "https://xignotic.is-going-to-rickroll.me/i/Bzx58zHJDuV7Jg.png",
            "moderator_id": 205680187394752512,
            "active": true
        },
        {
            "id": 448253132003344384,
            "reason": "Server Raiding. ",
            "proof": "https://imgur.com/a/S4Eosul",
            "moderator_id": 205680187394752512,
            "active": true
        }
    ],
    "current_timestamp": 1537800258 //store this value for the next update
}

Last updated