Docs
Dashboard
HoneyNotify SDKs

Choose your platform

Select a platform to open its public SDK repository on GitHub.

AndroidKotlin and Firebase Cloud MessagingiOSSwift and Apple Push Notification serviceWebBrowser push and service worker support
Core concepts

Notifications

Notifications are immutable send requests with a content snapshot, audience snapshot, delivery options, and recipient results. Create one through the dashboard or POST /v1/notifications.

Minimal send#

Every creation request needs title, body, target, and a unique Idempotency-Key header. A template may supply the title and body.

curl --request POST https://api.honeynotify.com/v1/notifications \
  --header "Authorization: Bearer $HONEYNOTIFY_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: welcome-customer-123-v1" \
  --data '{
    "title": "Welcome to the hive",
    "body": "Your account is ready.",
    "target": {"type": "user", "external_user_id": "customer_123"}
  }'

Targets#

Type Target object Behaviour
all {"type":"all"} Every enabled, valid device in the app
device {"type":"device","device_id":"UUID"} One HoneyNotify device
user {"type":"user","external_user_id":"customer_123"} All enabled devices for one user
tag {"type":"tag","key":"plan","value":"pro"} Devices whose user has the exact tag value
segment {"type":"segment","segment_id":"UUID"} Devices matching a saved segment snapshot

For compound inclusion and exclusion rules, see Segments and targeting.

Content fields#

Field Type Notes
name string Internal campaign label, up to 190 characters
title string Required after template resolution, up to 250 characters
body string Required after template resolution, up to 4,096 characters
image_url string Rich-media URL, up to 2,048 characters
click_url string Deep link or HTTPS destination, up to 2,048 characters
data object Custom application payload
localizations object Locale-specific content variants
template_data object Values used to render template placeholders
template_id UUID Source template; request fields override template content

Custom data should be small and contain only values your clients need. Push providers impose their own payload limits, so avoid embedding documents or binary content.

Delivery controls#

Field Accepted value Purpose
priority transactional, high, normal, bulk Selects queue priority; defaults to normal
interruption_level passive, active, time_sensitive, critical Controls how the operating system presents the notification; defaults to active
scheduled_at ISO 8601 timestamp Holds the message until a future UTC-normalised time
ttl integer 02419200 Provider time-to-live in seconds, up to 28 days
collapse_id string, max 64 Lets supported providers replace an older pending message
sound string, max 100 Platform notification sound
badge integer App icon badge value
category string, max 100 Platform category/channel hint
actions up to 3 objects Interactive actions with id, text, and optional icon
content_available boolean Requests background content handling where supported
frequency_cap_override boolean Bypasses the app frequency cap for an intentional send
local_delivery_time HH:MM Delivers relative to each recipient timezone
platform_overrides object Platform-specific delivery values

priority and interruption_level are independent. Priority controls HoneyNotify's processing queue; interruption level controls device presentation. Existing requests that omit interruption_level retain their current provider transport behaviour and are reported as active.

Level iOS Android Web Push
passive Quiet presentation without sound Low-importance honeynotify_passive channel Low urgency
active Normal immediate presentation Default-importance honeynotify_active channel Existing queue-priority-derived urgency
time_sensitive Time-sensitive presentation High-importance honeynotify_time_sensitive channel High urgency
critical Critical Alert with full-volume critical sound High-importance honeynotify_critical channel High urgency

Apple Critical Alerts work only when Apple has approved the app's Critical Alerts entitlement and the user has granted critical-alert permission. Without both, selecting critical cannot guarantee mute or Focus bypass. Android has no direct equivalent: HoneyNotify uses its strongest generally permitted urgent channel, but users remain in control of channel sound, importance, and Do Not Disturb behaviour. HoneyNotify does not request full-screen intent or DND-policy access.

Platform references: Apple remote notification payloads, Apple Critical Alerts entitlement, and Android notification channels.

Example with interaction and expiry:

{
  "title": "Price drop",
  "body": "An item you saved is now £24.",
  "target": {"type": "segment", "segment_id": "a7f7b391-15e8-47b9-a123-f1bea3994a82"},
  "interruption_level": "time_sensitive",
  "click_url": "myapp://saved-items",
  "ttl": 21600,
  "collapse_id": "saved-item-price-drop",
  "actions": [
    {"id": "view", "text": "View item"},
    {"id": "dismiss", "text": "Not now"}
  ]
}

Scheduling and local delivery#

Use scheduled_at for one absolute moment. Use local_delivery_time when each device should receive the notification at a wall-clock time in its own timezone. Keep device and user timezone data current; missing or invalid profile data cannot produce accurate local-time delivery.

A future scheduled notification is returned with status: "draft". When due, it is moved to the queue. An immediate or past-dated notification is returned as queued.

Idempotency#

The Idempotency-Key is mandatory and scoped to the app. If a connection fails after sending, retry the identical request with the identical key. HoneyNotify returns the original ID and adds idempotent_replay: true.

{
  "notification_id": "b39ddcd7-2892-4c3d-8145-0ce3bc9e3ec4",
  "status": "queued",
  "interruption_level": "active",
  "idempotent_replay": true
}

Generate keys from a durable business event where possible—for example, invoice-4831-overdue-v2—so application restarts cannot accidentally duplicate a send.

Read status and results#

GET /v1/notifications?page=1&limit=50
GET /v1/notifications/{notification_id}
GET /v1/notifications/{notification_id}/recipients?page=1&limit=50
GET /v1/notifications/{notification_id}/events?page=1&limit=50

The notification summary includes recipient, accepted, and failed counts. Recipient rows contain the device ID, external user ID, status, attempt count, last error, and last update time. Event rows contain event type, source, properties, and occurrence time.

accepted is a provider acknowledgement. For observable device lifecycle, use SDK events such as received, confirmed_delivered, and opened.

Cancel a notification#

POST /v1/notifications/{notification_id}/cancel

Cancellation is available while a notification is draft, queued, or processing. It prevents work that has not yet been handed to a provider; it cannot recall a push already accepted by APNs, FCM, or Web Push. A notification that is already terminal returns a validation error.