Referencia de API
BotLaunch API
Crea integraciones potentes con la API REST de BotLaunch. Acceso completo a bots, usuarios, mensajes y más con documentación y ejemplos exhaustivos.
URL base
https://api.botlaunch.io
Versión
v1.0
Autenticación
JWT Bearer
Inicio rápido
Comienza a usar la API de BotLaunch en minutos.
1. Instalar o probar
# Call the REST API directly
curl -X GET "https://api.botlaunch.io/api/health" \
-H "Content-Type: application/json"bash
2. Autenticarse
// 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. Realizar llamadas a la 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 botsjavascript
Endpoints de la API
Explora los endpoints disponibles de la API organizados por tipo de recurso.
Formato de respuesta
Todas las respuestas de la API siguen una estructura JSON consistente.
Respuesta exitosa
{
"data": {
"id": "bot_123",
"name": "My Bot",
"status": "active"
},
"message": "Bot retrieved successfully"
}json
Respuesta de error
{
"error": "Unauthorized",
"statusCode": 401,
"message": "Invalid or expired token"
}json
Respuesta paginada
{
"data": [
{ "id": "bot_1", "name": "Bot 1" },
{ "id": "bot_2", "name": "Bot 2" }
],
"total": 25,
"page": 1,
"limit": 10
}json
Límite de solicitudes
Las solicitudes a la API están limitadas para garantizar un uso justo y la estabilidad de la plataforma.
| Plan | Solicitudes/Min | Solicitudes/Día | Límite de ráfaga |
|---|---|---|---|
| Free | 60 | 1,000 | 10 |
| Starter | 300 | 10,000 | 50 |
| Professional | 1,000 | 50,000 | 100 |
| Business | 5,000 | Unlimited | 500 |
Encabezados de límite de solicitudes
Check X-RateLimit-Remaining and X-RateLimit-Reset headers in API responses to monitor your usage.