Player Data Management - Update Player Custom Properties

Updates the title-specific custom property values for a player

POST https://titleId.playfabapi.com/Admin/UpdatePlayerCustomProperties

Request Header

Name Required Type Description
X-SecretKey True

string

This API requires a title secret key, available to title admins, from PlayFab Game Manager.

Request Body

Name Required Type Description
PlayFabId True

string

Unique PlayFab assigned ID of the user on whom the operation will be performed.

Properties True

UpdateProperty[]

Collection of properties to be set for a player.

CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

ExpectedPropertiesVersion

number

Optional field used for concurrency control. One can ensure that the update operation will only be performed if the player's properties have not been updated by any other clients since last the version.

Responses

Name Type Description
200 OK

UpdatePlayerCustomPropertiesResult

400 Bad Request

ApiErrorWrapper

This is the outer wrapper for all responses with errors

Security

X-SecretKey

This API requires a title secret key, available to title admins, from PlayFab Game Manager.

Type: apiKey
In: header

Definitions

Name Description
ApiErrorWrapper

The basic wrapper around every failed API response

UpdatePlayerCustomPropertiesRequest

Performs an additive update of the custom properties for the specified player. In updating the player's custom properties, properties which already exist will have their values overwritten. No other properties will be changed apart from those specified in the call.

UpdatePlayerCustomPropertiesResult
UpdateProperty

ApiErrorWrapper

The basic wrapper around every failed API response

Name Type Description
code

integer

Numerical HTTP code

error

string

Playfab error code

errorCode

integer

Numerical PlayFab error code

errorDetails

object

Detailed description of individual issues with the request object

errorMessage

string

Description for the PlayFab errorCode

status

string

String HTTP code

UpdatePlayerCustomPropertiesRequest

Performs an additive update of the custom properties for the specified player. In updating the player's custom properties, properties which already exist will have their values overwritten. No other properties will be changed apart from those specified in the call.

Name Type Description
CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

ExpectedPropertiesVersion

number

Optional field used for concurrency control. One can ensure that the update operation will only be performed if the player's properties have not been updated by any other clients since last the version.

PlayFabId

string

Unique PlayFab assigned ID of the user on whom the operation will be performed.

Properties

UpdateProperty[]

Collection of properties to be set for a player.

UpdatePlayerCustomPropertiesResult

Name Type Description
PlayFabId

string

PlayFab unique identifier of the user whose properties were updated.

PropertiesVersion

number

Indicates the current version of a player's properties that have been set. This is incremented after updates and deletes. This version can be provided in update and delete calls for concurrency control.

UpdateProperty

Name Type Description
Name

string

Name of the custom property. Can contain Unicode letters and digits. They are limited in size.

Value

object

Value of the custom property. Limited to booleans, numbers, and strings.

Error Codes

Name Code
PlayerCustomPropertiesDuplicatePropertyName 19006
PlayerCustomPropertiesPropertyCountTooHigh 19005
PlayerCustomPropertiesPropertyNameIsInvalid 19001
PlayerCustomPropertiesPropertyNameTooLong 19000
PlayerCustomPropertiesStringPropertyValueTooLong 19002
PlayerCustomPropertiesValueIsInvalidType 19003
PlayerCustomPropertiesVersionMismatch 19004
ProductDisabledForTitle 1609