REST API v1 · Developers · API reference

Server API reference

All 4 Server endpoints of the BotGG REST API v1: scopes, parameters, fields, errors and ready-to-run curl, JavaScript and Python examples.

Developer docs
On this page

Endpoints

Paths are relative to https://console.botgg.app/api/v1. Send your API key as Authorization: Bearer botgg_…; IDs are strings.

Server endpoints
EndpointScopeDescription
GET/guilds/{guildId}guild:readGet the server
GET/guilds/{guildId}/rolesguild:readList roles
GET/guilds/{guildId}/channelsguild:readList channels
GET/guilds/{guildId}/members/{userId}guild:readGet a member

Besides its own errors below, every endpoint can return these common ones:

Get the server

GET/guilds/{guildId}

Scope: guild:read

Name, icon, approximate member count, the bot’s language and the enabled BotGG features.

Parameters
NameInTypeRequiredDescription
guildIdpathstringYesYour server’s ID · Discord ID (string)

Response

Response fields · 200
FieldTypeRequiredDescription
idstringYes
namestringYes
iconstring | nullYes
iconUrlstring | nullYes
memberCountinteger | nullYesApproximate; null when Discord is unreachable
localestringYesThe bot’s language on this server (en, ru, he)
enabledFeaturesarray of stringYes
Response · 200
{
  "id": "example",
  "name": "Example",
  "icon": "example",
  "iconUrl": "https://example.com",
  "memberCount": 10,
  "locale": "example",
  "enabledFeatures": [
    "example"
  ]
}

Examples

curl
curl -s "https://console.botgg.app/api/v1/guilds/123456789012345678" \
  -H "Authorization: Bearer $BOTGG_API_KEY"
JavaScript (fetch)
// Node.js 18+ (built-in fetch) — on your server, never in a browser
const res = await fetch('https://console.botgg.app/api/v1/guilds/123456789012345678', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.BOTGG_API_KEY}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${res.status} ${data.error}: ${data.message}`);
console.log(data);
Python (requests)
import os
import requests

res = requests.get(
    "https://console.botgg.app/api/v1/guilds/123456789012345678",
    headers={
        "Authorization": f"Bearer {os.environ['BOTGG_API_KEY']}",
    },
    timeout=10,
)
data = res.json()
if not res.ok:
    raise RuntimeError(f"{res.status_code} {data['error']}: {data['message']}")
print(data)

Errors

Only the common errors listed under Endpoints.

List roles

GET/guilds/{guildId}/roles

Scope: guild:read

Highest first (Discord order), without @everyone.

Parameters
NameInTypeRequiredDescription
guildIdpathstringYesYour server’s ID · Discord ID (string)

Response

Response fields · 200
FieldTypeRequiredDescription
itemsarray of objectYes
items[].idstringYes
items[].namestringYes
items[].colorstring | nullYes
items[].positionintegerYes
items[].managedbooleanYes
items[].hoistbooleanYes
items[].mentionablebooleanYes
Response · 200
{
  "items": [
    {
      "id": "example",
      "name": "Example",
      "color": "#18d7ff",
      "position": 10,
      "managed": true,
      "hoist": true,
      "mentionable": true
    }
  ]
}

Examples

curl
curl -s "https://console.botgg.app/api/v1/guilds/123456789012345678/roles" \
  -H "Authorization: Bearer $BOTGG_API_KEY"
JavaScript (fetch)
// Node.js 18+ (built-in fetch) — on your server, never in a browser
const res = await fetch('https://console.botgg.app/api/v1/guilds/123456789012345678/roles', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.BOTGG_API_KEY}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${res.status} ${data.error}: ${data.message}`);
console.log(data);
Python (requests)
import os
import requests

res = requests.get(
    "https://console.botgg.app/api/v1/guilds/123456789012345678/roles",
    headers={
        "Authorization": f"Bearer {os.environ['BOTGG_API_KEY']}",
    },
    timeout=10,
)
data = res.json()
if not res.ok:
    raise RuntimeError(f"{res.status_code} {data['error']}: {data['message']}")
