🎉 Tickety V3 has now been released! Read more →
API

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

  1. Navigate to your server's Dashboard
  2. Open Settings and expand Advanced Settings
  3. Enable HTTP Events
  4. Enter your HTTP events endpoint URL (not a Discord webhook)
  5. 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 dashboard

Keep 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

TierDaily LimitReset Time
Free150 requests00:00 UTC
PremiumUnlimitedN/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.

  1. Navigate to your server's Dashboard
  2. Open Settings and expand Advanced Settings
  3. Under Event Categories, turn any category on or off
CategoryContains
TicketsCreated, closed, claimed, unclaimed, renamed, moved, transferred, priority changed, users added or removed
ApplicationsSubmitted, accepted, denied
VerificationPassed, failed
MembersJoined 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 created
  • ticket.close - A ticket was closed
  • ticket.rename - A ticket was renamed
  • ticket.priority - A ticket's priority was changed
  • ticket.move - A ticket was moved to a different category
  • ticket.transfer - A ticket was transferred to a different panel
  • ticket.claim - A ticket was claimed by a staff member
  • ticket.unclaim - A ticket was unclaimed
  • ticket.add - A user was added to a ticket
  • ticket.remove - A user was removed from a ticket

Application Events (Applications category)

  • application.submit - An application was submitted
  • application.accept - An application was accepted
  • application.deny - An application was denied

Verification Events (Verification category)

  • verification.pass - A user passed verification
  • verification.fail - A user failed verification

Member Events (Members category)

  • member.join - A member joined the server
  • member.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

  1. Always verify the authentication token - Check the Authorization header matches your token
  2. Use HTTPS when possible - HTTPS is recommended for production to ensure encryption, but HTTP is also supported
  3. Validate the payload - Check that the event data matches your expected structure
  4. Don't expose your token - Never commit your token to version control or share it publicly
  5. Implement rate limiting - Protect your endpoint from potential abuse

On this page