> ## Documentation Index
> Fetch the complete documentation index at: https://developer-docs.fnlb.net/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Explore FNLB's RESTful endpoints. Learn how to authenticate and consume the API efficiently.

<Warning>
  Looking for the full API Reference? Visit [api-docs.fnlb.net](https://api-docs.fnlb.net/) for our comprehensive interactive documentation.
</Warning>

## 🔗 Base URL

[https://api.fnlb.net/v1](https://api.fnlb.net/v1)

All endpoints are relative to this base URL.

<Info>
  All endpoints require a valid API key provided in the `Authorization` header using your FNLB API token. [Learn more.](/authenticating)
</Info>

***

## **GET /bots**

Returns a list of bots associated with the authenticated user.

<CodeGroup>
  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.fnlb.net/v1/bots', {
    headers: {
      'Authorization': 'YOUR_API_KEY',
      'Content-Type': 'application/json'
    }
  });
  if (!response.ok) throw new Error('Error fetching bots ' + await response.text());

  const bots = await response.json();
  console.log('Bots:', bots);
  ```

  ```python Python theme={null}
  import requests

  headers = {
      'Authorization': 'YOUR_API_KEY',
      'Content-Type': 'application/json'
  }

  resp = requests.get('https://api.fnlb.net/v1/bots', headers=headers)
  if resp.ok:
      print('Bots:', resp.json())
  else:
      print('Error fetching bots:', resp.text)
  ```

  ```bash cURL theme={null}
  curl -X GET https://api.fnlb.net/v1/bots \
    -H "Authorization: YOUR_API_KEY" \
    -H "Content-Type: application/json"
  ```
</CodeGroup>

**Example Response**

```json theme={null}
[
    {
        "parent": "7a85cbd3e019417e8b6fcd4e",
        "nickname": "Bot Lobby 1",
        "email": "botlobby1@gmail.com",
        "id": "78a43c92b18f45c92de74aa2"
    },
    {
        "parent": "7a85cbd3e019417e8b6fcd4e",
        "nickname": "Bot Lobby 2",
        "email": "elitegrindmatch34@gmail.com",
        "id": "78a43c92b18f45c92de74ab8"
    }
]
```

## **GET /categories**

Returns a list of categories associated with the authenticated user.

<CodeGroup>
  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.fnlb.net/v1/categories', {
    headers: {
      'Authorization': 'YOUR_API_KEY',
      'Content-Type': 'application/json'
    }
  });
  if (!response.ok) throw new Error('Error fetching categories ' + await response.text());

  const categories = await response.json();
  console.log('Categories:', categories);
  ```

  ```bash cURL theme={null}
  curl -X GET https://api.fnlb.net/v1/categories \
    -H "Authorization: YOUR_API_KEY"
  ```
</CodeGroup>

***

## **Social & Friends**

Manage your bot's social interactions, including friends and blocked users.

### **GET /bots/:botId/friends**

Returns a list of current friends for a specific bot.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET https://api.fnlb.net/v1/bots/BOT_ID/friends \
    -H "Authorization: YOUR_API_KEY"
  ```
</CodeGroup>

### **GET /bots/:botId/users/blocked**

Returns an array of users currently blocked by the bot.

***

## **Commands**

Programmatically control your bots.

### **POST /bots/:botId/commands/run**

Execute a specific command on a bot (e.g., set outfit, emote).

**Request Body**:

```json theme={null}
{
  "command": "outfit",
  "args": "Renegade Raider",
  "locale": "en"
}
```

<Warning>
  Looking for the full API Reference? Visit [api-docs.fnlb.net](https://api-docs.fnlb.net/) for our comprehensive interactive documentation.
</Warning>
