If you are still using pre-User Model APIs or SDKs (Mobile SDKs version 4 or
lower, Web SDKs version 15 or lower), we recommend thorough testing of this
endpoint before switching to the new User Model. Discrepancies may occur where
the External ID set through the SDK and the External ID set through the API do
not generate matching OneSignal IDs. To ensure a smooth transition, consider
the following options:
- Update to the User Model SDKs: Upgrade to the latest User Model SDKs (Mobile SDK 5+, Web SDK 16+). For more details, refer to the User Model Migration Guide.
- Continue Using Pre-User Model APIs: If you are not ready to migrate, continue using the existing APIs for Adding a Device, Editing Tags with External User ID, and Editing a Device until the SDK migration is complete.
Overview
This endpoint enables you to create and manage users outside of frontendSDK-based sessions. It’s primarily used to:- Import users from other systems.
- Programmatically define users by assigning identifiers (aliases), properties (e.g., tags), and messaging subscriptions (e.g., email, mobile, SMS).
login
, addEmail
, and addSms
. See Users and Subscriptions for conceptual guidance.
How to use this API
To successfully create a user via the API:- You must provide at least one unique identifier via the
identity
and Subscription via thesubscriptions
fields. - You can optionally include user profile data (
properties
) and one or more messagingsubscriptions
.
Key Concepts
Aliases
Aliases uniquely identify a user and should include anexternal_id
(the recommended identifier). Up to 20 custom aliases are supported. They allow you to reference users across platforms or external systems.
Properties
User properties store information such as tags, location, activity, and device data. These attributes help you personalize campaigns and optimize engagement strategies.Subscriptions
A user can have up to 20 subscriptions (across email, SMS, push, etc.). Subscriptions connect users to channels for message delivery and are transferable across users. See Subscriptions for more.Path Parameters
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
Body
application/json
Represents user profile data for a given user, including tags, preferences, user activity, and other valuable properties.
Defines identifiers for the user. The external_id
must be used and should be unique across users.
The subscriptions object allows for creating or transferring subscriptions to a specified user. See Subscriptions.