API Reference - BotNexus
Discover, Manage, and Scale Discord Bots
Core API Endpoints
Access real-time bot metrics, server analytics, and developer verification status through our public REST interface.
All requests require a Bearer token in the Authorization header. Rate limits are set to 120 requests per minute for standard tiers and 500 per minute for enterprise partners. Responses are returned in JSON format with standard HTTP status codes and consistent error structures.
GET /v1/bots/{bot_id}
Retrieve comprehensive profile data for a specific bot, including average latency, server count, and command uptime. Returns 200 OK or 404 Not Found.
POST /v1/analytics/submit
Push real-time usage statistics from your bot's dashboard. Payload must include server_id, active_users, and timestamp. Accepts application/json only.
GET /v1/developers/{username}/status
Check verification badge status and API access tier. Useful for conditional UI rendering in third-party directories and partner dashboards.
PATCH /v1/bots/{bot_id}/meta
Update public-facing metadata including tags, short description, and invite URL. Requires owner or admin scope and triggers a 24-hour cache refresh.
Code Samples
Copy-paste ready examples to integrate BotNexus metrics into your monitoring stack or bot dashboard.
Authenticate using your project key generated in the Developer Console. All examples use the official botnexus-sdk-js package or standard fetch and axios calls. Ensure TLS 1.2+ is enabled for all outbound connections.
JavaScript / Node.js
const response = await fetch('https://api.botnexus.com/v1/bots/847291032847', { headers: { 'Authorization': 'Bearer nx_live_9f8a7b' } }); const data = await response.json(); console.log(data.server_count);
Python
import requests; headers = {'Authorization': 'Bearer nx_live_9f8a7b'}; res = requests.post('https://api.botnexus.com/v1/analytics/submit', json={'server_id': '1029384756', 'active_users': 482}, headers=headers); print(res.status_code)
cURL
curl -X GET "https://api.botnexus.com/v1/developers/arcdev/status" -H "Authorization: Bearer nx_live_9f8a7b" -H "Accept: application/json"
Error Handling
Monitor for 429 Too Many Requests and implement exponential backoff. Retry headers include X-RateLimit-Reset and X-RateLimit-Remaining for precise pacing across distributed workers.