{ "opencollection": "1.0.0", "info": { "name": "OneSignal Apps API", "version": "5.5.0" }, "items": [ { "info": { "name": "Apps", "type": "folder" }, "items": [ { "info": { "name": "View apps", "type": "http" }, "http": { "method": "GET", "url": "https://api.onesignal.com/apps", "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "View the details of all of your current OneSignal apps" }, { "info": { "name": "Create an app", "type": "http" }, "http": { "method": "POST", "url": "https://api.onesignal.com/apps", "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Creates a new OneSignal app" }, { "info": { "name": "View an app", "type": "http" }, "http": { "method": "GET", "url": "https://api.onesignal.com/apps/:app_id", "params": [ { "name": "app_id", "value": "", "type": "path", "description": "An app id" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "View the details of a single OneSignal app" }, { "info": { "name": "Update an app", "type": "http" }, "http": { "method": "PUT", "url": "https://api.onesignal.com/apps/:app_id", "params": [ { "name": "app_id", "value": "", "type": "path", "description": "An app id" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Updates the name or configuration settings of an existing OneSignal app" }, { "info": { "name": "Get Segments", "type": "http" }, "http": { "method": "GET", "url": "https://api.onesignal.com/apps/:app_id/segments", "params": [ { "name": "app_id", "value": "", "type": "path", "description": "The OneSignal App ID for your app. Available in Keys & IDs." }, { "name": "offset", "value": "", "type": "query", "description": "Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments." }, { "name": "limit", "value": "", "type": "query", "description": "The amount of Segments in the response. Maximum 300." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns an array of segments from an app." }, { "info": { "name": "Create Segment", "type": "http" }, "http": { "method": "POST", "url": "https://api.onesignal.com/apps/:app_id/segments", "params": [ { "name": "app_id", "value": "", "type": "path", "description": "The OneSignal App ID for your app. Available in Keys & IDs." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Create a segment visible and usable in the dashboard and API - Required: OneSignal Paid Plan\nThe Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's.\n🚧\nDoes Not Update Segments\nThis endpoint will only create segments, it does not edit or update currently created Segments. You will need to use th" }, { "info": { "name": "Delete Segment", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.onesignal.com/apps/:app_id/segments/:segment_id", "params": [ { "name": "app_id", "value": "", "type": "path", "description": "The OneSignal App ID for your app. Available in Keys & IDs." }, { "name": "segment_id", "value": "", "type": "path", "description": "The segment_id can be found in the URL of the segment when viewing it in the dashboard." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Delete a segment (not user devices) - Required: OneSignal Paid Plan\nYou can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app.\nThe segment_id can be found in the URL of the segment when viewing it in the dashboard.\n" }, { "info": { "name": "View Outcomes", "type": "http" }, "http": { "method": "GET", "url": "https://api.onesignal.com/apps/:app_id/outcomes", "params": [ { "name": "app_id", "value": "", "type": "path", "description": "The OneSignal App ID for your app. Available in Keys & IDs." }, { "name": "outcome_names", "value": "", "type": "query", "description": "Required\nComma-separated list of names and the value (sum/count) for the returned outcome data.\nNote: Clicks only support count aggregation.\nFor out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user.\nExample:os__session_duration.count,os__click.count,CustomOutcomeName.sum\n" }, { "name": "outcome_names[]", "value": "", "type": "query", "description": "Optional\nIf outcome names contain any commas, then please specify only one value at a time.\nExample: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count\nwhere \"Sales, Purchase\" is the custom outcomes with a comma in the name.\n" }, { "name": "outcome_time_range", "value": "", "type": "query", "description": "Optional\nTime range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data).\nDefault is 1h if the parameter is omitted.\n" }, { "name": "outcome_platforms", "value": "", "type": "query", "description": "Optional\nPlatform id. Refer device's platform ids for values.\nExample:\noutcome_platform=0 for iOS\noutcome_platform=7,8 for Safari and Firefox\nDefault is data from all platforms if the parameter is omitted.\n" }, { "name": "outcome_attribution", "value": "", "type": "query", "description": "Optional\nAttribution type for the outcomes. The values can be direct or influenced or unattributed.\nExample: outcome_attribution=direct\nDefault is total (returns direct+influenced+unattributed) if the parameter is omitted.\n" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "View the details of all the outcomes associated with your app\n\n🚧\nRequires Authentication Key\nRequires your OneSignal App's REST API Key, available in Keys & IDs.\n\n🚧\nOutcome Data Limitations\nOutcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it.\n" }, { "info": { "name": "Start Live Activity", "type": "http" }, "http": { "method": "POST", "url": "https://api.onesignal.com/apps/:app_id/activities/activity/:activity_type", "params": [ { "name": "app_id", "value": "", "type": "path", "description": "Your OneSignal App ID in UUID v4 format." }, { "name": "activity_type", "value": "", "type": "path", "description": "The name of the Live Activity defined in your app. This should match the attributes struct used in your app's Live Activity implementation." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Remotely start a Live Activity on iOS devices via OneSignal’s REST API." }, { "info": { "name": "Update a Live Activity via Push", "type": "http" }, "http": { "method": "POST", "url": "https://api.onesignal.com/apps/:app_id/live_activities/:activity_id/notifications", "params": [ { "name": "app_id", "value": "", "type": "path", "description": "The OneSignal App ID for your app. Available in Keys & IDs." }, { "name": "activity_id", "value": "", "type": "path", "description": "Live Activity record ID" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Updates a specified live activity." }, { "info": { "name": "create_user", "type": "http" }, "http": { "method": "POST", "url": "https://api.onesignal.com/apps/:app_id/users", "params": [ { "name": "app_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Creates a User, optionally Subscriptions owned by the User as well as Aliases.\nAliases provided in the payload will be used to look up an existing User." }, { "info": { "name": "get_user", "type": "http" }, "http": { "method": "GET", "url": "https://api.onesignal.com/apps/:app_id/users/by/:alias_label/:alias_id", "params": [ { "name": "app_id", "value": "", "type": "path" }, { "name": "alias_label", "value": "", "type": "path" }, { "name": "alias_id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns the User’s properties, Aliases, and Subscriptions." }, { "info": { "name": "update_user", "type": "http" }, "http": { "method": "PATCH", "url": "https://api.onesignal.com/apps/:app_id/users/by/:alias_label/:alias_id", "params": [ { "name": "app_id", "value": "", "type": "path" }, { "name": "alias_label", "value": "", "type": "path" }, { "name": "alias_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Updates an existing User’s properties." }, { "info": { "name": "delete_user", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.onesignal.com/apps/:app_id/users/by/:alias_label/:alias_id", "params": [ { "name": "app_id", "value": "", "type": "path" }, { "name": "alias_label", "value": "", "type": "path" }, { "name": "alias_id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases" }, { "info": { "name": "get_aliases", "type": "http" }, "http": { "method": "GET", "url": "https://api.onesignal.com/apps/:app_id/users/by/:alias_label/:alias_id/identity", "params": [ { "name": "app_id", "value": "", "type": "path" }, { "name": "alias_label", "value": "", "type": "path" }, { "name": "alias_id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Lists all Aliases for the User identified by (:alias_label, :alias_id)." }, { "info": { "name": "create_alias", "type": "http" }, "http": { "method": "PATCH", "url": "https://api.onesignal.com/apps/:app_id/users/by/:alias_label/:alias_id/identity", "params": [ { "name": "app_id", "value": "", "type": "path" }, { "name": "alias_label", "value": "", "type": "path" }, { "name": "alias_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id)." }, { "info": { "name": "delete_alias", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.onesignal.com/apps/:app_id/users/by/:alias_label/:alias_id/identity/:alias_label_to_delete", "params": [ { "name": "app_id", "value": "", "type": "path" }, { "name": "alias_label", "value": "", "type": "path" }, { "name": "alias_id", "value": "", "type": "path" }, { "name": "alias_label_to_delete", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Deletes an alias by alias label" }, { "info": { "name": "create_subscription", "type": "http" }, "http": { "method": "POST", "url": "https://api.onesignal.com/apps/:app_id/users/by/:alias_label/:alias_id/subscriptions", "params": [ { "name": "app_id", "value": "", "type": "path" }, { "name": "alias_label", "value": "", "type": "path" }, { "name": "alias_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User." }, { "info": { "name": "update_subscription", "type": "http" }, "http": { "method": "PATCH", "url": "https://api.onesignal.com/apps/:app_id/subscriptions/:subscription_id", "params": [ { "name": "app_id", "value": "", "type": "path" }, { "name": "subscription_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Updates an existing Subscription’s properties." }, { "info": { "name": "delete_subscription", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.onesignal.com/apps/:app_id/subscriptions/:subscription_id", "params": [ { "name": "app_id", "value": "", "type": "path" }, { "name": "subscription_id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Deletes the Subscription." }, { "info": { "name": "get_aliases_by_subscription", "type": "http" }, "http": { "method": "GET", "url": "https://api.onesignal.com/apps/:app_id/subscriptions/:subscription_id/user/identity", "params": [ { "name": "app_id", "value": "", "type": "path" }, { "name": "subscription_id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Lists all Aliases for the User identified by :subscription_id." }, { "info": { "name": "create_alias_by_subscription", "type": "http" }, "http": { "method": "PATCH", "url": "https://api.onesignal.com/apps/:app_id/subscriptions/:subscription_id/user/identity", "params": [ { "name": "app_id", "value": "", "type": "path" }, { "name": "subscription_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Upserts one or more Aliases for the User identified by :subscription_id." }, { "info": { "name": "transfer_subscription", "type": "http" }, "http": { "method": "PATCH", "url": "https://api.onesignal.com/apps/:app_id/subscriptions/:subscription_id/owner", "params": [ { "name": "app_id", "value": "", "type": "path" }, { "name": "subscription_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Transfers this Subscription to the User identified by the identity in the payload." }, { "info": { "name": "Update subscription by token", "type": "http" }, "http": { "method": "PATCH", "url": "https://api.onesignal.com/apps/:app_id/subscriptions_by_token/:token_type/:token", "params": [ { "name": "app_id", "value": "", "type": "path", "description": "Your OneSignal App ID in UUID v4 format." }, { "name": "token_type", "value": "", "type": "path", "description": "The type of token to use when looking up the subscription. See Subscription Types." }, { "name": "token", "value": "", "type": "path", "description": "The value of the token to lookup by (e.g., email address, phone number)." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Update properties on an existing OneSignal subscription using its token." }, { "info": { "name": "Unsubscribe with token", "type": "http" }, "http": { "method": "POST", "url": "https://api.onesignal.com/apps/:app_id/notifications/:notification_id/unsubscribe", "params": [ { "name": "app_id", "value": "", "type": "path", "description": "The OneSignal App ID for your app. Available in Keys & IDs." }, { "name": "notification_id", "value": "", "type": "path", "description": "The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report." }, { "name": "token", "value": "", "type": "query", "description": "The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Unsubscribe an email with a token when using your own custom email unsubscribe landing page" }, { "info": { "name": "View API keys", "type": "http" }, "http": { "method": "GET", "url": "https://api.onesignal.com/apps/:app_id/auth/tokens", "params": [ { "name": "app_id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "View the details of all of your current app API keys (Rich Authentication Token) for a single OneSignal app." }, { "info": { "name": "Create API key", "type": "http" }, "http": { "method": "POST", "url": "https://api.onesignal.com/apps/:app_id/auth/tokens", "params": [ { "name": "app_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Use this API to create a new App API Key (also called a Rich Authentication Token) for a specific OneSignal app. These keys are used to authenticate API requests at the app level and offer enhanced security features, including optional IP allowlisting." }, { "info": { "name": "Update API key", "type": "http" }, "http": { "method": "PATCH", "url": "https://api.onesignal.com/apps/:app_id/auth/tokens/:token_id", "params": [ { "name": "app_id", "value": "", "type": "path" }, { "name": "token_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Update a Rich Authentication Token (App API Key) for a OneSignal app." }, { "info": { "name": "Delete API key", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.onesignal.com/apps/:app_id/auth/tokens/:token_id", "params": [ { "name": "app_id", "value": "", "type": "path" }, { "name": "token_id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Delete a specific Rich Authentication Token (App API Key) for a OneSignal app. Requires your Organization API Key and the token’s unique ID, not the token value itself." }, { "info": { "name": "Rotate API key", "type": "http" }, "http": { "method": "POST", "url": "https://api.onesignal.com/apps/:app_id/auth/tokens/:token_id/rotate", "params": [ { "name": "app_id", "value": "", "type": "path" }, { "name": "token_id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Rotate a Rich Authentication Token (App API Key) for a OneSignal app. Rotating a key revokes the current token and generates a new one under the same configuration—ideal when a token is lost or compromised but you don’t want to recreate and reconfigure it from scratch." }, { "info": { "name": "Create custom events", "type": "http" }, "http": { "method": "POST", "url": "https://api.onesignal.com/apps/:app_id/integrations/custom_events", "params": [ { "name": "app_id", "value": "", "type": "path", "description": "Your OneSignal App ID in UUID v4 format." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "The Custom Events API allows you to record user events. Custom events can represent any action users take in your application, such as completing a purchase, viewing content, or achieving milestones." } ] } ], "bundled": true }