canonical: https://jentic.com/apis/onesignal.com/onesignal

# OneSignal API

This is a curated, agent-optimized Jentic specification, kept validated and agent-ready. OneSignal publishes its own OpenAPI document on its documentation site, a far larger file that splits notification creation into channel-specific paths, so this narrow entry is a deliberate trim rather than a substitute for it. The Jentic entry exposes the core POST /notifications endpoint for sending push, email, SMS, or in-app messages to registered users, segments, or specific subscription ids. The endpoint accepts the OneSignal app id, target audience parameters, message content, and channel-specific options, and returns the created notification id along with delivery counters.

## For AI agents

Send push notifications, email, SMS, and in-app messages to OneSignal audiences with a single notification creation endpoint.

## Scope

Does not handle subscription import, segment editing, or message analytics - use for OneSignal notification creation only.

## Capabilities

- Send push notifications to OneSignal segments or specific subscription ids
- Target users by tag filters when creating a notification
- Schedule a notification for future delivery via the send_after parameter
- Send multi-channel notifications including email and SMS through OneSignal
- Return delivery counters from the notification creation response

## Use cases

### Transactional Push Notifications

Send order updates, password resets, and account notifications to specific OneSignal subscription ids using POST /notifications. The endpoint accepts the app id, target subscription ids, headings, contents, and optional data payloads, returning the created notification id for tracking.

Example prompt: Send a push notification with heading 'Order shipped' and body 'Your order is on its way' to subscription id 'abc-123' under app id 'app-xyz'.

### Segment-Targeted Campaigns

Reach a curated audience of OneSignal subscribers by passing segment names or tag filters in the create-notification request. Segments are managed inside the OneSignal dashboard and referenced by name in the API call, so marketing teams can update audiences without redeploying code.

Example prompt: Send a notification to the 'Active Subscribers' segment with heading 'Weekly Update' and a deep link to the new content.

### Agent-Driven Push via Jentic

Customer engagement agents send OneSignal notifications through Jentic without holding the REST API key. The agent searches for the send-notification intent, loads the schema, and executes the call with the message content supplied by upstream tooling.

Example prompt: Use Jentic search 'send onesignal notification' to locate POST /notifications, load the schema, and execute with the supplied app id and content.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /notifications | Create a notification across push, email, SMS, or in-app channels |

## Key resources

- **Notifications** — Create push, email, SMS, and in-app notifications targeted to subscriptions, segments, or filters

## Why Jentic

- **Setup:** Wiring this OneSignal notification API by hand means managing its REST API key and building the notification-creation call against api.onesignal.com yourself. Through Jentic you install once, import the OneSignal API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** This OneSignal surface exposes a single notification-creation operation that takes its target in the request body, so you limit the agent to that one operation. It creates notifications and does nothing else unless you add operations to the allowed set.
- **Credential handling:** Your OneSignal REST API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'send a push notification through onesignal', and Jentic returns the POST /notifications operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **OneSignal API (full)** — The full OneSignal spec covering 55 endpoints including users, segments, apps, and analytics.
- **Pusher Beams** — Pusher Beams provides programmatic push notification delivery as an alternative platform.
- **Pushover API** — Pushover targets developer and personal use cases for simple push delivery.

## FAQ

### Which OpenAPI specification does this OneSignal API page describe?

A curated, agent-optimized Jentic specification covering one OneSignal operation, POST /notifications. OneSignal also publishes its own OpenAPI documentation at https://documentation.onesignal.com/openapi.json, version 11.6, which covers 39 paths and 55 operations across apps, notifications, users, and segments, and which selects the delivery channel with a query parameter on the notification path instead of one send path. The Jentic variant is deliberately narrow, exposing only the notification-creation call, so you can allow an agent that one operation and nothing else. Use the OneSignal document when the agent needs the wider surface. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the OneSignal API use?

The API uses an apiKey credential - the OneSignal REST API Key sent in the Authorization header. Through Jentic the key lives encrypted in the vault (your Jentic One instance) and the agent only ever holds a scoped reference.

### Can I send push notifications with this OneSignal spec?

Yes. POST /notifications accepts the app id, audience parameters such as segments or subscription ids, message content, and channel options, then queues the notification for delivery.

### How do I target a OneSignal segment via the API?

Pass an included_segments array in the POST /notifications body with the segment names defined in the OneSignal dashboard. Combine with filters for finer targeting.

### What are the rate limits for the OneSignal API?

Rate limits are not declared in this OpenAPI spec. Consult documentation.onesignal.com for current REST API rate limits before driving high-volume sends.

### How do I send a notification through Jentic?

Run pip install jentic, search 'send onesignal notification', then load the POST /notifications schema and execute with the app id and message content. Jentic injects the REST API key from its vault.

### Can I limit what my agent is allowed to do with the OneSignal API?

Yes. Because you run Jentic One yourself, your own rules decide which operations and credentials the agent may use. This OneSignal surface exposes a single notification-creation operation, POST /notifications, which takes its target audience in the request body, so you can allow the agent only that one call. It creates notifications and does nothing else unless you add more operations to the allowed set.
