{ }
[ ]
< />
API
JSON
REST
API v2.0

Hexify API

Powerful REST API to integrate Hexify's features into your applications. Build custom dashboards, analytics tools, and automation with our comprehensive API.

99.9% Uptime
<100ms Response Time
20+ Endpoints

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.

Request Headers
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Getting Your API Key

  1. Join our Discord server
  2. Use the command h!api-key in a DM with the bot
  3. The bot will generate and send you a unique API key
  4. Keep your API key secure and never share it publicly

Example Request

JavaScript
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

Free Tier 100 requests/hour
Premium 1,000 requests/hour
Enterprise 10,000 requests/hour

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 /servers/{server_id}

Get Server Information

Retrieve detailed information about a Discord server using Hexify.

Parameters

server_id string Discord server ID
Response Example
{
  "id": "123456789012345678",
  "name": "My Discord Server",
  "member_count": 1250,
  "premium": true,
  "features": ["music", "moderation", "analytics"],
  "settings": {
    "prefix": "h!",
    "welcome_channel": "987654321098765432"
  }
}
POST /servers/{server_id}/settings

Update Server Settings

Update configuration settings for a Discord server.

Request Body
{
  "prefix": "!",
  "welcome_channel": "987654321098765432",
  "mod_log_channel": "123456789012345678",
  "auto_mod": {
    "enabled": true,
    "spam_protection": true,
    "word_filter": ["badword1", "badword2"]
  }
}

Music Endpoints

GET /servers/{server_id}/music/queue

Get Music Queue

Retrieve the current music queue for a server.

Response Example
{
  "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
}
POST /servers/{server_id}/music/play

Add Song to Queue

Add a song to the music queue.

Request Body
{
  "query": "never gonna give you up rick astley",
  "source": "youtube",
  "requested_by": "123456789012345678"
}

Analytics Endpoints

GET /servers/{server_id}/analytics

Get Server Analytics

Retrieve analytics data for a server (Premium feature).

Response Example
{
  "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
View on GitHub

Python

Python SDK with async support for building Discord bots and applications.

pip install hexify-py
View on GitHub

REST Client

Use any HTTP client or tool like cURL, Postman, or Insomnia.

curl -H "Authorization: Bearer API_KEY"
Download Collection

Quick Start Examples

JavaScript Example
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}`);
Python Example
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}")
cURL Example
# 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 Collection

What's Included

  • All API endpoints with examples
  • Pre-configured environment variables
  • Authentication setup
  • Response schemas and validation
  • Test scripts for common scenarios