DocumentationAPI ReferenceGenel Bakış
API Referansı

BotLaunch API

BotLaunch REST API ile güçlü entegrasyonlar oluşturun. Bot'lar, kullanıcılar, mesajlar ve daha fazlasina kapsamlı dokümantasyon ve orneklerle tam erişim.

Temel URL
https://api.botlaunch.io
Sürüm
v1.0
Kimlik Doğrulama
JWT Bearer

Hızlı Başlangıç

BotLaunch API ile dakikalar içinde çalışmaya başlayın.

1. Yükleyin veya Test Edin

# Call the REST API directly
curl -X GET "https://api.botlaunch.io/api/health" \
  -H "Content-Type: application/json"
bash

2. Kimlik Doğrulayın

// Authenticate and get an access token
const response = await fetch("https://api.botlaunch.io/api/auth/login", {
  method: "POST",
  headers: {
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    email: "your@email.com",
    password: "your-password"
  })
});

const { data } = await response.json();
console.log(data.accessToken);
javascript

3. API Çağrısı Yapın

// Make authenticated API calls
const bots = await fetch("https://api.botlaunch.io/api/bots", {
  headers: {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "x-organization-id": "YOUR_ORG_ID"
  }
});

const { data } = await bots.json();
console.log(data); // Array of your bots
javascript

Yanıt Formatı

Tüm API yanıtları tutarlı bir JSON yapısını takip eder.

Başarılı Yanıt

{
  "data": {
    "id": "bot_123",
    "name": "My Bot",
    "status": "active"
  },
  "message": "Bot retrieved successfully"
}
json

Hata Yanıtı

{
  "error": "Unauthorized",
  "statusCode": 401,
  "message": "Invalid or expired token"
}
json

Sayfalanmış Yanıt

{
  "data": [
    { "id": "bot_1", "name": "Bot 1" },
    { "id": "bot_2", "name": "Bot 2" }
  ],
  "total": 25,
  "page": 1,
  "limit": 10
}
json

Hız Sınırlaması

API istekleri, adil kullanım ve platform kararlılığı sağlamak için hız sınırlamasına tabidir.

Planİstek/Dkİstek/GünAni Yuk Sınırı
Free601,00010
Starter30010,00050
Professional1,00050,000100
Business5,000Unlimited500

Hız Sınırı Başlıkları

Check X-RateLimit-Remaining and X-RateLimit-Reset headers in API responses to monitor your usage.