API Documentation

Global bans list

Bot owners can easy get globaly baned users from this API and help keep Discord a nice place.

APIAPI URLWebsite
Global banshttps://api.ksoft.si/bans/https://bans.ksoft.si/

Authorization:

Important: If you leave this server, your token will be removed and your access to the api will be temporally blocked. To make a request to this API you'll need to add an Authorization header with this content:

Token replace_this_with_your_token
So it looks like this:

{"Authorization": "Token myawesometoken123456789"}

Ban object - extended

? = Can be set to default or missing. Optional.

NameTypeDescription
idintegerDiscord User ID.
?namestringDiscord username.
?discriminatorstringDiscord discriminator
moderator_idintegerModerators Discord User/Bot ID.
reasonstringReason for the global ban.
proofstringProof for the global ban.
is_ban_activeboolIndicates if the ban is active.
can_be_appealedboolIndicates if the ban can be appealed.
timestampstringDate and time of the ban in ISO format.
appeal_reasonstringReason if the ban was appealed else none.
appeal_datestringAppeal date and time in ISO format.
?requested_bystringID of the user that requested the ban.

JSON Example

{
    "id": 123456789012345678,
    "name": "VeryBadUser",
    "discriminator": "1234",
    "moderator_id": 405349279331254282,
    "reason": "Raid",
    "proof": "https://equalizerbot.xyz/screenshot/xwfpnjof.png",
    "is_ban_active": true,
    "can_be_appealed": true,
    "timestamp": "2018-06-26T19:22:50.217Z",
    "appeal_reason": null,
    "appeal_date": null,
    "requested_by": "315804681152495616"}

Ban object - simple

NameTypeDescription
idintegerDiscord User ID.
reasonstringReason for the global ban.
proofstringProof for the global ban.
moderator_idintegerModerators Discord User/Bot ID.

JSON Example

{
    "id": 406501218567979008,
    "reason": "Doxing, Threatening, Blackmailing",
    "proof": "https://imgur.com/a/Rhmtr4S",
    "moderator_id": 405349279331254282}

Endpoints

Add ban

Method: POST

Endpoint: /add

Adds global ban to the list.

POST parameters:

nametypedescriptionrequireddefault
userintegerDiscord User ID that you are banningX/
modintegerDiscord User ID of the moderator or the botapi user id or bot id
user_namestringDiscord username of the user you are banningUnknown
user_discriminatorstringDiscord discriminator of the user you are banning0000
reasonstringReason for the banNo reason provided.
proofstringProof for the banNo proof provided.
appeal_possibleboolIs apeal possible?true

Returns: success or error message

Example - response

{
    "success": true}

Remove ban

Method: DELETE

Endpoint: /remove

Deactivates or removes the ban from the list.

Query parameters:

nametypedescriptionrequireddefault
userintegerDiscord User ID that you are removingX/
forceboolIf true it deletes the user from the listfalse

Returns: success or error message

Example - response

{
    "done": true}

Check if the user is banned

Method: GET

Endpoint: /check

Checks if the user is on the banned list.

Query parameters:

nametypedescriptionrequireddefault
userintegerDiscord User ID that you want checkedX/

Returns: bool

Example - response

{
    "is_banned": true}

Get information about the ban

Method: GET

Endpoint: /info

Get information about the ban and the user.

Query parameters:

nametypedescriptionrequireddefault
userintegerDiscord User IDX/

Returns: Ban object - extended

Example - response

{
    "id": 123456789012345678,
    "name": "VeryBadUser",
    "discriminator": "1234",
    "moderator_id": 405349279331254282,
    "reason": "Raid",
    "proof": "https://equalizerbot.xyz/screenshot/xwfpnjof.png",
    "is_ban_active": true,
    "can_be_appealed": true,
    "timestamp": "2018-06-26T19:22:50.217Z",
    "appeal_reason": null,
    "appeal_date": null,
    "requested_by": "315804681152495616"}

Get updates from the list

Method: GET

Endpoint: /updates

Gets new bans from the list from the specified point of time.
Endpoint provides all new bans from the specified timestamp >= -> grater or equal

Query parameters:

nametypedescriptionrequireddefault
timestampintegerUNIX timestampX/

Returns: list of Ban objects - simple

Example - response

{
    "data": [
        {
            "id": 398650140929556480,
            "reason": "Underage",
            "proof": "No proof provided.",
            "moderator_id": 349289613593935893
        },
        { ... }
    ],
    "current_timestamp": 1530046242
}

List of all bans \w paginator