print(data)

Errors

Errors
HTTPCodes
503SERVICE_UNAVAILABLE

List channels

GET/guilds/{guildId}/channels

Scope: guild:read

In Discord’s sidebar order (categories followed by their channels); threads are not included.

Parameters
NameInTypeRequiredDescription
guildIdpathstringYesYour server’s ID · Discord ID (string)

Response

Response fields · 200
FieldTypeRequiredDescription
itemsarray of objectYes
items[].idstringYes
items[].namestringYes
items[].typestringYesOne of text, voice, category, announcement, stage, forum, media, other
items[].parentIdstring | nullYes
items[].positionintegerYes
Response · 200
{
  "items": [
    {
      "id": "example",
      "name": "Example",
      "type": "text",
      "parentId": "234567890123456789",
      "position": 10
    }
  ]
}

Examples

curl
curl -s "https://console.botgg.app/api/v1/guilds/123456789012345678/channels" \
  -H "Authorization: Bearer $BOTGG_API_KEY"
JavaScript (fetch)
// Node.js 18+ (built-in fetch) — on your server, never in a browser
const res = await fetch('https://console.botgg.app/api/v1/guilds/123456789012345678/channels', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.BOTGG_API_KEY}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${res.status} ${data.error}: ${data.message}`);
console.log(data);
Python (requests)
import os
import requests

res = requests.get(
    "https://console.botgg.app/api/v1/guilds/123456789012345678/channels",
    headers={
        "Authorization": f"Bearer {os.environ['BOTGG_API_KEY']}",
    },
    timeout=10,
)
data = res.json()
if not res.ok:
    raise RuntimeError(f"{res.status_code} {data['error']}: {data['message']}")
print(data)

Errors

Errors
HTTPCodes
503SERVICE_UNAVAILABLE

Get a member

GET/guilds/{guildId}/members/{userId}

Scope: guild:read

Basic member info: names, avatar, role ids and join date. Cached for up to 5 minutes.

Parameters
NameInTypeRequiredDescription
guildIdpathstringYesYour server’s ID · Discord ID (string)
userIdpathstringYesThe member’s Discord user ID · Discord ID (string)

Response

Response fields · 200
FieldTypeRequiredDescription
userIdstringYes
usernamestring | nullYes
globalNamestring | nullYes
nicknamestring | nullYes
displayNamestring | nullYes
avatarUrlstring | nullYes
botbooleanYes
rolesarray of stringYesRole ids
joinedAtstring | nullYes
Response · 200
{
  "userId": "876543210987654321",
  "username": "example",
  "globalName": "example",
  "nickname": "example",
  "displayName": "example",
  "avatarUrl": "https://example.com",
  "bot": false,
  "roles": [
    "example"
  ],
  "joinedAt": "2026-10-07T12:00:00.000Z"
}

Examples

curl
curl -s "https://console.botgg.app/api/v1/guilds/123456789012345678/members/876543210987654321" \
  -H "Authorization: Bearer $BOTGG_API_KEY"
JavaScript (fetch)
// Node.js 18+ (built-in fetch) — on your server, never in a browser
const res = await fetch('https://console.botgg.app/api/v1/guilds/123456789012345678/members/876543210987654321', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.BOTGG_API_KEY}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${res.status} ${data.error}: ${data.message}`);
console.log(data);
Python (requests)
import os
import requests

res = requests.get(
    "https://console.botgg.app/api/v1/guilds/123456789012345678/members/876543210987654321",
    headers={
        "Authorization": f"Bearer {os.environ['BOTGG_API_KEY']}",
    },
    timeout=10,
)
data = res.json()
if not res.ok:
    raise RuntimeError(f"{res.status_code} {data['error']}: {data['message']}")
print(data)

Errors

Ready to level up your server?

Add BotGG for free, then switch features on in the web console.