{ "opencollection": "1.0.0", "info": { "name": "OneSignal Notifications API", "version": "5.5.0" }, "items": [ { "info": { "name": "Notifications", "type": "folder" }, "items": [ { "info": { "name": "View notifications", "type": "http" }, "http": { "method": "GET", "url": "https://api.onesignal.com/notifications", "params": [ { "name": "app_id", "value": "", "type": "query", "description": "The app ID that you want to view notifications from" }, { "name": "limit", "value": "", "type": "query", "description": "How many notifications to return. Max is 50. Default is 50." }, { "name": "offset", "value": "", "type": "query", "description": "Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at." }, { "name": "kind", "value": "", "type": "query", "description": "Kind of notifications returned:\n * unset - All notification types (default)\n * `0` - Dashboard only\n * `1` - API only\n * `3` - Automated only\n" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "View the details of multiple notifications" }, { "info": { "name": "Create notification", "type": "http" }, "http": { "method": "POST", "url": "https://api.onesignal.com/notifications", "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Sends notifications to your users.\n\n**Target by External ID (push example):** set `include_aliases` to `{ \"external_id\": [\"your-user-id\"] }` and set `target_channel` to `push` (or `email` / `sms` for those channels). Alias object keys must match API labels exactly (for example `external_id`, not camelCase).\n\n**Do not confuse** the notification-level `external_id` field with External ID targeting: top-level `external_id` / `idempotency_key` are for idempotent notification requests only, not for s" }, { "info": { "name": "View notification", "type": "http" }, "http": { "method": "GET", "url": "https://api.onesignal.com/notifications/:notification_id", "params": [ { "name": "app_id", "value": "", "type": "query" }, { "name": "notification_id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "View the details of a single notification and outcomes associated with it" }, { "info": { "name": "Stop a scheduled or currently outgoing notification", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.onesignal.com/notifications/:notification_id", "params": [ { "name": "app_id", "value": "", "type": "query" }, { "name": "notification_id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Used to stop a scheduled or currently outgoing notification" }, { "info": { "name": "Notification History", "type": "http" }, "http": { "method": "POST", "url": "https://api.onesignal.com/notifications/:notification_id/history", "params": [ { "name": "notification_id", "value": "", "type": "path", "description": "The \"id\" of the message found in the Notification object" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "-> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequ" }, { "info": { "name": "Export CSV of Events", "type": "http" }, "http": { "method": "POST", "url": "https://api.onesignal.com/notifications/:notification_id/export_events?app_id=:app_id", "params": [ { "name": "notification_id", "value": "", "type": "path", "description": "The ID of the notification to export events from." }, { "name": "app_id", "value": "", "type": "query", "description": "The ID of the app that the notification belongs to." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Generate a compressed CSV report of all of the events data for a notification.\nThis will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time." } ] } ], "bundled": true }