PanelDOCSv1.0.0

API: tickets, webhooks and notifications

Support tickets, the panel's webhooks and a login's notification channels through the token API.

Tickets and notifications work for every kind of token (a customer's token sees its own). Webhooks are for administrators.

These endpoints do what the Support, Plugins & hooks (Webhooks tab) and Notifications screens do. A webhook's or channel's signing secret is in the answer to the call that makes or renews it, and nowhere else.

bash
A=https://api.yourdomain.com/v1
H="Authorization: Bearer hf_xxx"

Tickets

A customer's token opens and answers its own tickets; an administrator's or reseller's token sees those of the accounts it manages and answers them as support. Staff cannot open a ticket for a customer.

Method Path Who What it does
GET /v1/tickets any token Support tickets (customers: their own; staff: those they may see), the ones waiting first. Up to 200 of the chosen kind
POST /v1/tickets any token, write Open a ticket (customer tokens; up to 10 open at once)
GET /v1/tickets/{id} any token One ticket with its messages (marks it as read)
POST /v1/tickets/{id}/close any token, write Close a ticket
POST /v1/tickets/{id}/reopen any token, write Open a closed ticket again
POST /v1/tickets/{id}/reply any token, write Add a message to a ticket

GET /v1/tickets

Query: status (active (default: open and answered), closed or all)

POST /v1/tickets

Field Type Required Meaning
subject string yes up to 150 characters
body string yes describe the problem
priority one of low, normal, high normal by default
domain string one of the account's websites it is about

POST /v1/tickets/{id}/reply

Field Type Required Meaning
body string yes the message

Webhooks

Method Path Who What it does
GET /v1/webhook-events admin Every event a webhook can get
GET /v1/webhooks admin The panel's webhooks
POST /v1/webhooks admin, write Add a webhook (up to 20); the answer has its signing secret, once
GET /v1/webhooks/{id} admin One webhook
PATCH /v1/webhooks/{id} admin, write Change a webhook's address, events or whether it is on
DELETE /v1/webhooks/{id} admin, write Delete a webhook and its deliveries
POST /v1/webhooks/{id}/regenerate-secret admin, write Make a new signing secret (the old one stops working); the answer has it, once
POST /v1/webhooks/{id}/test admin, write Send a test event now and say how it went

POST /v1/webhooks

Field Type Required Meaning
url string yes an https:// address
events array yes event keys from /webhook-events
enabled boolean on (default true)

PATCH /v1/webhooks/{id}

Field Type Required Meaning
url string an https:// address
events array event keys
enabled boolean on or off

Notifications

Method Path Who What it does
GET /v1/notification-channels any token The token's login's notification channels
POST /v1/notification-channels any token, write Add a channel; it gets the urgent events for now. A webhook channel's answer has its signing secret, once
GET /v1/notification-channels/{id} any token One channel
PATCH /v1/notification-channels/{id} any token, write Pause or resume a channel
DELETE /v1/notification-channels/{id} any token, write Remove a channel and its subscriptions
POST /v1/notification-channels/{id}/rotate-secret any token, write Webhook channels: make a new signing secret; the answer has it, once
POST /v1/notification-channels/{id}/test any token, write Send a test message (5 in 10 minutes)
GET /v1/notification-deliveries any token The last 50 notifications
GET /v1/notification-events any token The events this login's role can subscribe to
GET /v1/notification-quiet-hours any token The quiet hours
PUT /v1/notification-quiet-hours any token, write Save the quiet hours
GET /v1/notification-subscriptions any token Which events go to which channel
PUT /v1/notification-subscriptions any token, write Replace the subscriptions with this list (unknown events and other people's channels are left out)

POST /v1/notification-channels

Field Type Required Meaning
kind string yes email, webhook, slack, discord or telegram (what the server allows)
name string a name
to string email: the address
url string webhook, slack, discord: the address
token string telegram: the bot token
chat string telegram: the chat id or @channel

PATCH /v1/notification-channels/{id}

Field Type Required Meaning
enabled boolean yes on or paused

PUT /v1/notification-quiet-hours

Field Type Required Meaning
on boolean yes quiet hours on
from string yes HH:MM
to string yes HH:MM
tz string a time zone name (default UTC)
urgent boolean urgent events still come through

PUT /v1/notification-subscriptions

Field Type Required Meaning
subscriptions array yes objects with event and channel_id