Guides
Advanced Usage
Unlock the full potential of TicketMesh with advanced features, API integration, and power user capabilities.
Advanced Features: These features require technical knowledge and administrator permissions. Always test in a development environment first.
Note: The HTTP API is currently in development. Current advanced features focus on Discord bot commands and database management.
Current Bot Features
Advanced Discord bot capabilities
TicketMesh provides advanced Discord bot features for comprehensive ticket management and analytics.
Advanced statistics with /stats
Multi-language support (10+ languages)
Automated cleanup policies
Comprehensive debug commands
Authentication
Secure API access with tokens
API access requires authentication using your server's API secret.
Header Authentication
Authorization: Bearer YOUR_API_SECRETBase URL
https://api.ticketmesh.com/v1API Endpoints
Available endpoints for accessing and managing ticket data
GET
/guilds/{guild_id}/ticketsRetrieve all tickets for a guild with optional filtering and pagination.
Query Parameters: status, category, limit, offset, user_id
POST
/guilds/{guild_id}/ticketsCreate a new ticket programmatically.
Body: user_id, category, title, description, priority
GET
/guilds/{guild_id}/statsGet comprehensive statistics for the guild's ticket system.
Query Parameters: period, detailed, export_format
PUT
/guilds/{guild_id}/configUpdate guild configuration settings.
Body: category_id, support_roles, transcript_channel, language
GET
/healthCheck bot health status and service availability.
Response: Discord status, database status, uptime, version
Rate Limits: API requests are limited to 100 requests per minute per guild. Use pagination for large datasets.
Example Implementation
Sample code for integrating with the TicketMesh API
JavaScript/Node.js
const axios = require('axios');
const api = axios.create({
baseURL: 'https://api.ticketmesh.com/v1',
headers: {
'Authorization': 'Bearer YOUR_API_SECRET',
'Content-Type': 'application/json'
}
});
// Get all open tickets
async function getOpenTickets(guildId) {
try {
const response = await api.get(`/guilds/${guildId}/tickets`, {
params: { status: 'open', limit: 50 }
});
return response.data;
} catch (error) {
console.error('API Error:', error.response.data);
}
}
// Create a new ticket
async function createTicket(guildId, ticketData) {
try {
const response = await api.post(`/guilds/${guildId}/tickets`, ticketData);
return response.data;
} catch (error) {
console.error('Failed to create ticket:', error.response.data);
}
}Python
import requests
class TicketMeshAPI:
def __init__(self, api_secret):
self.base_url = 'https://api.ticketmesh.com/v1'
self.headers = {
'Authorization': f'Bearer {api_secret}',
'Content-Type': 'application/json'
}
def get_guild_stats(self, guild_id, period='7d'):
response = requests.get(
f'{self.base_url}/guilds/{guild_id}/stats',
headers=self.headers,
params={'period': period}
)
return response.json()
def close_ticket(self, guild_id, ticket_id, reason='Resolved'):
response = requests.patch(
f'{self.base_url}/guilds/{guild_id}/tickets/{ticket_id}',
headers=self.headers,
json={'status': 'closed', 'close_reason': reason}
)
return response.json()Advanced Support
Need help implementing advanced features? Our team provides enterprise support and custom development services: