API संदर्भ
BotLaunch API
BotLaunch REST API के साथ शक्तिशाली इंटीग्रेशन बनाएं। बॉट्स, उपयोगकर्ताओं, संदेशों और अधिक तक पूर्ण पहुंच के साथ व्यापक दस्तावेज़ और उदाहरण।
Base URL
https://api.botlaunch.io
संस्करण
v1.0
Auth
JWT Bearer
त्वरित शुरुआत
BotLaunch API के साथ कुछ ही मिनटों में शुरू करें।
1. इंस्टॉल या टेस्ट करें
# 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. प्रमाणित करें
// 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 कॉल करें
// 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
API Endpoints
संसाधन प्रकार के अनुसार व्यवस्थित उपलब्ध API endpoints खोजें।
प्रतिक्रिया प्रारूप
सभी API प्रतिक्रियाएं एक सुसंगत JSON संरचना का पालन करती हैं।
सफल प्रतिक्रिया
{
"data": {
"id": "bot_123",
"name": "My Bot",
"status": "active"
},
"message": "Bot retrieved successfully"
}json
त्रुटि प्रतिक्रिया
{
"error": "Unauthorized",
"statusCode": 401,
"message": "Invalid or expired token"
}json
पेजिनेटेड प्रतिक्रिया
{
"data": [
{ "id": "bot_1", "name": "Bot 1" },
{ "id": "bot_2", "name": "Bot 2" }
],
"total": 25,
"page": 1,
"limit": 10
}json
Rate Limiting
उचित उपयोग और प्लेटफ़ॉर्म स्थिरता सुनिश्चित करने के लिए API अनुरोध rate limited हैं।
| प्लान | अनुरोध/मिनट | अनुरोध/दिन | Burst सीमा |
|---|---|---|---|
| Free | 60 | 1,000 | 10 |
| Starter | 300 | 10,000 | 50 |
| Professional | 1,000 | 50,000 | 100 |
| Business | 5,000 | Unlimited | 500 |
| Enterprise | Custom | Unlimited | Custom |
Rate Limit Headers
Check X-RateLimit-Remaining and X-RateLimit-Reset headers in API responses to monitor your usage.