KosmoKrator

communication

OneSignal CLI for AI Agents

Use the OneSignal CLI from KosmoKrator to call OneSignal tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 6 read 1 write API key auth

OneSignal CLI Setup

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 --json
kosmokrator integrations:doctor one-signal --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
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.

kosmo integrations:call one-signal.onesignal_list_notifications '{
  "app_id": "example_app_id",
  "limit": 1,
  "offset": 1
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:one-signal onesignal_list_notifications '{
  "app_id": "example_app_id",
  "limit": 1,
  "offset": 1
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs one-signal --json
kosmo integrations:docs one-signal.onesignal_list_notifications --json
kosmo integrations:schema one-signal.onesignal_list_notifications --json
kosmo integrations:search "OneSignal" --json
kosmo integrations:list --json

All CLI Functions

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.

Parameters
app_id, limit, offset

Generic CLI call

kosmo integrations:call one-signal.onesignal_list_notifications '{"app_id":"example_app_id","limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:one-signal onesignal_list_notifications '{"app_id":"example_app_id","limit":1,"offset":1}' --json

one-signal.onesignal_get_notification

Read read

Get details of a specific OneSignal push notification by its ID. Returns full notification data including content, delivery stats, and targeting.

Parameters
id, app_id

Generic CLI call

kosmo integrations:call one-signal.onesignal_get_notification '{"id":"example_id","app_id":"example_app_id"}' --json

Provider shortcut

kosmo integrations:one-signal onesignal_get_notification '{"id":"example_id","app_id":"example_app_id"}' --json

one-signal.onesignal_create_notification

Write write

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

Generic CLI call

kosmo integrations:call one-signal.onesignal_create_notification '{"app_id":"example_app_id","contents":"example_contents","headings":"example_headings","included_segments":"example_included_segments","url":"example_url","data":"example_data"}' --json

Provider shortcut

kosmo integrations:one-signal onesignal_create_notification '{"app_id":"example_app_id","contents":"example_contents","headings":"example_headings","included_segments":"example_included_segments","url":"example_url","data":"example_data"}' --json

one-signal.onesignal_list_devices

Read read

List devices (players) registered in a OneSignal app. Returns device identifiers, platform, session counts, and tags. Use limit and offset for pagination.

Parameters
app_id, limit, offset

Generic CLI call

kosmo integrations:call one-signal.onesignal_list_devices '{"app_id":"example_app_id","limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:one-signal onesignal_list_devices '{"app_id":"example_app_id","limit":1,"offset":1}' --json

one-signal.onesignal_get_device

Read read

Get details of a specific OneSignal device (player) by its ID. Returns push token, platform, session data, tags, and more.

Parameters
id, app_id

Generic CLI call

kosmo integrations:call one-signal.onesignal_get_device '{"id":"example_id","app_id":"example_app_id"}' --json

Provider shortcut

kosmo integrations:one-signal onesignal_get_device '{"id":"example_id","app_id":"example_app_id"}' --json

one-signal.onesignal_list_apps

Read read

List all OneSignal apps accessible with the configured REST API key. Returns app names, IDs, player counts, and configuration.

Parameters
none

Generic CLI call

kosmo integrations:call one-signal.onesignal_list_apps '{}' --json

Provider shortcut

kosmo integrations:one-signal onesignal_list_apps '{}' --json

one-signal.onesignal_get_current_app

Read read

Get details of a specific OneSignal app by its ID. Returns app configuration, player counts, and platform settings.

Parameters
app_id

Generic CLI call

kosmo integrations:call one-signal.onesignal_get_current_app '{"app_id":"example_app_id"}' --json

Provider shortcut

kosmo integrations:one-signal onesignal_get_current_app '{"app_id":"example_app_id"}' --json

Function Schemas

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.

Operation
Read read
Schema command
kosmo integrations:schema one-signal.onesignal_list_notifications --json
ParameterTypeRequiredDescription
app_id string yes The OneSignal app ID to list notifications for.
limit integer no Maximum number of notifications to return (default: 50, max: 50).
offset integer no Offset for pagination (default: 0).

one-signal.onesignal_get_notification

Get details of a specific OneSignal push notification by its ID. Returns full notification data including content, delivery stats, and targeting.

Operation
Read read
Schema command
kosmo integrations:schema one-signal.onesignal_get_notification --json
ParameterTypeRequiredDescription
id string yes The notification ID to retrieve.
app_id string yes The OneSignal app ID the notification belongs to.

one-signal.onesignal_create_notification

Send a new push notification via OneSignal. Specify message contents (per language), optional headings, target segments, a click URL, and a custom data payload.

Operation
Write write
Schema command
kosmo integrations:schema one-signal.onesignal_create_notification --json
ParameterTypeRequiredDescription
app_id string yes 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.

Operation
Read read
Schema command
kosmo integrations:schema one-signal.onesignal_list_devices --json
ParameterTypeRequiredDescription
app_id string yes The OneSignal app ID to list devices for.
limit integer no Maximum number of devices to return (default: 50, max: 300).
offset integer no Offset for pagination (default: 0).

one-signal.onesignal_get_device

Get details of a specific OneSignal device (player) by its ID. Returns push token, platform, session data, tags, and more.

Operation
Read read
Schema command
kosmo integrations:schema one-signal.onesignal_get_device --json
ParameterTypeRequiredDescription
id string yes The device/player ID to retrieve.
app_id string yes The OneSignal app ID the device belongs to.

one-signal.onesignal_list_apps

List all OneSignal apps accessible with the configured REST API key. Returns app names, IDs, player counts, and configuration.

Operation
Read read
Schema command
kosmo integrations:schema one-signal.onesignal_list_apps --json
ParameterTypeRequiredDescription
No parameters.

one-signal.onesignal_get_current_app

Get details of a specific OneSignal app by its ID. Returns app configuration, player counts, and platform settings.

Operation
Read read
Schema command
kosmo integrations:schema one-signal.onesignal_get_current_app --json
ParameterTypeRequiredDescription
app_id string yes The OneSignal app ID to retrieve.

Permissions

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.