Update user
Modify a user’s properties.
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 updates user-level properties for an existing user in your OneSignal app.
- To change a user’s
identity
likeexternal_id
or custom Aliases, use the Create alias and Delete alias APIs. - To manage a user’s
subscriptions
, use the Create subscription (by alias) or Create user APIs.
How to use this API
You must supply an alias in the request path:
alias_label
: The type of identifier (e.g.,external_id
,onesignal_id
, or a custom alias label).alias_id
: The corresponding value for that label.
See Users and Aliases for more info.
Headers
Your App API key with prefix Key
. See Keys & IDs.
Optional. Identifies a specific subscription to update. Some user properties, such as Session Time and Session Count, will update values on both the User and the Subscription.
Path Parameters
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
The alias name or key to locate the user. Most commonly set as external_id
but can be the onesignal_id
or a custom alias.
The specific identifier for the given alias to identify the user.
Body
Response
202
The response is of type object
.