Hexify API
Powerful REST API to integrate Hexify's features into your applications. Build custom dashboards, analytics tools, and automation with our comprehensive API.
API Overview
Base URL
https://api.hexify.bot/v2
Content Type
application/json
API Version
2.0
API Features
Secure Authentication
API key-based authentication with rate limiting and access controls
High Performance
Sub-100ms response times with global CDN and caching
Real-time Data
Live server statistics, user activity, and moderation logs
Webhooks
Real-time event notifications for server activities
Authentication
API Key Authentication
All API requests require authentication using your API key in the Authorization header.
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Getting Your API Key
- Join our Discord server
- Use the command
h!api-key
in a DM with the bot - The bot will generate and send you a unique API key
- Keep your API key secure and never share it publicly
Example Request
const response = await fetch('https://api.hexify.bot/v2/servers/123456789', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
Rate Limits
Standard Limits
Response Headers
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200
Rate Limit Exceeded
{
"error": "Rate limit exceeded",
"message": "You have exceeded your hourly rate limit",
"retry_after": 3600
}
Server Endpoints
Get Server Information
Retrieve detailed information about a Discord server using Hexify.
Parameters
{
"id": "123456789012345678",
"name": "My Discord Server",
"member_count": 1250,
"premium": true,
"features": ["music", "moderation", "analytics"],
"settings": {
"prefix": "h!",
"welcome_channel": "987654321098765432"
}
}
Update Server Settings
Update configuration settings for a Discord server.
{
"prefix": "!",
"welcome_channel": "987654321098765432",
"mod_log_channel": "123456789012345678",
"auto_mod": {
"enabled": true,
"spam_protection": true,
"word_filter": ["badword1", "badword2"]
}
}
Music Endpoints
Get Music Queue
Retrieve the current music queue for a server.
{
"current_track": {
"title": "Never Gonna Give You Up",
"artist": "Rick Astley",
"duration": 213,
"position": 45,
"url": "https://youtube.com/watch?v=dQw4w9WgXcQ"
},
"queue": [
{
"title": "Bohemian Rhapsody",
"artist": "Queen",
"duration": 354,
"requested_by": "123456789012345678"
}
],
"is_playing": true,
"volume": 75
}
Add Song to Queue
Add a song to the music queue.
{
"query": "never gonna give you up rick astley",
"source": "youtube",
"requested_by": "123456789012345678"
}
Analytics Endpoints
Get Server Analytics
Retrieve analytics data for a server (Premium feature).
{
"commands_used": {
"total": 1250,
"today": 45,
"breakdown": {
"music": 580,
"moderation": 320,
"fun": 250,
"utility": 100
}
},
"active_users": {
"daily": 123,
"weekly": 456,
"monthly": 789
},
"member_growth": {
"joins_today": 5,
"leaves_today": 2,
"net_growth": 3
}
}
SDKs & Libraries
JavaScript/Node.js
Official JavaScript SDK for easy integration with Node.js applications.
npm install hexify-api
Python
Python SDK with async support for building Discord bots and applications.
pip install hexify-py
REST Client
Use any HTTP client or tool like cURL, Postman, or Insomnia.
curl -H "Authorization: Bearer API_KEY"
Quick Start Examples
const HexifyAPI = require('hexify-api');
const api = new HexifyAPI('YOUR_API_KEY');
// Get server information
const server = await api.servers.get('123456789012345678');
console.log(`Server: ${server.name} (${server.member_count} members)`);
// Get music queue
const queue = await api.music.getQueue('123456789012345678');
console.log(`Now playing: ${queue.current_track?.title}`);
import hexify
client = hexify.Client('YOUR_API_KEY')
# Get server information
server = await client.get_server('123456789012345678')
print(f"Server: {server.name} ({server.member_count} members)")
# Get music queue
queue = await client.get_music_queue('123456789012345678')
if queue.current_track:
print(f"Now playing: {queue.current_track.title}")
# Get server information
curl -X GET "https://api.hexify.bot/v2/servers/123456789012345678" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
# Get music queue
curl -X GET "https://api.hexify.bot/v2/servers/123456789012345678/music/queue" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
Postman Collection
Download Postman Collection
Get our complete Postman collection with all API endpoints, examples, and environment variables pre-configured.
Download CollectionWhat's Included
- All API endpoints with examples
- Pre-configured environment variables
- Authentication setup
- Response schemas and validation
- Test scripts for common scenarios