Riferimento API

BotLaunch API

Costruisci integrazioni potenti con la REST API di BotLaunch. Accesso completo a bot, utenti, messaggi e altro con documentazione ed esempi completi.

URL Base
https://api.botlaunch.io
Versione
v1.0
Auth
JWT Bearer

Avvio Rapido

Inizia a utilizzare l'API di BotLaunch in pochi minuti.

1. Installa o Testa

# Install the BotLaunch SDK
npm install @botlaunch/sdk

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

2. Autenticati

// 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. Effettua Chiamate API

// 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

Formato Risposta

Tutte le risposte API seguono una struttura JSON coerente.

Risposta di Successo

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

Risposta di Errore

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

Risposta Paginata

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

Limiti di Frequenza

Le richieste API sono limitate in frequenza per garantire un uso equo e la stabilità della piattaforma.

PianoRichieste/MinRichieste/GiornoLimite Burst
Free601,00010
Starter30010,00050
Professional1,00050,000100
Business5,000Unlimited500
EnterpriseCustomUnlimitedCustom

Header Limiti di Frequenza

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