REST API · RUB · JSON

Baue deine eigene Boost-Integration

Mit einem API-Key kannst du Guthaben und Live-Bestand abrufen, Bestellungen sicher erstellen und den Lieferstatus verfolgen.

Schnellstart

Erstelle deinen API-Key im Telegram-Bot unter API. Der vollständige Key wird nur einmal angezeigt und muss bei jeder Anfrage mitgesendet werden.

Basis-URL

https://api.relaxo.dev

Rate limit

60 requests / minute / API key

Authentifizierung

Nutze entweder X-API-Key oder einen Bearer-Token. Speichere den Key niemals im Frontend, in Screenshots oder öffentlichen Repositories.

X-API-Key
curl https://api.relaxo.dev/v1/me \
  -H "X-API-Key: bs_live_YOUR_API_KEY"
Bearer
curl https://api.relaxo.dev/v1/me \
  -H "Authorization: Bearer bs_live_YOUR_API_KEY"

Endpunkte

GET/v1/me

Profil und RUB-Guthaben

Anfrage
curl https://api.relaxo.dev/v1/me \
  -H "X-API-Key: bs_live_YOUR_API_KEY"
Antwort
{
  "user_id": 123456789,
  "username": "reseller",
  "balance_rub": 2500,
  "total_deposited_rub": 5000,
  "language": "de",
  "api_rate_limit_per_minute": 60
}
GET/v1/stock

Live-Bestand und aktuelle Verkaufspreise

Anfrage
curl https://api.relaxo.dev/v1/stock -H "X-API-Key: bs_live_YOUR_API_KEY"
Antwort
{
  "currency": "RUB",
  "month_1": {
    "stock": 120,
    "price_per_boost_rub": 85
  },
  "month_3": {
    "stock": 64,
    "price_per_boost_rub": 210
  },
  "updated_at": "2026-07-12T14:30:00.000Z"
}
GET/v1/orders?limit=20

Eigene letzte Bestellungen anzeigen

Optionaler Query-Parameter limit: 1–100, Standard 50.

Antwort
{
  "count": 1,
  "orders": [
    {
      "order_id": "BLY4F6D4A91C2",
      "months": 1,
      "quantity": 10,
      "delivered": 0,
      "status": "processing",
      "invite": "https://discord.gg/example",
      "total_rub": 850,
      "refunded_rub": 0,
      "error_code": null,
      "error": null,
      "created_at": "2026-07-12T14:30:00.000Z",
      "updated_at": "2026-07-12T14:30:02.000Z"
    }
  ]
}
GET/v1/orders/{order_id}

Eine eigene Bestellung abrufen

Antwort
{
  "order_id": "BLY4F6D4A91C2",
  "months": 1,
  "quantity": 10,
  "delivered": 0,
  "status": "processing",
  "invite": "https://discord.gg/example",
  "total_rub": 850,
  "refunded_rub": 0,
  "error_code": null,
  "error": null,
  "created_at": "2026-07-12T14:30:00.000Z",
  "updated_at": "2026-07-12T14:30:02.000Z"
}
POST/v1/orders

Neue Bestellung erstellen

Idempotency-Key ist Pflicht

Jede POST /v1/orders-Anfrage benötigt einen eindeutigen Idempotency-Key. Verwende denselben Key nur, wenn du exakt dieselbe Anfrage nach einem Timeout erneut sendest. So werden doppelte Abbuchungen und Bestellungen verhindert.

Anfrage
curl -X POST https://api.relaxo.dev/v1/orders \
  -H "Content-Type: application/json" \
  -H "X-API-Key: bs_live_YOUR_API_KEY" \
  -H "Idempotency-Key: order-2026-0001" \
  -d '{"invite":"https://discord.gg/example","months":1,"quantity":10}'
Antwort
{
  "order_id": "BLY4F6D4A91C2",
  "months": 1,
  "quantity": 10,
  "delivered": 0,
  "status": "processing",
  "invite": "https://discord.gg/example",
  "total_rub": 850,
  "refunded_rub": 0,
  "error_code": null,
  "error": null,
  "created_at": "2026-07-12T14:30:00.000Z",
  "updated_at": "2026-07-12T14:30:02.000Z"
}

Bestellstatus

StatusDescription
creatingDie lokale Bestellung wird vorbereitet.
processingDie Auslieferung läuft.
retryingFür die fehlende Menge läuft ein zweiter Versuch.
completedAlle Boosts wurden geliefert.
partialTeilweise geliefert; die fehlende Menge wurde erstattet.
failedNichts geliefert; die Bestellung wurde erstattet.
manual_reviewDie Antwort war nicht eindeutig und muss von einem Admin geprüft werden.

Fehlerantworten

Fehler enthalten immer einen stabilen Code und eine verständliche Nachricht. Nutze den Code für deine Integrationslogik.

Antwort
{
  "code": "INSUFFICIENT_BALANCE",
  "error": "Insufficient balance",
  "required_rub": 850,
  "balance_rub": 300,
  "request_id": "b28abf23-0f7d-4a3a-8a90-60d42d77514a"
}
CodeHTTP
INVALID_API_KEY401
API_DISABLED503
ORDERS_DISABLED503
RATE_LIMITED429
IDEMPOTENCY_KEY_REQUIRED400
IDEMPOTENCY_CONFLICT409
REQUEST_IN_PROGRESS409
INVALID_DURATION400
INVALID_QUANTITY400
INVALID_INVITE400
MEMBERSHIP_SCREENING_ENABLED400
INSUFFICIENT_STOCK409
INSUFFICIENT_BALANCE402
ORDER_NOT_FOUND404
ENDPOINT_NOT_FOUND404
REQUEST_RESERVATION_FAILED500
INTERNAL_ERROR500

Sicherheit und Datenschutz

Antworten enthalten nur dein Konto, Verkaufspreise, öffentliche Bestell-IDs und den Lieferstatus. Interne Lieferantendaten, Einkaufspreise, Zugangsdaten und andere Nutzer werden niemals ausgegeben.

Copy-paste-Beispiele

cURL
curl -X POST https://api.relaxo.dev/v1/orders \
  -H "Content-Type: application/json" \
  -H "X-API-Key: bs_live_YOUR_API_KEY" \
  -H "Idempotency-Key: order-2026-0001" \
  -d '{"invite":"https://discord.gg/example","months":1,"quantity":10}'
Node.js
import { randomUUID } from 'node:crypto';

const response = await fetch('https://api.relaxo.dev/v1/orders', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': process.env.BOOST_API_KEY,
    'Idempotency-Key': randomUUID()
  },
  body: JSON.stringify({
    invite: 'https://discord.gg/example',
    months: 1,
    quantity: 10
  })
});

const data = await response.json();
if (!response.ok) throw new Error(data.code + ': ' + data.error);
console.log(data);
Python
import os, uuid, requests

response = requests.post(
    'https://api.relaxo.dev/v1/orders',
    headers={
        'X-API-Key': os.environ['BOOST_API_KEY'],
        'Idempotency-Key': str(uuid.uuid4()),
    },
    json={
        'invite': 'https://discord.gg/example',
        'months': 1,
        'quantity': 10,
    },
    timeout=30,
)

data = response.json()
response.raise_for_status()
print(data)