Request
To modify an existing user profile (for example, to change the icon or to set the preferred subtitle language), send a POST request to:
https://<host>:<port>/ups/v2/user/userprofiles/{profileId}/actions/update
If the user profile that is in use is a child profile, it cannot be modified. If the client makes this request while a child profile is in use, the request will fail.
By default the platform checks the parental PIN on this request. See Server-side PIN checks in PIN and parental control management.
The earlier version of this request, PUT /ups/v1/user/userprofiles/{profileId}, is deprecated. It takes the profile fields directly in the request body (not inside userProfile) and doesn't check the PIN.
Headers
-
Authorization– the client's access token, as a bearer token (Bearer <access token>). This is theaccess_tokenthat the client gets when it signs in – see Authentication token. This header is mandatory. -
Content-Type: application/json -
x-correlation-id– identifier for logging, to correlate messages across a call flow
Mandatory arguments
-
profileId(in URL) – the ID of the profile to be modified -
userProfile(in body) – the fields to change. For the fields a profile can have, see User profile fields in Creating a user profile. Only the fields that you include are changed. The other fields keep their values.
Other arguments
-
pin(in body) – the PIN that the user entered. Required when the platform checks the PIN (the default). Otherwise it is ignored.
Example
A request with this payload changes the profile's preferred subtitle language:
{
"pin": "1234",
"userProfile": {
"preferredSubtitleLanguage": "fra"
}
}
Response
A successful request returns an HTTP 200 status, for example:
{
"matchedCount": 1,
"modifiedCount": 1
}
A bad request returns an HTTP 400 status – for example:
-
"errorCode": 4106– a PIN is required but the request has nopin. -
"errorCode": 8133– the request body has nouserProfile. -
"errorCode": 8124– the profile is a child profile, it has noratingsThresholds, and the request doesn't add any. -
"errorCode": 8121– a ratings body or threshold inratingsThresholdsis not one that is already set up in the deployment.
An unauthorised request returns an HTTP 401 status ("errorCode": 1001) if the account has no PIN of the type that is checked.
A forbidden request returns an HTTP 403 status – for example, if the PIN is wrong ("errorCode": 4566), if the PIN is locked or only a limited number of attempts are left ("errorCode": 7123), or if the access token is missing, invalid, or has expired.
If the profile does not exist, the request returns an HTTP 404 status ("errorCode": 8128).
See also
For full details of this API, see the User Profiles Service (UPS) API documentation.