HTTP Events
Receive real-time webhook events for tickets, applications, and more.
Overview
Tickety can send HTTP webhook events to your custom endpoint whenever certain actions occur in your server. This allows you to integrate Tickety with your own systems, automate workflows, or build custom integrations.
HTTP Events are available to all servers with a daily limit of 150 requests for free servers. Premium servers have unlimited requests.
Getting Started
- Navigate to your server's Dashboard
- Open Settings and expand Advanced Settings
- Enable HTTP Events
- Enter your HTTP events endpoint URL (not a Discord webhook)
- Copy your authentication token (automatically generated)
How It Works
When an event occurs in your server (e.g., a ticket is created), Tickety sends a POST request to your configured webhook URL through a secure Cloudflare Worker. The worker forwards the event to your endpoint with the following structure:
{
"type": "ticket.create",
"payload": {
// Event-specific data
}
}Authentication
All requests include an Authorization header with your unique token:
const authToken = request.headers.get("Authorization");
// Verify this matches your token from the dashboardKeep your authentication token secret! Anyone with this token can send fake events to your endpoint, and it also grants access to your server's uploaded images through the Uploads API.
Uploaded images
Images that users upload as answers to ticket forms or applications are stored privately and are
not included in the event payload. Those questions carry an upload object instead, which you
exchange for the image using the same token. See Uploads.
Rate Limits
| Tier | Daily Limit | Reset Time |
|---|---|---|
| Free | 150 requests | 00:00 UTC |
| Premium | Unlimited | N/A |
The rate limit counter resets daily at midnight UTC. Once you reach your limit, no more events will be sent until the next day.
Choosing which events are sent
Events are split into four categories, and each one has its own toggle in the dashboard. Every category is enabled by default, so a new endpoint receives everything until you turn something off.
- Navigate to your server's Dashboard
- Open Settings and expand Advanced Settings
- Under Event Categories, turn any category on or off
| Category | Contains |
|---|---|
| Tickets | Created, closed, claimed, unclaimed, renamed, moved, transferred, priority changed, users added or removed |
| Applications | Submitted, accepted, denied |
| Verification | Passed, failed |
| Members | Joined the server, left the server |
Toggles apply to a whole category, not to individual event types. If you only care about some events inside a category, leave the category on and filter on type in your own handler.
Events in a disabled category are skipped before they are sent, so they never count toward your daily request limit. Turning off categories you do not use is the easiest way to stay under the free tier limit.
The Members category covers server joins and leaves for every member. These events are sent whenever HTTP Events is on, independently of whether you have welcome or leave messages configured.
Event Types
Tickety supports the following event types. Each heading below is one category, matching the toggles described in Choosing which events are sent.
Ticket Events (Tickets category)
ticket.create- A ticket was createdticket.close- A ticket was closedticket.rename- A ticket was renamedticket.priority- A ticket's priority was changedticket.move- A ticket was moved to a different categoryticket.transfer- A ticket was transferred to a different panelticket.claim- A ticket was claimed by a staff memberticket.unclaim- A ticket was unclaimedticket.add- A user was added to a ticketticket.remove- A user was removed from a ticket
Application Events (Applications category)
application.submit- An application was submittedapplication.accept- An application was acceptedapplication.deny- An application was denied
Verification Events (Verification category)
verification.pass- A user passed verificationverification.fail- A user failed verification
Member Events (Members category)
member.join- A member joined the servermember.leave- A member left the server
Example Implementation
Here's a simple Express.js server that receives Tickety events:
import express from 'express';
const app = express();
app.use(express.json());
const TICKETY_AUTH_TOKEN = 'your-token-from-dashboard';
app.post('/tickety-webhook', (req, res) => {
// Verify authentication
const authToken = req.headers.authorization;
if (authToken !== TICKETY_AUTH_TOKEN) {
return res.status(401).json({ error: 'Unauthorized' });
}
const { type, payload } = req.body;
// Handle different event types
switch (type) {
case 'ticket.create':
console.log(`New ticket created: ${payload.ticketId}`);
console.log(`Channel: ${payload.channel.name}`);
break;
case 'ticket.close':
console.log(`Ticket closed: ${payload.ticketId}`);
console.log(`Reason: ${payload.closeReason}`);
break;
// Handle other event types...
default:
console.log(`Unknown event type: ${type}`);
}
res.status(200).json({ success: true });
});
app.listen(3000, () => {
console.log('Webhook server running on port 3000');
});Security Considerations
- Always verify the authentication token - Check the
Authorizationheader matches your token - Use HTTPS when possible - HTTPS is recommended for production to ensure encryption, but HTTP is also supported
- Validate the payload - Check that the event data matches your expected structure
- Don't expose your token - Never commit your token to version control or share it publicly
- Implement rate limiting - Protect your endpoint from potential abuse