Create or update an alias for a user using a known subscription ID.

Overview

Use this API to add or update aliases associated with a user when you only know at least one subscription ID. This API is handy for scenarios where the user's identity is unknown, but a subscription is available.

To remove an alias, see Delete alias API.


How to use this API

You must know the subscription_id of the subscription that belongs to the user in which you want to update. Subscription IDs are UUIDs generated by OneSignal and cannot change. See Subscriptions for details.

This endpoint performs an upsert—if the user already has an alias with the specified alias label, it gets updated; otherwise, a new alias will be created.

The request body must include an identity object containing one or more aliases to be created or updated.

The OneSignal ID is read-only and used only for fetching. See Users for details.

Aliases are updated immediately upon request.


Language