POST /v1/notify
Sends a notification to all connected devices on the project associated with the API key.
code
POST https://api.flushkit.dev/v1/notify
Authentication
Include your API key as a Bearer token:
code
Authorization: Bearer fk_live_••••••••••••••••
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
message | string | required | The notification message body. Displayed as the main text of the Flushbar. |
title | string | optional | Optional title shown above the message. Omit to show a message-only notification. |
backgroundColor | string | optional | Hex color string for the Flushbar background (e.g. #7C3AED). Defaults to #1F2937. |
durationSeconds | integer | optional | How long to display the Flushbar in seconds. Pass 0 for a persistent notification the user must dismiss. Defaults to 4. |
position | string | optional | Where to show the Flushbar. One of: top, bottom. Defaults to top. |
Example request
bash
curl -X POST https://api.flushkit.dev/v1/notify \
-H "Authorization: Bearer fk_live_••••••••••••••••" \
-H "Content-Type: application/json" \
-d '{
"message": "Deployment to production succeeded.",
"title": "CI/CD",
"backgroundColor": "#059669",
"durationSeconds": 5,
"position": "top"
}'
Response
200 OK
json
{
"delivered": 3,
"queued": 1
}
| Field | Description |
|---|---|
delivered | Number of connected devices that received the notification immediately. |
queued | Number of offline devices for which the notification was queued (Starter plan+). |
401 Unauthorized
json
{ "code": "UNAUTHORIZED", "message": "Invalid or missing API key." }
429 Too Many Requests
json
{
"code": "EVENT_LIMIT_REACHED",
"limit": 1000,
"used": 1000
}
Returned when the project has exhausted its monthly event quota. Upgrade your plan to continue sending.
422 Unprocessable Entity
json
{ "code": "VALIDATION_ERROR", "message": "message is required." }
You can send notifications directly from the dashboard at app.flushkit.dev without writing any code — useful for announcements and one-off messages.