OneSignal Apps API
The Apps API from OneSignal — 21 operation(s) for apps.
Operations 42
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Ask an LLM
“Which OneSignal apps does my organization have?”
“Can I see the subscriber counts for every app I manage at once?”
Tell an agent
List all of my OneSignal apps with their app IDs and subscriber counts.
Show every app on my account and when each was created.
Ask an LLM
“How do I create a new OneSignal app through the API?”
“What do I need to set up web push when creating an app?”
Tell an agent
Create a new app called {name} in organization {organization_id}.
Create app {name} under organization {organization_id} with web push for site {chrome_web_origin}.
Ask an LLM
“What settings and platform configuration does a single app have?”
“Can I look up one app's details by its app ID?”
Tell an agent
Show me the details of app {app_id}.
Get app {app_id} and tell me its name and subscriber count.
Ask an LLM
“How do I rename an existing app?”
“Can I replace the APNs or FCM credentials on an app I already created?”
Tell an agent
Rename app {app_id} to {name}.
Change the APNs environment on existing app {app_id} to {apns_env}.
Ask an LLM
“How do I build a new audience segment with filters?”
“Can I define a segment by tags or activity rules through the API?”
Tell an agent
Create a segment named {name} in app {app_id} using filters {filters}.
Add a new segment {name} to app {app_id} with filters {filters} and description {description}.
Ask an LLM
“What audience segments exist in my app?”
“Can I page through segments if my app has a lot of them?”
Tell an agent
List all segments in app {app_id}.
Show {limit} segments from app {app_id} starting at offset {offset}.
Ask an LLM
“How many subscribers are in a particular segment right now?”
“Can I see the filters behind a single segment?”
Tell an agent
Show me segment {segment_id} in app {app_id}.
Get segment {segment_id} from app {app_id} including its filters and metadata.
PATCH
/apps/{app_id}/segments/{segment_id}
Rename or change the filters of a segment · Update segment
#
Ask an LLM
“If I change a segment's filters, are the old filters replaced or merged?”
“Can I rename an existing segment without recreating it?”
Tell an agent
Rename segment {segment_id} in app {app_id} to {name}.
Replace the filters on existing segment {segment_id} in app {app_id} with {filters}, keeping the name {name}.
Ask an LLM
“Does deleting a segment also remove the users in it?”
“How do I get rid of a segment I no longer use?”
Tell an agent destructive · confirm first
Delete segment {segment_id} from app {app_id}.
Remove the unused segment {segment_id} in app {app_id}, keeping its users.
GET
/apps/{app_id}/outcomes?outcome_names={outcome_names}&outcome_time_range={outcome_time_range}&outcome_platforms={outcome_platforms}&outcome_attribution={outcome_attribution}
View outcome metrics for an app · View outcomes
#
Ask an LLM
“How many clicks and conversions did my push notifications drive?”
“Can I filter outcome metrics by platform or attribution type?”
Tell an agent
Show outcomes {outcome_names} for app {app_id} over {outcome_time_range}.
Report outcome {outcome_names} for app {app_id} on platforms {outcome_platforms} with {outcome_attribution} attribution.
PATCH
/apps/{app_id}/subscriptions/{subscription_id}
Update a subscription by its ID · Update subscription
#
Ask an LLM
“How do I disable a subscription when I know its subscription ID?”
“Can I re-enable a subscription from my backend instead of through the SDK?”
Tell an agent
Update subscription {subscription_id} in app {app_id} with {subscription}.
Disable subscription ID {subscription_id} in app {app_id}.
Ask an LLM
“How do I stop sending messages to one specific device or email subscription?”
“If I delete a subscription, can the same token subscribe again later?”
Tell an agent destructive · confirm first
Delete subscription {subscription_id} from app {app_id}.
Permanently remove subscription {subscription_id} in app {app_id} so it gets no more messages.
PATCH
/apps/{app_id}/subscriptions_by_token/{token_type}/{token}
Update a subscription by its push token or address · Update subscription By Token
#
Ask an LLM
“Can I update a subscription when I only have its push token or email address?”
“How do I turn off a subscription identified by token type and token?”
Tell an agent
Disable the {token_type} subscription with token {token} in app {app_id}.
Update the subscription for {token_type} token {token} in app {app_id} with {subscription}.
POST
/apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions
Add a subscription to an existing user · Create Subscription by alias
#
Ask an LLM
“How do I attach an email or SMS subscription to a user I already have?”
“Can I add a new push subscription to a user identified by their external ID?”
Tell an agent
Add subscription {subscription} to the user with {alias_label} {alias_id} in app {app_id}.
Attach a new email subscription {subscription} to user {alias_id} (by {alias_label}) in app {app_id}.
PATCH
/apps/{app_id}/users/by/{alias_label}/{alias_id}
Update a user's properties and tags · Update user
#
Ask an LLM
“How do I change tags or language on an existing user?”
“Can I increment a user's session count or purchase totals with deltas?”
Tell an agent
Set properties {properties} on the user with {alias_label} {alias_id} in app {app_id}.
Apply deltas {deltas} to user {alias_id} by {alias_label} in app {app_id}.
GET
/apps/{app_id}/users/by/{alias_label}/{alias_id}
View a user with their properties and subscriptions · View user
#
Ask an LLM
“What properties, tags and subscriptions does a given user have?”
“Can I look up a user by their external ID?”
Tell an agent
Show me the user with {alias_label} {alias_id} in app {app_id}.
Get the full profile and subscriptions of user {alias_id} by {alias_label} in app {app_id}.
DELETE
/apps/{app_id}/users/by/{alias_label}/{alias_id}
Delete a user and all their subscriptions · Delete user
#
Ask an LLM
“How do I completely delete a user and everything attached to them?”
“Does deleting a user also remove their subscriptions and aliases?”
Tell an agent destructive · confirm first
Delete the user with {alias_label} {alias_id} from app {app_id}.
Erase user {alias_id} (by {alias_label}) in app {app_id} along with their subscriptions and identity.
Ask an LLM
“How do I create a new user along with their email and push subscriptions?”
“Can I register a user with an external ID and tags in one call?”
Tell an agent
Create a user in app {app_id} with identity {identity}.
Create a new user in app {app_id} with identity {identity} and subscriptions {subscriptions}.
GET
/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity
Look up all aliases for a user from one alias · View user identity
#
Ask an LLM
“Given a user's external ID, how do I find their OneSignal ID and other aliases?”
“Which identities are linked to a user I know by one alias?”
Tell an agent
List every alias for the user with {alias_label} {alias_id} in app {app_id}.
Map user {alias_id} (known by {alias_label}) in app {app_id} to their full identity.
PATCH
/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity
Add or update aliases on a user by alias · Create or update alias
#
Ask an LLM
“How do I add a custom alias to a user I already know by external ID?”
“Can I update several aliases on a user's identity at once?”
Tell an agent
Add aliases {identity} to the user with {alias_label} {alias_id} in app {app_id}.
Upsert identity {identity} for user {alias_id} found by {alias_label} in app {app_id}.
PATCH
/apps/{app_id}/subscriptions/{subscription_id}/owner
Move a subscription to a different user · Transfer subscription
#
Ask an LLM
“How do I reassign a push or email subscription to another user?”
“Can a subscription be transferred to a new user identity within the same app?”
Tell an agent
Transfer subscription {subscription_id} in app {app_id} to the user with identity {identity}.
Change the owner of subscription {subscription_id} in app {app_id} to {identity}.
GET
/apps/{app_id}/subscriptions/{subscription_id}/user/identity
Look up a user's aliases from a subscription ID · View user identity (by subscription)
#
Ask an LLM
“Who owns this subscription, and what are their aliases?”
“Can I find a user's external ID when all I have is a subscription ID?”
Tell an agent
Show the aliases of the user who owns subscription {subscription_id} in app {app_id}.
Find the identity behind subscription {subscription_id} in app {app_id}.
PATCH
/apps/{app_id}/subscriptions/{subscription_id}/user/identity
Add an alias to a user via their subscription ID · Create alias (by subscription)
#
Ask an LLM
“How do I set an external ID on a user when I only know one of their subscription IDs?”
“Can I create an alias through a subscription instead of an existing alias?”
Tell an agent
Add alias {identity} to the user owning subscription {subscription_id} in app {app_id}.
Using subscription {subscription_id} in app {app_id}, set that user's identity to include {identity}.
DELETE
/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete}
Remove an alias from a user · Delete alias
#
Ask an LLM
“How do I remove one alias from a user without deleting the user?”
“Can I drop a custom alias label from someone's identity?”
Tell an agent destructive · confirm first
Remove the {alias_label_to_delete} alias from the user with {alias_label} {alias_id} in app {app_id}.
Delete alias label {alias_label_to_delete} from user {alias_id} (by {alias_label}) in app {app_id}.
POST
/apps/{app_id}/notifications/{notification_id}/unsubscribe?token={token}
Unsubscribe an email address from a custom page · Unsubscribe email (with token)
#
Ask an LLM
“How does my own unsubscribe page opt someone out of emails?”
“What token do I need to unsubscribe an email recipient from a specific message?”
Tell an agent
Unsubscribe the email recipient with token {token} from message {notification_id} in app {app_id}.
Process an unsubscribe from my custom landing page for notification {notification_id} in app {app_id}.
POST
/apps/{app_id}/live_activities/{activity_id}/notifications
Update or end a running iOS Live Activity · Update Live Activity
#
Ask an LLM
“How do I push new content to a Live Activity that's already running?”
“Can I end a Live Activity remotely and set when it gets dismissed?”
Tell an agent
Update Live Activity {activity_id} in app {app_id} with {event_updates}, named {name}, event {event}.
End Live Activity {activity_id} in app {app_id} with event {event}, final state {event_updates}, name {name}, dismissed at {dismissal_date}.
POST
/apps/{app_id}/activities/activity/{activity_type}
Start a Live Activity on users' iOS devices · Start Live Activity
#
Ask an LLM
“Can I remotely start an iOS Live Activity without the user opening my app?”
“Which users or segments can I target when starting a Live Activity?”
Tell an agent
Start a {activity_type} Live Activity {activity_id} in app {app_id} for segments {included_segments}.
Launch Live Activity type {activity_type} in app {app_id} with heading {headings} and message {contents}.
POST
/apps/{app_id}/inbox
Broadcast a message to users' in-app inboxes · Create inbox broadcast message
#
Ask an LLM
“How do I post a message to every user's in-app inbox?”
“Can I schedule an inbox broadcast to appear later?”
Tell an agent
Broadcast inbox message {name} with subject {subjects} to app {app_id}.
Schedule inbox broadcast {name} in app {app_id} with subject {subjects} for {send_after}.
GET
/apps/{app_id}/inbox?last_broadcast_id={broadcast_id}&limit={number}
List inbox broadcasts sent by an app · View broadcasts
#
Ask an LLM
“What inbox broadcasts has my app sent to its audience?”
“Can I page through older inbox broadcasts after a given one?”
Tell an agent
List the inbox broadcasts for app {app_id}.
Show {limit} inbox broadcasts in app {app_id} after broadcast {last_broadcast_id}.
GET
/apps/{app_id}/users/by/{alias_label}/{alias_id}/inbox?last_message_id={message_id}
List the inbox messages one user received · View user broadcasts
#
Ask an LLM
“Which inbox messages has a specific user received?”
“Can I see one person's inbox history starting after a certain message?”
Tell an agent
Show the inbox messages for user {alias_id} by {alias_label} in app {app_id} after message {last_message_id}.
List what's in the inbox of the user with {alias_label} {alias_id} in app {app_id}, after {last_message_id}.
PATCH
/apps/{app_id}/users/by/{alias_label}/{alias_id}/inbox?last_message_id={message_id}
Mark many inbox messages read or deleted for a user · Bulk update or delete message state
#
Ask an LLM
“How do I mark all of a user's inbox messages as read at once?”
“Can I clear a user's whole inbox in a single request?”
Tell an agent
Mark all inbox messages as read for the user with {alias_label} {alias_id} in app {app_id}.
Set is_deleted to {is_deleted} on every inbox message up to {last_message_id} for user {alias_id} by {alias_label} in app {app_id}.
GET
/apps/{app_id}/users/by/{alias_label}/{alias_id}/inbox/unread_count
Count a user's unread inbox messages · View user unread message count
#
Ask an LLM
“How many unread inbox messages does a user have?”
“What number should I show on a user's inbox badge?”
Tell an agent
Get the unread inbox count for the user with {alias_label} {alias_id} in app {app_id}.
Tell me how many unread messages user {alias_id} (by {alias_label}) has in app {app_id}.
PATCH
/apps/{app_id}/users/by/{alias_label}/{alias_id}/inbox/{message_id}
Mark a single inbox message read, opened or deleted · Update message state
#
Ask an LLM
“How do I mark just one inbox message as opened?”
“Can I delete a single message from a user's inbox?”
Tell an agent
Mark inbox message {message_id} as read for the user with {alias_label} {alias_id} in app {app_id}.
Set is_opened to {is_opened} on message {message_id} for user {alias_id} by {alias_label} in app {app_id}.
Ask an LLM
“What API keys currently exist for my app?”
“Can I review the IP allowlist settings on my app's keys?”
Tell an agent
List all API keys for app {app_id}.
Show the Rich Authentication Tokens configured on app {app_id}.
Ask an LLM
“How do I generate a new REST API key for one of my apps?”
“Can I restrict a new app key to specific IP addresses?”
Tell an agent
Create an API key named {name} for app {app_id}.
Create key {name} on app {app_id} limited to IPs {ip_allowlist}.
Ask an LLM
“How do I revoke an app API key I no longer need?”
“Do I delete a key by its token value or by its ID?”
Tell an agent destructive · confirm first
Delete API key {token_id} from app {app_id}.
Revoke key ID {token_id} on app {app_id} permanently.
PATCH
/apps/{app_id}/auth/tokens/{token_id}
Rename an API key or change its IP allowlist · Update API key
#
Ask an LLM
“Can I change the IP allowlist on an existing app key?”
“How do I rename an API key without rotating it?”
Tell an agent
Rename API key {token_id} on app {app_id} to {name}.
Set the IP allowlist of key {token_id} in app {app_id} to {ip_allowlist}.
POST
/apps/{app_id}/auth/tokens/{token_id}/rotate
Rotate a compromised app API key · Rotate API key
#
Ask an LLM
“What should I do if an app API key has leaked?”
“Can I get a fresh secret for a key without creating a new one from scratch?”
Tell an agent destructive · confirm first
Rotate API key {token_id} on app {app_id}.
Issue a replacement secret for compromised key {token_id} in app {app_id}.
Ask an LLM
“How do I track purchases or milestones as custom events for my users?”
“Can custom events I send be used to trigger messaging?”
Tell an agent
Record custom events {events} for app {app_id}.
Log a completed purchase event {events} in app {app_id} through the custom_events endpoint.
Ask an LLM
“Can I pass several outcome names as an outcome_names[] array?”
“Why is my outcome data limited, and which API key does the outcomes report need?”
Tell an agent
Pull outcomes for app {app_id} with required outcome names {outcome_names}.
Fetch outcomes {outcome_names} plus array values {outcome_names_array} for app {app_id}.
POST
/apps/{app_id}/notifications/{notification_id}/unsubscribe
Unsubscribe an email with a token (legacy endpoint) · Unsubscribe with token
#
Ask an LLM
“Is there an older endpoint for opting out an email via its unsubscribe token?”
“Which call does the legacy custom unsubscribe landing page use?”
Tell an agent
Use the legacy endpoint to unsubscribe token {token} from notification {notification_id} in app {app_id}.
Opt out email token {token} for notification {notification_id}, app {app_id}, via the older unsubscribe call.
POST
/apps/{app_id}/integrations/custom_events
Record custom events through the integrations path · Create custom events
#
Ask an LLM
“Is there an integrations endpoint for sending custom events from a partner tool?”
“Can an integration push user actions as custom events?”
Tell an agent
Send custom events {events} to app {app_id} via the integrations endpoint.
Push integration events {events} into app {app_id}.