Webhooks and Public API Reference

Webhooks push events to your URL as they happen. The public REST API at /public/v1 lets you read tickets, forms, applications and daily analytics. Both need Premium.

Before you start

  • A Premium plan on the server
  • For webhooks: an https URL that accepts POST requests
  • For the API: an API key

Create a webhook

A server can have up to 20 webhooks. The URL cannot contain a user name or password and cannot point to a private or internal address. The check runs when you save and again on every delivery. Redirects are not followed.

  1. Open Data & integrations → Webhooks and click New webhook.
  2. Enter a Name and the URL. The URL must start with https://.
  3. Enter a Secret (optional). With a secret, every request is signed.
  4. Select at least one event under Events, then click Create webhook.

Events

EventSent whenFields in data
TICKET_OPENA ticket is opened, by any route.ticketId, number, creatorId, panelId, channelId
TICKET_CLOSEA ticket is closed, by any route.ticketId, number, creatorId, assigneeId, reason, closedBy, source
TICKET_REOPENA closed ticket is reopened.ticketId, number, creatorId, reopenedBy
TICKET_DELETEA ticket is deleted.ticketId, deletedBy
APPLICATION_APPROVEDAn application is approved in the dashboard.applicationId, formId, userId, reviewerId, note
APPLICATION_DENIEDAn application is denied in the dashboard.applicationId, formId, userId, reviewerId, note
APPLICATION_SUBMITTEDSelectable, but not sent today.none
GIVEAWAY_ENDEDA giveaway ends or is rerolled.giveawayId, prize, winners, entryCount, reroll
POLL_CLOSEDA poll closes.pollId, question, options, counts, totalVotes, multiChoice, closedAt
VERIFICATION_SUCCESSA member passes a verification check.panelId, userId
VERIFICATION_FAILUREA member fails a verification check.panelId, userId

Note: Applications approved or denied with the buttons in Discord do not send APPLICATION_APPROVED or APPLICATION_DENIED today. Only reviews made in the dashboard do. Treat the application events as incomplete until this changes.

Request format

Each delivery is an HTTP POST with a JSON body. event is the event name, serverId the Discord server ID, timestamp the time of the event in ISO 8601, and data the fields from the table above.

  • X-SupremeBot-Delivery is one ID for all retries of the same delivery. Use it to ignore duplicates.
  • The signature headers appear only when the webhook has a secret.
POST /webhook HTTP/1.1
Content-Type: application/json
User-Agent: SupremeBot-Webhooks/1.0
X-SupremeBot-Event: true
X-SupremeBot-Delivery: 5d0c8f5e-9c7e-4a36-8c4f-0a7f3a9e1c11
X-SupremeBot-Timestamp: 1794567890
X-SupremeBot-Signature-V2: sha256=<hex>
X-SupremeBot-Signature: sha256=<hex>

{"event":"TICKET_CLOSE","serverId":"123456789012345678","timestamp":"2026-11-13T10:15:00.000Z","data":{"ticketId":"…","number":42,"creatorId":"…","assigneeId":null,"reason":null,"closedBy":"…","source":"manual"}}

Verify the signature

The new header covers the time as well, so you can reject replayed requests. X-SupremeBot-Signature-V2 is sha256= followed by the hex HMAC-SHA256 of the text timestamp.body, keyed with your secret. The timestamp is in X-SupremeBot-Timestamp, in seconds. Use the raw request body, exactly as received. Do not parse and re-serialise the JSON.

The older header, X-SupremeBot-Signature, is the HMAC-SHA256 of the body alone. It stays for receivers that already use it. New integrations should use the V2 header.

import crypto from "node:crypto";

// Returns true when the request really comes from Supreme Bot and is recent.
export function isValidWebhook({ secret, rawBody, timestamp, signature }) {
  const age = Math.abs(Date.now() / 1000 - Number(timestamp));
  if (!Number.isFinite(age) || age > 300) return false; // reject anything older than 5 minutes
  const expected = "sha256=" + crypto
    .createHmac("sha256", secret)
    .update(`${timestamp}.${rawBody}`)
    .digest("hex");
  const a = Buffer.from(expected);
  const b = Buffer.from(String(signature || ""));
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

Note: The five-minute window is a suggestion, not a rule of the bot. Choose your own.

Delivery, retries and automatic disabling

  • Your endpoint has 10 seconds to answer. Any status below 400 counts as delivered. The response body is ignored.
  • These failures are retried after 2 seconds, 10 seconds and 60 seconds: a network error or timeout, 408, 429 and any 5xx. Other 4xx statuses are not retried.
  • Retries are held in the memory of the sending service. A restart of that service can lose a pending retry.
  • After 10 deliveries in a row fail, the webhook is switched off and shows Disabled in the dashboard. Switching it on again resets the failure count.
  • If the server drops to the Free plan, webhooks stop sending.

Create an API key

Revoke a key at any time with Revoke key. Keys are read-only: no endpoint changes data.

  1. Open Data & integrations → API keys and click New key.
  2. Enter a name, tick the Scopes the integration needs and optionally set Expires in (days), from 1 to 3650.
  3. Click Create key. The full key starts with bpk_live_ and is shown only once. Copy it now.

Endpoints

Base URL: https://supremebot.carbonstealth.eu/public/v1. Send the key as a bearer token in the Authorization header. Every endpoint returns data for the key's own server only.

Method and pathScopeReturns
GET /menoneserver (id, name, icon, isPremium, plan), keyId, scopes
GET /ticketstickets:readdata, total, limit, offset. Query: limit, offset, status
GET /tickets/{id}tickets:readThe ticket. 404 if it does not exist on this server
GET /formsforms:readdata: forms with the number of applications
GET /applicationsapplications:readdata, total, limit, offset. Query: limit, offset, status
GET /analytics/dailyanalytics:readdata: daily metrics in date order, at most 365 rows. Query: from, to
curl https://supremebot.carbonstealth.eu/public/v1/tickets?status=OPEN&limit=50 \
  -H "Authorization: Bearer bpk_live_..."

Scopes

The four scopes /public/v1 uses are tickets:read, forms:read, applications:read and analytics:read. The key form also lists server:read, panels:read, polls:read and giveaways:read. No /public/v1 endpoint uses those four today, so leave them unticked.

Query parameters

A bad value returns 400 with a message that names the parameter.

ParameterApplies toRule
limittickets, applicationsWhole number from 1. Default 20. Values above 100 are treated as 100.
offsettickets, applicationsWhole number, 0 or more. Default 0.
statusticketsOPEN, CLAIMED, CLOSED or ARCHIVED
statusapplicationsPENDING, APPROVED, DENIED or INTERVIEW
from, toanalytics/dailyA valid date, for example 2026-11-01

Errors and rate limits

  • Each key may make 300 requests per minute.
  • In addition, each IP address may make 60 requests per minute to /public/v1. These are counted before the key is checked, so the lower limit applies to a single client.
  • Repeated invalid keys from one address are blocked for a while.
StatusMeaning
400A query parameter is invalid.
401The bearer token is missing, not a bpk_live_ key, invalid, revoked or expired.
403The key lacks the scope (Missing scope), or the server has no Premium plan (code PREMIUM_REQUIRED).
404The ticket does not exist on this server.
429Too many requests.

Questions people ask

Do webhooks and the API need Premium?

Yes. A server on the Free plan cannot create webhooks, and API keys answer 403 PREMIUM_REQUIRED.

Is there a sandbox?

No. Create a key with only the scopes you need and, if you like, a short expiry.

My endpoint was switched off. How do I get it back?

Fix the endpoint, then switch the webhook on again in Data & integrations → Webhooks. The failure count resets.

Can the API change data?

No. All endpoints read.

Keep going

Checked against the bot on 2026-11-13.