For Developers

Connect Discord support with webhooks and the API

If tickets should live not only in Discord but also in your shop, CRM or own dashboard, webhooks and the REST API help. This guide shows the setup and the security check.

7 min read Updated

Webhook or API?

  • Webhooks send you an event as soon as it happens, such as a new or closed ticket. Ideal for notifications and syncing.
  • You query the REST API yourself, for example for a ticket list or statistics on your website.
  • Both together: the webhook as a signal, the API for a ticket’s full data.

Setup

  1. Business or Enterprise plan

    API and webhooks are included from Business: up to 5 keys and 3 webhooks, with Enterprise 20 and 10.

  2. Create a webhook

    In the dashboard under “API & webhooks” you enter an HTTPS URL and choose the events. You receive a secret for signature verification.

  3. Send a test

    “Test” sends an event of type ping. This checks reachability and the signature.

  4. Process events

    Reply with a 2xx status within 5 seconds and handle longer tasks in the background.

Available events

  • ticket.created and ticket.closed
  • ticket.claimed and ticket.transferred
  • ticket.status_changed and ticket.priority_changed
  • ticket.transcript_created

Verify the signature

Every delivery carries the X-MeinTicketbot-Signature header with a timestamp and signature. The signature is HMAC-SHA256 over “time.raw body” with your webhook secret. Discard messages with a wrong signature or a timestamp older than five minutes. The full example code is in the help center.

PHP
$body = file_get_contents('php://input');
[$t, $v1] = sscanf($_SERVER['HTTP_X_MEINTICKETBOT_SIGNATURE'], 't=%d,v1=%s');
$ok = hash_equals(hash_hmac('sha256', $t . '.' . $body, $secret), $v1) && abs(time() - $t) < 300;

Help & docs

Receive reliably

  • Failed deliveries are retried with growing intervals for up to 6 hours.
  • After 10 failures in a row the webhook is paused and can be re-enabled in the dashboard.
  • The X-MeinTicketbot-Delivery header contains a unique ID. Store it to detect duplicate deliveries.

Frequently asked questions

Can I change tickets via the API?

No, the API is read-only. You handle tickets in Discord or the dashboard.

How many requests are allowed?

120 requests per minute per key. Beyond that the API answers with status 429.

Related features

More guides

All guides

Ready to try it?

The Free plan is free forever. Set up in minutes, no administrator permissions for the bot.

Start for free