Ding! API Documentation
v1.0

Widget Integration

Embed the Ding! widget on any third-party website to display a real-time notification feed for one of your channels. Subscribers see new messages live without leaving the host site.

Integration is two short steps, both server-side:

  1. Authenticate as the channel owner and mint a short-lived widget token for one of your subscribers.
  2. Embed the widget script on your page, passing only the widget token — your channel API key never leaves your server.

Base URL

https://qwikbroad.app

Authenticate

Two tokens, both server-side only — never embed either in the browser:

  1. Owner JWT — your Ding! account session token. Obtained once via Login.
  2. Widget token — a short-lived token bundling channel_id + user_id. Mint one per page-load on your server using the owner JWT, then pass it to the widget. See Mint Widget Token.

Your channel API key never leaves your server — the widget authenticates entirely with the widget token.

POST

Login

Authenticates the channel owner with their Ding! account credentials and returns the owner JWT.

Endpoint
/api/login
Body (JSON)
{
  "email": "[email protected]",
  "password": "strongpassword"
}

Response

{
  "token": "owner-jwt-string"
}
POST

Mint Widget Token

Mint a widget JWT scoped to one (channel, subscriber) pair. The owner JWT must be presented in the Authorization header. The caller must own the channel; otherwise the request is rejected.

Tokens expire after 7 days. Mint a fresh one per page-load on your server.

Endpoint
/api/channels/:id/widget-token
Headers
Authorization: Bearer <owner-jwt>
Content-Type: application/json
Body (JSON)
{
  "user_id": "subscriber-uuid"
}

Response

{
  "token": "widget-jwt-string",
  "expires_at": "2026-05-11T08:00:00Z"
}

Pass the returned token directly to the widget script tag — see Embed & Receive.


Embed & Receive

The embeddable widget displays a real-time notification feed for a channel on any third-party website. The widget authenticates via a short-lived widget token that bundles the channel ID and user ID — your channel API key never leaves your server.

Embed Widget

Include the following <script> tag in any HTML page. Mint the token server-side via Mint Widget Token — never embed the channel API key in the page. The widget renders a floating bell launcher button (bottom-right) by default, or attaches to an existing element via tag_id.

Script Tag
<script src="https://qwikbroad.app/widget.js
  ?token=WIDGET_TOKEN"></script>
Parameters
Parameter Required Description
tokenYesA widget JWT minted from POST /api/channels/:id/widget-token. Encodes channel_id + user_id; valid for 7 days.
tag_idNoDOM element ID to use as the launcher instead of the default floating button.
GET

Widget Messages

Retrieve messages for the widget view. Authenticated by the widget token.

/api/widget/messages?token=<WIDGET_TOKEN>
GET

Widget Polling for New Messages

The widget polls /api/widget/messages with a since=<RFC3339Nano> cursor every few seconds to pick up new messages. No persistent connection is required.

/api/widget/messages?token=<WIDGET_TOKEN>&since=<RFC3339Nano>