QwikBroad API Overview
The QwikBroad API allows developers to integrate powerful notification and messaging capabilities into their applications. It supports multi-channel notifications, device management via FCM, and real-time interactions.
Base URL
Register User
Creates a new user account.
{
"email": "user@example.com",
"password": "strongpassword"
}
Response
{
"message": "User registered successfully",
"user_id": "uuid-string"
}
Login
Authenticates a user and returns a JWT token.
{
"email": "user@example.com",
"password": "strongpassword"
}
Response
{
"token": "jwt-token-string"
}
OAuth (Google)
Exchanges a provider token for a system JWT token.
{
"provider": "google",
"token": "google-id-token"
}
Devices
Register Device
Registers a mobile device FCM token for push notifications.
{
"fcm_token": "firebase-cloud-messaging-token",
"platform": "android"
}
Channels
Create Channel
Creates a new notification channel.
| Field | Type | Description |
|---|---|---|
| name | string | Channel name |
| description | string | Description |
| category | string | Category (e.g. "Tech") |
| is_private | bool | True or False |
| icon | file | Channel icon image |
Get My Channels
Public Channels
Search Channels
Public Search: ?q=name | Private Search: ?q=@api-key
Subscribe
Messages
Send Message
Send a broadcast message (Channel Owner only).
| Field | Description |
|---|---|
| title | Message title |
| body | Message summary/body |
| content | Rich HTML content |
| image_url | Optional external image URL |
| target_type | "global" or "specific" |
| scheduled_at | ISO datetime string (e.g. 2023-12-31T23:59) |
Send External Message
Send a message from an external system using the Channel API Key.
{
"title": "Alert",
"body": "System down",
"image_url": "http://...",
"target_user": "user-uuid"
}
Reactions
React to Message
{
"emoji": "😄"
}
Reports
Submit Report
Report a channel or message for inappropriate content.
{
"channel_id": "optional-uuid",
"message_id": "optional-uuid",
"reason": "spam", // required
"description": "Details about the report" // optional
}
* Either channel_id or message_id must be provided.
Polls
Create Poll
Create a new poll in a channel.
{
"channel_id": "uuid-string",
"question": "What is your favorite color?",
"options": ["Red", "Blue", "Green", "Yellow"],
"expires_in": 1440
}
Vote on Poll
Cast or change a vote on a poll option.
{
"poll_id": "uuid-string",
"option_id": "uuid-string"
}
Get Poll Results
Get the current results of a poll.
Response
{
"poll_id": "uuid-string",
"question": "What is your favorite color?",
"results": [
{ "id": "uuid-1", "text": "Red", "votes": 10 },
{ "id": "uuid-2", "text": "Blue", "votes": 5 }
]
}
Widget
Embed Widget
Include the widget in any HTML page to receive notifications in real-time.
<script src="http://localhost:3000/widget.js?channel_id=YOUR_CHANNEL_UUID&user_id=OPTIONAL_USER_UUID"></script>
| Parameter | Required | Description |
|---|---|---|
| channel_id | Yes | The UUID of the channel to listen to. |
| user_id | No | The UUID of the user context (for persistent history). |
| tag_id | No | The DOM ID of an element to trigger the widget (replaces default launcher). |