Method: GET

Endpoint: /list

Gets list of all bans page by page.

Query parameters:

nametypedescriptionrequireddefault
per_pageintegerHow many records to display per page20
pageintegerWhich page to display1

Returns: Paginator with list of Ban objects - extended

Example - response

{
    "ban_count": 50,
    "page_count": 25,
    "per_page": 2,
    "page": 1,
    "on_page": 2,
    "next_page": 2,
    "previous_page": null,
    "data": [
        {
            "id": 398650140929556480,
            "name": "Unknown",
            "discriminator": "0",
            "moderator_id": 349289613593935893,
            "reason": "Underage",
            "proof": "No proof provided.",
            "is_ban_active": true,
            "can_be_appealed": true,
            "timestamp": "2018-06-26T19:14:00.554Z",
            "appeal_reason": null,
            "appeal_date": null},
        {
            "id": 295223599810478092,
            "name": "Unknown",
            "discriminator": "0",
            "moderator_id": 405349279331254282,
            "reason": "Sending gore pictures and screaming in voice channels",
            "proof": "https://cdn.discordapp.com/attachments/414071519862587402/421978093033357312/nmmmm.PNG",
            "is_ban_active": true,
            "can_be_appealed": true,
            "timestamp": "2018-06-26T19:22:38.135Z",
            "appeal_reason": null,
            "appeal_date": null}
    ]
}

Bulk ban check

Method: GET or POST

Endpoint: /bulkcheck

Checks list of user IDs against the database. This endpoint works in 3 modes:

  1. Default: returns list of Simple Ban objects
  2. Extended: returns list of Extended Ban objects (by setting the more_info parameter)
  3. Easy: returns list of banned user IDs from the posted ones (by setting the banned_only parameter)

Note: When accessing the endpoint via GET request, lookup limit is maxed at 100 IDs, but when using POST request with JSON the limit is 1000 lookups per request.

Query (GET) parameters:

nametypedescriptionrequireddefault
usersstringComma separated list of IDsX (if requesting lookup via GET request)
banned_onlybooleanReturn only banned IDsfalse
more_infobooleanReturn extended ban objectsfalse

Form (POST) data (must be JSON):

nametypedescriptionrequireddefault
userslistlist of IDsX (if requesting lookup via POST request)

Unknown Ban object:

NameTypeDescription
idintegerDiscord User ID.
existsbooleanAlways set to false.
is_ban_activebooleanAlways set to false.

Returns (default): List of Simple Ban objects, unknown/not banned IDs are replaces with Unknown Ban object.
Returns (extended): List of Extended Ban objects, unknown/not banned IDs are replaces with Unknown Ban object.
Returns (easy): List of banned IDs, unknown/not banned IDs are ignored.

Example 1 - request & response

Method: GET
URL: https://api.ksoft.si/bans/bulkcheck?users=123456789123456789,448945842393710622,654987321654987321

Response:

[
    {
        "id": 123456789123456789,
        "is_ban_active": false,
        "exists": false},
    {
        "id": 448945842393710622,
        "reason": "Spamming @everyone and spam attacking the server",
        "proof": "http://prntscr.com/kj8n9q http://prntscr.com/kj8ndj",
        "is_ban_active": true,
        "exists": true},
    {
        "id": 654987321654987321,
        "is_ban_active": false,
        "exists": false}
]

Example 2 - request & response

Method: POST
URL: https://api.ksoft.si/bans/bulkcheck?more_info=yes
Request data in JSON:

{"users": [123456789123456789,448945842393710622,654987321654987321]}

Response:

[
    {
        "id": 123456789123456789,
        "is_ban_active": false,
        "exists": false},
    {
        "id": 448945842393710622,
        "name": "RagZag",
        "discriminator": "2817",
        "moderator_id": 367939542046474240,
        "reason": "Spamming @everyone and spam attacking the server",
        "proof": "http://prntscr.com/kj8n9q http://prntscr.com/kj8ndj",
        "is_ban_active": true,
        "can_be_appealed": true,
        "timestamp": "2018-08-16T08:40:42.399",
        "appeal_reason": null,
        "appeal_date": null,
        "exists": true},
    {
        "id": 654987321654987321,
        "is_ban_active": false,
        "exists": false}
]

Example 3 - request & response

Method: POST
URL: https://api.ksoft.si/bans/bulkcheck?banned_only=yes
Request data in JSON:

{"users": [123456789123456789,448945842393710622,654987321654987321]}

Response:

[
    448945842393710622
]