REST API v1 · Entwickler · API-Referenz
Bann-Einsprüche-API-Referenz
Alle 4 Bann-Einsprüche-Endpunkte der BotGG-REST-API v1: Scopes, Parameter, Felder, Fehler und sofort ausführbare Beispiele in curl, JavaScript und Python.
Entwicklerdokumentation
Auf dieser Seite
Endpunkte
Pfade sind relativ zu https://console.botgg.app/api/v1. Sende deinen API-Schlüssel als Authorization: Bearer botgg_…; IDs sind Strings.
| Endpunkt | Scope | Beschreibung |
|---|---|---|
GET/guilds/{guildId}/appeals | appeals:read | List ban appeals |
GET/guilds/{guildId}/appeals/{number} | appeals:read | Get a ban appeal |
POST/guilds/{guildId}/appeals/{number}/approve | appeals:write | Approve a ban appeal (unban) |
POST/guilds/{guildId}/appeals/{number}/reject | appeals:write | Reject a ban appeal |
Neben den unten genannten eigenen Fehlern kann jeder Endpunkt diese allgemeinen zurückgeben:
List ban appeals
GET/guilds/{guildId}/appeals
Newest first. status=open (default) = open + waiting for the user’s answer; all = every status. Pass before=<nextCursor> for the next page.
Dieses Feature muss auf dem Server aktiviert sein: Bann-Einsprüche
| Name | In | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
guildId | Pfad | string | Ja | Die ID deines Servers · Discord-ID (String) |
status | Query | string | Nein | Eines von open, question, approved, rejected, closed, all · Standard "open" |
userId | Query | string | Nein | Only this user’s appeals Discord-ID (String) |
limit | Query | integer | Nein | 1–100 · Standard 25 |
before | Query | integer | Nein | 1–999.999.999 |
Antwort
| Feld | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
items | array of object | Ja | |
items[].number | integer | Ja | |
items[].userId | string | Ja | |
items[].userTag | string | null | Ja | |
items[].status | string | Ja | Eines von open, question, approved, rejected, closed |
items[].banCaseNumber | integer | null | Ja | |
items[].claimedBy | string | null | Ja | |
items[].decidedBy | string | null | Ja | null = system / API |
items[].decidedAt | string | null | Ja | ISO 8601 date-time |
items[].reason | string | null | Ja | |
items[].createdAt | string | null | Ja | ISO 8601 date-time |
items[].lastActivityAt | string | null | Ja | ISO 8601 date-time |
nextCursor | string | null | Ja |
{
"items": [
{
"number": 7,
"userId": "876543210987654321",
"userTag": "example",
"status": "open",
"banCaseNumber": 10,
"claimedBy": "example",
"decidedBy": "example",
"decidedAt": "2026-10-07T12:00:00.000Z",
"reason": "Tournament prize",
"createdAt": "2026-10-07T12:00:00.000Z",
"lastActivityAt": "2026-10-07T12:00:00.000Z"
}
],
"nextCursor": "98700"
}Beispiele
curl -s "https://console.botgg.app/api/v1/guilds/123456789012345678/appeals?status=open&limit=25" \
-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/appeals?status=open&limit=25', {
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/appeals",
headers={
"Authorization": f"Bearer {os.environ['BOTGG_API_KEY']}",
},
params={
"status": "open",
"limit": 25,
},
timeout=10,
)
data = res.json()
if not res.ok:
raise RuntimeError(f"{res.status_code} {data['error']}: {data['message']}")
print(data)Fehler
| HTTP | Codes |
|---|---|
| 409 | FEATURE_DISABLED |
| 503 | SERVICE_UNAVAILABLE |
Get a ban appeal
GET/guilds/{guildId}/appeals/{number}
With the answers, the ban reason and the conversation the appellant sees. Internal staff notes are never returned.
Dieses Feature muss auf dem Server aktiviert sein: Bann-Einsprüche
| Name | In | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
guildId | Pfad | string | Ja | Die ID deines Servers · Discord-ID (String) |
number | Pfad | string | Ja |
Antwort
| Feld | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
number | integer | Ja | |
userId | string | Ja | |
userTag | string | null | Ja | |
status | string | Ja | Eines von open, question, approved, rejected, closed |
banCaseNumber | integer | null | Ja | |
claimedBy | string | null | Ja | |
decidedBy | string | null | Ja | null = system / API |
decidedAt | string | null | Ja | ISO 8601 date-time |
reason | string | null | Ja | |
createdAt | string | null | Ja | ISO 8601 date-time |
lastActivityAt | string | null | Ja | ISO 8601 date-time |
banReason | string | null | Ja | |
answers | array of object | Ja | |
answers[].id | string | Ja | |
answers[].type | string | Ja | |
answers[].label | string | Ja | |
answers[].value | any | Ja | |
messages | array of object | Ja | The conversation the appellant sees (staff questions + replies). Internal notes are never included. |
messages[].author | string | Ja | Eines von user, staff |
messages[].authorId | string | null | Ja | |
messages[].text | string | Ja | |
messages[].createdAt | string | null | Ja | ISO 8601 date-time |
applying | boolean | Ja | A console/API decision is still being applied in Discord |
failedAction | object | null | Ja | |
failedAction.type | string | Ja | |
failedAction.error | string | null | Ja |
{
"number": 7,
"userId": "876543210987654321",
"userTag": "example",
"status": "open",
"banCaseNumber": 10,
"claimedBy": "example",
"decidedBy": "example",
"decidedAt": "2026-10-07T12:00:00.000Z",
"reason": "Tournament prize",
"createdAt": "2026-10-07T12:00:00.000Z",
"lastActivityAt": "2026-10-07T12:00:00.000Z",
"banReason": "example",
"answers": [
{
"id": "example",
"type": "example",
"label": "Example",
"value": null
}
],
"messages": [
{
"author": "user",
"authorId": "234567890123456789",
"text": "Example answer",
"createdAt": "2026-10-07T12:00:00.000Z"
}
],
"applying": true,
"failedAction": {
"type": "example",
"error": "example"
}
}Beispiele
curl -s "https://console.botgg.app/api/v1/guilds/123456789012345678/appeals/234567890123456789" \
-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/appeals/234567890123456789', {
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/appeals/234567890123456789",
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)Fehler
| HTTP | Codes |
|---|---|
| 404 | APPEAL_NOT_FOUND |
| 409 | FEATURE_DISABLED |
| 503 | SERVICE_UNAVAILABLE |
Approve a ban appeal (unban)
POST/guilds/{guildId}/appeals/{number}/approve
Same as Approve in the console: the bot unbans within a few seconds (an unban moderation case when Moderation is enabled), creates a single-use invite and DMs the user per the appeal settings. Written to the audit log.
Dieses Feature muss auf dem Server aktiviert sein: Bann-Einsprüche
| Name | In | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
guildId | Pfad | string | Ja | Die ID deines Servers · Discord-ID (String) |
number | Pfad | string | Ja | |
Idempotency-Key | Header | string | Nein | Optional. Sende einen eindeutigen Wert (eine UUID) und verwende ihn bei einem erneuten Versuch wieder: Die Änderung erfolgt nur einmal. So funktioniert’s |
Request-Body
| Feld | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
reason | string | null | Nein | Sent to the appellant (DM / appeal page) bis zu 1.000 Zeichen |
Antwort
| Feld | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
number | integer | Ja | |
userId | string | Ja | |
userTag | string | null | Ja | |
status | string | Ja | Eines von open, question, approved, rejected, closed |
banCaseNumber | integer | null | Ja | |
claimedBy | string | null | Ja | |
decidedBy | string | null | Ja | null = system / API |
decidedAt | string | null | Ja | ISO 8601 date-time |
reason | string | null | Ja | |
createdAt | string | null | Ja | ISO 8601 date-time |
lastActivityAt | string | null | Ja | ISO 8601 date-time |
banReason | string | null | Ja | |
answers | array of object | Ja | |
answers[].id | string | Ja | |
answers[].type | string | Ja | |
answers[].label | string | Ja | |
answers[].value | any | Ja | |
messages | array of object | Ja | The conversation the appellant sees (staff questions + replies). Internal notes are never included. |
messages[].author | string | Ja | Eines von user, staff |
messages[].authorId | string | null | Ja | |
messages[].text | string | Ja | |
messages[].createdAt | string | null | Ja | ISO 8601 date-time |
applying | boolean | Ja | A console/API decision is still being applied in Discord |
failedAction | object | null | Ja | |
failedAction.type | string | Ja | |
failedAction.error | string | null | Ja |
{
"number": 7,
"userId": "876543210987654321",
"userTag": "example",
"status": "open",
"banCaseNumber": 10,
"claimedBy": "example",
"decidedBy": "example",
"decidedAt": "2026-10-07T12:00:00.000Z",
"reason": "Tournament prize",
"createdAt": "2026-10-07T12:00:00.000Z",
"lastActivityAt": "2026-10-07T12:00:00.000Z",
"banReason": "example",
"answers": [
{
"id": "example",
"type": "example",
"label": "Example",
"value": null
}
],
"messages": [
{
"author": "user",
"authorId": "234567890123456789",
"text": "Example answer",
"createdAt": "2026-10-07T12:00:00.000Z"
}
],
"applying": true,
"failedAction": {
"type": "example",
"error": "example"
}
}Beispiele
curl -s -X POST "https://console.botgg.app/api/v1/guilds/123456789012345678/appeals/234567890123456789/approve" \
-H "Authorization: Bearer $BOTGG_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"reason":"Tournament prize"}'// 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/appeals/234567890123456789/approve', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.BOTGG_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(), // reuse it when you retry this request
},
body: JSON.stringify({
reason: 'Tournament prize',
}),
});
const data = await res.json();
if (!res.ok) throw new Error(`${res.status} ${data.error}: ${data.message}`);
console.log(data);import os, uuid
import requests
res = requests.post(
"https://console.botgg.app/api/v1/guilds/123456789012345678/appeals/234567890123456789/approve",
headers={
"Authorization": f"Bearer {os.environ['BOTGG_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()), # reuse it when you retry this request
},
json={
"reason": "Tournament prize",
},
timeout=10,
)
data = res.json()
if not res.ok:
raise RuntimeError(f"{res.status_code} {data['error']}: {data['message']}")
print(data)Fehler
| HTTP | Codes |
|---|---|
| 400 | INVALID_JSON |
| 403 | SELF_DECISION |
| 404 | APPEAL_NOT_FOUND |
| 409 | FEATURE_DISABLED, ALREADY_DECIDED |
| 413 | PAYLOAD_TOO_LARGE |
| 415 | UNSUPPORTED_MEDIA_TYPE |
| 422 | IDEMPOTENCY_KEY_REUSED |
| 503 | SERVICE_UNAVAILABLE |
Reject a ban appeal
POST/guilds/{guildId}/appeals/{number}/reject
Same as Reject in the console: the user gets the rejection DM per the appeal settings and the re-appeal cooldown starts. Written to the audit log.
Dieses Feature muss auf dem Server aktiviert sein: Bann-Einsprüche
| Name | In | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
guildId | Pfad | string | Ja | Die ID deines Servers · Discord-ID (String) |
number | Pfad | string | Ja | |
Idempotency-Key | Header | string | Nein | Optional. Sende einen eindeutigen Wert (eine UUID) und verwende ihn bei einem erneuten Versuch wieder: Die Änderung erfolgt nur einmal. So funktioniert’s |
Request-Body
| Feld | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
reason | string | null | Nein | Sent to the appellant (DM / appeal page) bis zu 1.000 Zeichen |
Antwort
| Feld | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
number | integer | Ja | |
userId | string | Ja | |
userTag | string | null | Ja | |
status | string | Ja | Eines von open, question, approved, rejected, closed |
banCaseNumber | integer | null | Ja | |
claimedBy | string | null | Ja | |
decidedBy | string | null | Ja | null = system / API |
decidedAt | string | null | Ja | ISO 8601 date-time |
reason | string | null | Ja | |
createdAt | string | null | Ja | ISO 8601 date-time |
lastActivityAt | string | null | Ja | ISO 8601 date-time |
banReason | string | null | Ja | |
answers | array of object | Ja | |
answers[].id | string | Ja | |
answers[].type | string | Ja | |
answers[].label | string | Ja | |
answers[].value | any | Ja | |
messages | array of object | Ja | The conversation the appellant sees (staff questions + replies). Internal notes are never included. |
messages[].author | string | Ja | Eines von user, staff |
messages[].authorId | string | null | Ja | |
messages[].text | string | Ja | |
messages[].createdAt | string | null | Ja | ISO 8601 date-time |
applying | boolean | Ja | A console/API decision is still being applied in Discord |
failedAction | object | null | Ja | |
failedAction.type | string | Ja | |
failedAction.error | string | null | Ja |
{
"number": 7,
"userId": "876543210987654321",
"userTag": "example",
"status": "open",
"banCaseNumber": 10,
"claimedBy": "example",
"decidedBy": "example",
"decidedAt": "2026-10-07T12:00:00.000Z",
"reason": "Tournament prize",
"createdAt": "2026-10-07T12:00:00.000Z",
"lastActivityAt": "2026-10-07T12:00:00.000Z",
"banReason": "example",
"answers": [
{
"id": "example",
"type": "example",
"label": "Example",
"value": null
}
],
"messages": [
{
"author": "user",
"authorId": "234567890123456789",
"text": "Example answer",
"createdAt": "2026-10-07T12:00:00.000Z"
}
],
"applying": true,
"failedAction": {
"type": "example",
"error": "example"
}
}Beispiele
curl -s -X POST "https://console.botgg.app/api/v1/guilds/123456789012345678/appeals/234567890123456789/reject" \
-H "Authorization: Bearer $BOTGG_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"reason":"Tournament prize"}'// 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/appeals/234567890123456789/reject', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.BOTGG_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(), // reuse it when you retry this request
},
body: JSON.stringify({
reason: 'Tournament prize',
}),
});
const data = await res.json();
if (!res.ok) throw new Error(`${res.status} ${data.error}: ${data.message}`);
console.log(data);import os, uuid
import requests
res = requests.post(
"https://console.botgg.app/api/v1/guilds/123456789012345678/appeals/234567890123456789/reject",
headers={
"Authorization": f"Bearer {os.environ['BOTGG_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()), # reuse it when you retry this request
},
json={
"reason": "Tournament prize",
},
timeout=10,
)
data = res.json()
if not res.ok:
raise RuntimeError(f"{res.status_code} {data['error']}: {data['message']}")
print(data)Fehler
| HTTP | Codes |
|---|---|
| 400 | INVALID_JSON |
| 403 | SELF_DECISION |
| 404 | APPEAL_NOT_FOUND |
| 409 | FEATURE_DISABLED, ALREADY_DECIDED |
| 413 | PAYLOAD_TOO_LARGE |
| 415 | UNSUPPORTED_MEDIA_TYPE |
| 422 | IDEMPOTENCY_KEY_REUSED |
| 503 | SERVICE_UNAVAILABLE |