REST API v1 · Entwickler · API-Referenz

Bewerbungen-API-Referenz

Alle 4 Bewerbungen-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.

Bewerbungen-Endpunkte
EndpunktScopeBeschreibung
GET/guilds/{guildId}/applications/formsapplications:readList application forms
GET/guilds/{guildId}/applications/submissionsapplications:readList applications
GET/guilds/{guildId}/applications/submissions/{number}applications:readGet an application
POST/guilds/{guildId}/applications/submissions/{number}/decisionapplications:writeAccept or deny an application

Neben den unten genannten eigenen Fehlern kann jeder Endpunkt diese allgemeinen zurückgeben:

List application forms

GET/guilds/{guildId}/applications/forms

Scope: applications:read

In the console’s order, with their questions and submission counts.

Dieses Feature muss auf dem Server aktiviert sein: Bewerbungen

Parameter
NameInTypErforderlichBeschreibung
guildIdPfadstringJaDie ID deines Servers · Discord-ID (String)

Antwort

Antwortfelder · 200
FeldTypErforderlichBeschreibung
itemsarray of objectJa
items[].idintegerJa
items[].titlestringJa
items[].descriptionstringJa
items[].openbooleanJaThe open toggle (the open window is in opensAt / closesAt)
items[].opensAtstring | nullJaISO 8601 date-time
items[].closesAtstring | nullJaISO 8601 date-time
items[].questionsarray of objectJa
items[].questions[].idstringJa
items[].questions[].typestringJa
items[].questions[].labelstringJa
items[].questions[].requiredbooleanJa
items[].submissionsobjectJa
items[].submissions.totalintegerJa
items[].submissions.openintegerJa
Antwort · 200
{
  "items": [
    {
      "id": 98765,
      "title": "example",
      "description": "example",
      "open": true,
      "opensAt": "2026-10-07T12:00:00.000Z",
      "closesAt": "2026-10-07T12:00:00.000Z",
      "questions": [
        {
          "id": "example",
          "type": "example",
          "label": "Example",
          "required": true
        }
      ],
      "submissions": {
        "total": 10,
        "open": 10
      }
    }
  ]
}

Beispiele

curl
curl -s "https://console.botgg.app/api/v1/guilds/123456789012345678/applications/forms" \
  -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/applications/forms', {
  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/applications/forms",
    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

List applications

GET/guilds/{guildId}/applications/submissions

Scope: applications:read

Newest first, without answers. status=open = pending + interview + hold, decided = accepted + denied. Pass before=<nextCursor> for the next page.

Dieses Feature muss auf dem Server aktiviert sein: Bewerbungen

Parameter
NameInTypErforderlichBeschreibung
guildIdPfadstringJaDie ID deines Servers · Discord-ID (String)
statusQuerystringNeinEines von pending, interview, hold, accepted, denied, withdrawn, open, decided
formIdQueryintegerNeinmindestens 1
userIdQuerystringNeinOnly this applicant
Discord-ID (String)
limitQueryintegerNein1–100 · Standard 25
beforeQueryintegerNein1–999.999.999

Antwort

Antwortfelder · 200
FeldTypErforderlichBeschreibung
itemsarray of objectJa
items[].numberintegerJa
items[].formIdinteger | nullJanull when the form was deleted
items[].formTitlestring | nullJa
items[].userIdstringJa
items[].statusstringJaEines von pending, interview, hold, accepted, denied, withdrawn
items[].votesobjectJa
items[].votes.upintegerJa
items[].votes.downintegerJa
items[].submittedAtstring | nullJaISO 8601 date-time
items[].decidedAtstring | nullJaISO 8601 date-time
items[].decidedBystring | nullJanull = system / API
items[].reasonstring | nullJa
nextCursorstring | nullJa
Antwort · 200
{
  "items": [
    {
      "number": 7,
      "formId": 98765,
      "formTitle": "example",
      "userId": "876543210987654321",
      "status": "pending",
      "votes": {
        "up": 10,
        "down": 10
      },
      "submittedAt": "2026-10-07T12:00:00.000Z",
      "decidedAt": "2026-10-07T12:00:00.000Z",
      "decidedBy": "example",
      "reason": "Tournament prize"
    }
  ],
  "nextCursor": "98700"
}

Beispiele

curl
curl -s "https://console.botgg.app/api/v1/guilds/123456789012345678/applications/submissions?limit=25" \
  -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/applications/submissions?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);
Python (requests)
import os
import requests

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

Fehler

Get an application

GET/guilds/{guildId}/applications/submissions/{number}

Scope: applications:read

With the answers and the applicant snapshot taken at submit time (account age, join date, roles, level).

Dieses Feature muss auf dem Server aktiviert sein: Bewerbungen

Parameter
NameInTypErforderlichBeschreibung
guildIdPfadstringJaDie ID deines Servers · Discord-ID (String)
numberPfadstringJa

Antwort

