Documentation Index
Fetch the complete documentation index at: https://documentation.onesignal.com/llms.txt
Use this file to discover all available pages before exploring further.
Update a player’s (Subscription’s) information using the External ID.
Path Parameters
| Parameter | Type | Required | Description |
|---|
app_id | string | Yes | Your OneSignal App ID. |
external_user_id | string | Yes | The user’s External ID. |
| Header | Value | Required | Description |
|---|
Authorization | Basic YOUR_LEGACY_REST_API_KEY | Yes | Your Legacy OneSignal API key. |
Content-Type | application/json | Yes | The content type of the request. |
Request Body Parameters
| Field | Type | Required | Description |
|---|
tags | object | Yes | Key-value pairs to set or update. |
- To delete a tag, set its value to an empty string (
"").
- Existing tags with the same keys will be overwritten.
Example Request
PATCH /api/v1/apps/your_app_id/users/user123 HTTP/1.1
Host: onesignal.com
Authorization: Basic YOUR_LEGACY_REST_API_KEY
Content-Type: application/json
{
"tags": {
"plan": "premium",
"logged_in": "true",
"referral": ""
}
}
Response
Errors
- 400 Bad Request – Invalid request or payload.
- 401 Unauthorized – Invalid or missing keys.
- 403 Forbidden – Access denied due to insufficient permissions.
- 404 Not Found – No players found for given
external_user_id.