Update a player’s (Subscription’s) information using the Subscription ID.

This is a Legacy API. Use Update User or Update Subscription instead.


Path Parameters

ParameterTypeRequiredDescription
player_idstringYesThe OneSignal Subscription ID.

Headers

HeaderValueRequiredDescription
AuthorizationBasic YOUR_LEGACY_REST_API_KEYYesYour OneSignal Legacy REST API Key.
Content-Typeapplication/jsonYesThe content type of the request.

Request Body Parameters

FieldTypeRequiredDescription
app_idstringYesYour OneSignal App ID.
identifierstringNoPush token, email, or phone number.
languagestringNoLanguage code (e.g., “en”).
timezoneintegerNoTime zone offset in seconds.
game_versionstringNoApp version.
device_modelstringNoDevice model (e.g., “iPhone12,1”).
device_osstringNoOS version (e.g., “14.5”).
ad_idstringNoAdvertising ID.
sdkstringNoOneSignal SDK version.
tagsobjectNoCustom key-value pairs.
external_user_idstringNoYour internal user ID.
notification_typesintegerNo1 = subscribed, -2 = unsubscribed, 0 = no permission, etc.
email_auth_hashstringNoRequired to update email identifiers securely.
sms_auth_hashstringNoRequired to update SMS identifiers securely.

Only include fields you want to change. Fields left out will not be modified.


Example Request

PUT /api/v1/players/player_id_string HTTP/1.1
Host: onesignal.com
Authorization: Basic YOUR_REST_API_KEY
Content-Type: application/json

{
  "app_id": "your_app_id",
  "external_user_id": "user123",
  "tags": {
    "level": "20",
    "subscription": "active"
  },
  "language": "fr",
  "timezone": 3600,
  "device_os": "16.0"
}

Response

{
  "success": true
}

Errors

  • 400 Bad Request – Missing or invalid fields.
  • 401 Unauthorized – Invalid or missing API key.
  • 403 Forbidden – Access denied.
  • 404 Not Found – Device with player_id not found.