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.
| Endpoint | Scope | Description |
|---|---|---|
GET/guilds/{guildId} | guild:read | Get the server |
GET/guilds/{guildId}/roles | guild:read | List roles |
GET/guilds/{guildId}/channels | guild:read | List channels |
GET/guilds/{guildId}/members/{userId} | guild:read | Get a member |
Besides its own errors below, every endpoint can return these common ones:
Get the server
GET/guilds/{guildId}
Name, icon, approximate member count, the bot’s language and the enabled BotGG features.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
guildId | path | string | Yes | Your server’s ID · Discord ID (string) |
Response
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | Yes | |
icon | string | null | Yes | |
iconUrl | string | null | Yes | |
memberCount | integer | null | Yes | Approximate; null when Discord is unreachable |
locale | string | Yes | The bot’s language on this server (en, ru, he) |
enabledFeatures | array of string | Yes |
{
"id": "example",
"name": "Example",
"icon": "example",
"iconUrl": "https://example.com",
"memberCount": 10,
"locale": "example",
"enabledFeatures": [
"example"
]
}Examples
curl -s "https://console.botgg.app/api/v1/guilds/123456789012345678" \
-H "Authorization: Bearer $BOTGG_API_KEY"// 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);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
Highest first (Discord order), without @everyone.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
guildId | path | string | Yes | Your server’s ID · Discord ID (string) |
Response
| Field | Type | Required | Description |
|---|---|---|---|
items | array of object | Yes | |
items[].id | string | Yes | |
items[].name | string | Yes | |
items[].color | string | null | Yes | |
items[].position | integer | Yes | |
items[].managed | boolean | Yes | |
items[].hoist | boolean | Yes | |
items[].mentionable | boolean | Yes |
{
"items": [
{
"id": "example",
"name": "Example",
"color": "#18d7ff",
"position": 10,
"managed": true,
"hoist": true,
"mentionable": true
}
]
}Examples
curl -s "https://console.botgg.app/api/v1/guilds/123456789012345678/roles" \
-H "Authorization: Bearer $BOTGG_API_KEY"// 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);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
| HTTP | Codes |
|---|---|
| 503 | SERVICE_UNAVAILABLE |
List channels
GET/guilds/{guildId}/channels
In Discord’s sidebar order (categories followed by their channels); threads are not included.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
guildId | path | string | Yes | Your server’s ID · Discord ID (string) |
Response
| Field | Type | Required | Description |
|---|---|---|---|
items | array of object | Yes | |
items[].id | string | Yes | |
items[].name | string | Yes | |
items[].type | string | Yes | One of text, voice, category, announcement, stage, forum, media, other |
items[].parentId | string | null | Yes | |
items[].position | integer | Yes |
{
"items": [
{
"id": "example",
"name": "Example",
"type": "text",
"parentId": "234567890123456789",
"position": 10
}
]
}Examples
curl -s "https://console.botgg.app/api/v1/guilds/123456789012345678/channels" \
-H "Authorization: Bearer $BOTGG_API_KEY"// 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);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
| HTTP | Codes |
|---|---|
| 503 | SERVICE_UNAVAILABLE |
Get a member
GET/guilds/{guildId}/members/{userId}
Basic member info: names, avatar, role ids and join date. Cached for up to 5 minutes.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
guildId | path | string | Yes | Your server’s ID · Discord ID (string) |
userId | path | string | Yes | The member’s Discord user ID · Discord ID (string) |
Response
| Field | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | |
username | string | null | Yes | |
globalName | string | null | Yes | |
nickname | string | null | Yes | |
displayName | string | null | Yes | |
avatarUrl | string | null | Yes | |
bot | boolean | Yes | |
roles | array of string | Yes | Role ids |
joinedAt | string | null | Yes |
{
"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 -s "https://console.botgg.app/api/v1/guilds/123456789012345678/members/876543210987654321" \
-H "Authorization: Bearer $BOTGG_API_KEY"// 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);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
| HTTP | Codes |
|---|---|
| 404 | MEMBER_NOT_FOUND |
| 503 | SERVICE_UNAVAILABLE |