Use the OneSignal CLI from KosmoKrator to call OneSignal tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.
OneSignal can be configured headlessly with `kosmokrator integrations:configure one-signal`.
# Install KosmoKrator first if it is not available on PATH.curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash# Configure and verify this integration.kosmokrator integrations:configure one-signal --set api_key="$ONE_SIGNAL_API_KEY" --set app_id="$ONE_SIGNAL_APP_ID" --enable --read allow --write ask --jsonkosmokrator integrations:doctor one-signal --jsonkosmokrator integrations:status --json
Credentials
Authentication type: API keyapi_key. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Key
Env var
Type
Required
Label
api_key
ONE_SIGNAL_API_KEY
Secret secret
yes
REST API Key
app_id
ONE_SIGNAL_APP_ID
Text string
yes
App ID
url
ONE_SIGNAL_URL
URL url
no
API Base URL
Call OneSignal Headlessly
Use the generic call form when another coding CLI or script needs a stable universal interface.
Every function below can be called headlessly. The generic form is stable across all integrations;
the provider shortcut is shorter but specific to OneSignal.
one-signal.onesignal_list_notifications
Read read
List push notifications sent through OneSignal. Returns notification details including delivery stats, click counts, and outcomes. Use limit and offset for pagination.
Send a new push notification via OneSignal. Specify message contents (per language), optional headings, target segments, a click URL, and a custom data payload.
Parameters
app_id, contents, headings, included_segments, url, data
List devices (players) registered in a OneSignal app. Returns device identifiers, platform, session counts, and tags. Use limit and offset for pagination.
Use these parameter tables when building CLI payloads without calling integrations:schema first.
one-signal.onesignal_list_notifications
List push notifications sent through OneSignal. Returns notification details including delivery stats, click counts, and outcomes. Use limit and offset for pagination.
Send a new push notification via OneSignal. Specify message contents (per language), optional headings, target segments, a click URL, and a custom data payload.
The OneSignal app ID to send the notification from.
contents
object
yes
Notification body per language, e.g. {"en": "Hello!", "es": "¡Hola!"}. The "en" key is required.
headings
object
no
Notification title per language, e.g. {"en": "Update"}. Defaults to the app name if omitted.
included_segments
array
no
Segments to target, e.g. ["All", "Active Users"]. Defaults to ["All"] if omitted.
url
string
no
URL to open when the notification is tapped.
data
object
no
Custom key-value data payload delivered to the app when the notification is opened.
one-signal.onesignal_list_devices
List devices (players) registered in a OneSignal app. Returns device identifiers, platform, session counts, and tags. Use limit and offset for pagination.
Headless calls still follow the integration read/write permission policy. Configure read/write defaults
with integrations:configure. Add --force only for trusted automation that should bypass that policy.