Antwortfelder · 200
FeldTypErforderlichBeschreibung
numberintegerJa
formIdinteger | nullJanull when the form was deleted
formTitlestring | nullJa
userIdstringJa
statusstringJaEines von pending, interview, hold, accepted, denied, withdrawn
votesobjectJa
votes.upintegerJa
votes.downintegerJa
submittedAtstring | nullJaISO 8601 date-time
decidedAtstring | nullJaISO 8601 date-time
decidedBystring | nullJanull = system / API
reasonstring | nullJa
answersarray of objectJa
answers[].idstringJa
answers[].typestringJa
answers[].labelstringJa
answers[].textstringJa
applicantobjectJa
applicant.accountCreatedAtstring | nullJaISO 8601 date-time
applicant.joinedAtstring | nullJaISO 8601 date-time
applicant.roleIdsarray of stringJa
applicant.levelinteger | nullJa
applyingbooleanJaA console/API decision is still being applied in Discord
failedActionsarray of objectJa
failedActions[].typestringJa
failedActions[].errorstring | nullJa
Antwort · 200
{
  "number": 7,
  "formId": 98765,
  "formTitle": "example",
  "userId": "876543210987654321",
  "status": "pending",
  "votes": {
    "up": 10,
    "down": 10
  },
  "submittedAt": "2026-10-07T12:00:00.000Z",
  "decidedAt": "2026-10-07T12:00:00.000Z",
  "decidedBy": "example",
  "reason": "Tournament prize",
  "answers": [
    {
      "id": "example",
      "type": "example",
      "label": "Example",
      "text": "Example answer"
    }
  ],
  "applicant": {
    "accountCreatedAt": "2026-10-07T12:00:00.000Z",
    "joinedAt": "2026-10-07T12:00:00.000Z",
    "roleIds": [
      "234567890123456789"
    ],
    "level": 5
  },
  "applying": true,
  "failedActions": [
    {
      "type": "example",
      "error": "example"
    }
  ]
}

Beispiele

curl
curl -s "https://console.botgg.app/api/v1/guilds/123456789012345678/applications/submissions/234567890123456789" \
  -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/applications/submissions/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);
Python (requests)
import os
import requests

res = requests.get(
    "https://console.botgg.app/api/v1/guilds/123456789012345678/applications/submissions/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

Accept or deny an application

POST/guilds/{guildId}/applications/submissions/{number}/decision

Scope: applications:writeIdempotency-Key

Same as Accept / Deny in the console: decided now (status, reason, reapply cooldown after a denial), then the bot gives / removes the form’s roles, DMs the applicant, announces and updates the review within a few seconds (applying). Written to the audit log.

Dieses Feature muss auf dem Server aktiviert sein: Bewerbungen

Parameter
NameInTypErforderlichBeschreibung
guildIdPfadstringJaDie ID deines Servers · Discord-ID (String)
numberPfadstringJa
Idempotency-KeyHeaderstringNeinOptional. Sende einen eindeutigen Wert (eine UUID) und verwende ihn bei einem erneuten Versuch wieder: Die Änderung erfolgt nur einmal. So funktioniert’s

Request-Body

Request-Body
FeldTypErforderlichBeschreibung
decisionstringJaEines von accepted, denied
reasonstring | nullNeinSent to the applicant (DM) and shown in the review
bis zu 1.000 Zeichen

Antwort

Antwortfelder · 202
FeldTypErforderlichBeschreibung
numberintegerJa
formIdinteger | nullJanull when the form was deleted
formTitlestring | nullJa
userIdstringJa
statusstringJaEines von pending, interview, hold, accepted, denied, withdrawn
votesobjectJa
votes.upintegerJa
votes.downintegerJa
submittedAtstring | nullJaISO 8601 date-time
decidedAtstring | nullJaISO 8601 date-time
decidedBystring | nullJanull = system / API
reasonstring | nullJa
answersarray of objectJa
answers[].idstringJa
answers[].typestringJa
answers[].labelstringJa
answers[].textstringJa
applicantobjectJa
applicant.accountCreatedAtstring | nullJaISO 8601 date-time
applicant.joinedAtstring | nullJaISO 8601 date-time
applicant.roleIdsarray of stringJa
applicant.levelinteger | nullJa
applyingbooleanJaA console/API decision is still being applied in Discord
failedActionsarray of objectJa
failedActions[].typestringJa
failedActions[].errorstring | nullJa
Antwort · 202
{
  "number": 7,
  "formId": 98765,
  "formTitle": "example",
  "userId": "876543210987654321",
  "status": "pending",
  "votes": {
    "up": 10,
    "down": 10
  },
  "submittedAt": "2026-10-07T12:00:00.000Z",
  "decidedAt": "2026-10-07T12:00:00.000Z",
  "decidedBy": "example",
  "reason": "Tournament prize",
  "answers": [
    {
      "id": "example",
      "type": "example",
      "label": "Example",
      "text": "Example answer"
    }
  ],
  "applicant": {
    "accountCreatedAt": "2026-10-07T12:00:00.000Z",
    "joinedAt": "2026-10-07T12:00:00.000Z",
    "roleIds": [
      "234567890123456789"
    ],
    "level": 5
  },
  "applying": true,
  "failedActions": [
    {
      "type": "example",
      "error": "example"
    }
  ]
}

Beispiele

curl
curl -s -X POST "https://console.botgg.app/api/v1/guilds/123456789012345678/applications/submissions/234567890123456789/decision" \
  -H "Authorization: Bearer $BOTGG_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"decision":"accepted","reason":"Tournament prize"}'
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/applications/submissions/234567890123456789/decision', {
  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({
    decision: 'accepted',
    reason: 'Tournament prize',
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(`${res.status} ${data.error}: ${data.message}`);
console.log(data);
Python (requests)
import os, uuid
import requests

res = requests.post(
    "https://console.botgg.app/api/v1/guilds/123456789012345678/applications/submissions/234567890123456789/decision",
    headers={
        "Authorization": f"Bearer {os.environ['BOTGG_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),  # reuse it when you retry this request
    },
    json={
        "decision": "accepted",
        "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

Bereit, deinen Server aufs nächste Level zu bringen?

Füge BotGG kostenlos hinzu und aktiviere die Features dann in der Web-Konsole.