REST API v1 · Developers · API reference
Ban appeals API reference
All 4 Ban appeals 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}/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 |
Besides its own errors below, every endpoint can return these common ones:
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.
Needs this feature enabled on the server: Ban appeals
| Name | In | Type | Required | Description |
|---|---|---|---|---|
guildId | path | string | Yes | Your server’s ID · Discord ID (string) |
status | query | string | No | One of open, question, approved, rejected, closed, all · Default "open" |
userId | query | string | No | Only this user’s appeals Discord ID (string) |
limit | query | integer | No | 1–100 · Default 25 |
before | query | integer | No | 1–999,999,999 |
Response
| Field | Type | Required | Description |
|---|---|---|---|
items | array of object | Yes | |
items[].number | integer | Yes | |
items[].userId | string | Yes | |
items[].userTag | string | null | Yes | |
items[].status | string | Yes | One of open, question, approved, rejected, closed |
items[].banCaseNumber | integer | null | Yes | |
items[].claimedBy | string | null | Yes | |
items[].decidedBy | string | null | Yes | null = system / API |
items[].decidedAt | string | null | Yes | ISO 8601 date-time |
items[].reason | string | null | Yes | |
items[].createdAt | string | null | Yes | ISO 8601 date-time |
items[].lastActivityAt | string | null | Yes | ISO 8601 date-time |
nextCursor | string | null | Yes |
{
"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"
}Examples
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)Errors
| 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.
Needs this feature enabled on the server: Ban appeals
| Name | In | Type | Required | Description |
|---|---|---|---|---|
guildId | path | string | Yes | Your server’s ID · Discord ID (string) |
number | path | string | Yes |
Response
| Field | Type | Required | Description |
|---|---|---|---|
number | integer | Yes | |
userId | string | Yes | |
userTag | string | null | Yes | |
status | string | Yes | One of open, question, approved, rejected, closed |
banCaseNumber | integer | null | Yes | |
claimedBy | string | null | Yes | |
decidedBy | string | null | Yes | null = system / API |
decidedAt | string | null | Yes | ISO 8601 date-time |
reason | string | null | Yes | |
createdAt | string | null | Yes | ISO 8601 date-time |
lastActivityAt | string | null | Yes | ISO 8601 date-time |
banReason | string | null | Yes | |
answers | array of object | Yes | |
answers[].id | string | Yes | |
answers[].type | string | Yes | |
answers[].label | string | Yes | |
answers[].value | any | Yes | |
messages | array of object | Yes | The conversation the appellant sees (staff questions + replies). Internal notes are never included. |
messages[].author | string | Yes | One of user, staff |
messages[].authorId | string | null | Yes | |
messages[].text | string | Yes | |
messages[].createdAt | string | null | Yes | ISO 8601 date-time |
applying | boolean | Yes | A console/API decision is still being applied in Discord |
failedAction | object | null | Yes | |
failedAction.type | string | Yes | |
failedAction.error | string | null | Yes |
{
"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"
}
}Examples
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)Errors
| 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.
Needs this feature enabled on the server: Ban appeals
| Name | In | Type | Required | Description |
|---|---|---|---|---|
guildId | path | string | Yes | Your server’s ID · Discord ID (string) |
number | path | string | Yes | |
Idempotency-Key | header | string | No | Optional. Send a unique value (a UUID) and reuse it when you retry: the change happens only once. How it works |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | null | No | Sent to the appellant (DM / appeal page) up to 1,000 characters |
Response
| Field | Type | Required | Description |
|---|---|---|---|
number | integer | Yes | |
userId | string | Yes | |
userTag | string | null | Yes | |
status | string | Yes | One of open, question, approved, rejected, closed |
banCaseNumber | integer | null | Yes | |
claimedBy | string | null | Yes | |
decidedBy | string | null | Yes | null = system / API |
decidedAt | string | null | Yes | ISO 8601 date-time |
reason | string | null | Yes | |
createdAt | string | null | Yes | ISO 8601 date-time |
lastActivityAt | string | null | Yes | ISO 8601 date-time |
banReason | string | null | Yes | |
answers | array of object | Yes | |
answers[].id | string | Yes | |
answers[].type | string | Yes | |
answers[].label | string | Yes | |
answers[].value | any | Yes | |
messages | array of object | Yes | The conversation the appellant sees (staff questions + replies). Internal notes are never included. |
messages[].author | string | Yes | One of user, staff |
messages[].authorId | string | null | Yes | |
messages[].text | string | Yes | |
messages[].createdAt | string | null | Yes | ISO 8601 date-time |
applying | boolean | Yes | A console/API decision is still being applied in Discord |
failedAction | object | null | Yes | |
failedAction.type | string | Yes | |
failedAction.error | string | null | Yes |
{
"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"
}
}Examples
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)Errors
| 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.
Needs this feature enabled on the server: Ban appeals
| Name | In | Type | Required | Description |
|---|---|---|---|---|
guildId | path | string | Yes | Your server’s ID · Discord ID (string) |
number | path | string | Yes | |
Idempotency-Key | header | string | No | Optional. Send a unique value (a UUID) and reuse it when you retry: the change happens only once. How it works |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | null | No | Sent to the appellant (DM / appeal page) up to 1,000 characters |
Response
| Field | Type | Required | Description |
|---|---|---|---|
number | integer | Yes | |
userId | string | Yes | |
userTag | string | null | Yes | |
status | string | Yes | One of open, question, approved, rejected, closed |
banCaseNumber | integer | null | Yes | |
claimedBy | string | null | Yes | |
decidedBy | string | null | Yes | null = system / API |
decidedAt | string | null | Yes | ISO 8601 date-time |
reason | string | null | Yes | |
createdAt | string | null | Yes | ISO 8601 date-time |
lastActivityAt | string | null | Yes | ISO 8601 date-time |
banReason | string | null | Yes | |
answers | array of object | Yes | |
answers[].id | string | Yes | |
answers[].type | string | Yes | |
answers[].label | string | Yes | |
answers[].value | any | Yes | |
messages | array of object | Yes | The conversation the appellant sees (staff questions + replies). Internal notes are never included. |
messages[].author | string | Yes | One of user, staff |
messages[].authorId | string | null | Yes | |
messages[].text | string | Yes | |
messages[].createdAt | string | null | Yes | ISO 8601 date-time |
applying | boolean | Yes | A console/API decision is still being applied in Discord |
failedAction | object | null | Yes | |
failedAction.type | string | Yes | |
failedAction.error | string | null | Yes |
{
"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"
}
}Examples
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)Errors
| 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 |