> For the complete documentation index, see [llms.txt](https://docs.blacklister.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blacklister.xyz/get-started.md).

# Get Started

{% hint style="info" %}
**Good to know:** We ratelimit requests to our API, and they are limited to 10 requests a second. If you need this increasing, please join our support server. Link: <https://discord.gg/FZxgNrwBS6>
{% endhint %}

## Get your API key

Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.

You can generate an API key from our Dashboard (SOON!) or by doing `/apikey`

## Make your first request

## Check a user's blacklisted status

<mark style="color:blue;">`GET`</mark> `https://api.blacklister.xyz/<userid>`

#### Headers

| Name                                            | Type | Description  |
| ----------------------------------------------- | ---- | ------------ |
| Authorization<mark style="color:red;">\*</mark> |      | Your API key |

{% tabs %}
{% tab title="200 Request successful" %}
If the user is not blacklisted, it will return data in the following format:

```javascript
{
    "blacklisted": false
}
```

If the user is blacklisted, it will return data in the following format:

```
{
    "blacklisted": true, 
    "reason": "Reason for the blacklist", 
    "moderator": "The moderator who blacklisted the user", 
    "date": "The date of the Blacklist (DD/MM/YYYY format)", 
    "evidence": "URL to the evidence"
}
```

{% endtab %}

{% tab title="403: Forbidden Permission denied" %}

```
{ "error":"Unauthorized!" }
```

{% endtab %}
{% endtabs %}

Take a look at how you might call this method using `Axios` or `Requests`

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const axios = require("axios")

await axios.get(`https://api.blacklister.xyz/USERID`, { 
            "headers": { "Authorization":"API key" }
})
.then(async function (response) {
            if (response.data.blacklisted) {
              // User is blacklisted!
            }
            else {
              // User is not blacklisted!
            }
})
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

r = requests.get("https://api.blacklister.xyz/USERID", headers={ "Authorization":"Your API key"})

response = r.json()

if response["blacklisted"]:
    # User is blacklisted!
else:
    # User is not blacklisted!
```

{% endtab %}

{% tab title="C#" %}

```csharp
using System;
using System.Net.Http;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace BigBun
{
    public class Blacklist
    {
        [JsonPropertyName("blacklisted")]
        public bool Blacklisted { get; set; }

        [JsonPropertyName("reason")]
        public string Reason { get; set; }

        [JsonPropertyName("moderator")]
        public string Moderator { get; set; }

        [JsonPropertyName("date")]
        public string Date { get; set; }

        [JsonPropertyName("evidence")]
        public string Evidence { get; set; }

        [JsonPropertyName("source")]
        public string Source { get; set; }
    }

    public static class Program
    {
        public static async Task Main()
        {
            string apiKey = "";
            ulong userId = 710912646433603615;

            HttpClient client = new();

            HttpRequestMessage request = new(HttpMethod.Get, $"https://api.blacklister.xyz/{userId}");
            request.Headers.Add("Authorization", apiKey);
            HttpResponseMessage response = await client.SendAsync(request);

            string json = await response.Content.ReadAsStringAsync();
            Blacklist data = JsonSerializer.Deserialize<Blacklist>(json);

            if (data.Blacklisted)
            {
                Console.WriteLine("User is blacklisted!");
                Console.WriteLine($"Reason: {data.Reason}");
                Console.WriteLine($"Moderator: {data.Moderator}");
                Console.WriteLine($"Date: {data.Date}");
                Console.WriteLine($"Evidence: {data.Evidence}");
                Console.WriteLine($"Source: {data.Source}");
            }
            else
            {
                Console.WriteLine("User isn't blacklisted!");
            }

            Console.ReadKey();
        }
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.blacklister.xyz/get-started.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
