Analytics - Write Character Event
Writes a character-based event into PlayStream.
POST https://titleId.playfabapi.com/Client/WriteCharacterEvent
Request Header
Name | Required | Type | Description |
---|---|---|---|
X-Authorization | True |
|
This API requires a client session ticket, available from any Client Login function. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
CharacterId | True |
|
Unique PlayFab assigned ID for a specific character owned by a user |
EventName | True |
|
The name of the event, within the namespace scoped to the title. The naming convention is up to the caller, but it commonly follows the subject_verb_object pattern (e.g. player_logged_in). |
Body |
|
Custom event properties. Each property consists of a name (string) and a value (JSON object). |
|
CustomTags |
|
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). |
|
Timestamp |
|
The time (in UTC) associated with this event. The value defaults to the current time. |
Responses
Name | Type | Description |
---|---|---|
200 OK | ||
400 Bad Request |
This is the outer wrapper for all responses with errors |
Security
X-Authorization
This API requires a client session ticket, available from any Client Login function.
Type:
apiKey
In:
header
Definitions
Api |
The basic wrapper around every failed API response |
Write |
This API is designed to write a multitude of different client-defined events into PlayStream. It supports a flexible JSON schema, which allowsfor arbitrary key-value pairs to describe any character-based event. The created event will be locked to the authenticated title and player. |
Write |
ApiErrorWrapper
The basic wrapper around every failed API response
Name | Type | Description |
---|---|---|
code |
|
Numerical HTTP code |
error |
|
Playfab error code |
errorCode |
|
Numerical PlayFab error code |
errorDetails |
|
Detailed description of individual issues with the request object |
errorMessage |
|
Description for the PlayFab errorCode |
status |
|
String HTTP code |
WriteClientCharacterEventRequest
This API is designed to write a multitude of different client-defined events into PlayStream. It supports a flexible JSON schema, which allowsfor arbitrary key-value pairs to describe any character-based event. The created event will be locked to the authenticated title and player.
Name | Type | Description |
---|---|---|
Body |
|
Custom event properties. Each property consists of a name (string) and a value (JSON object). |
CharacterId |
|
Unique PlayFab assigned ID for a specific character owned by a user |
CustomTags |
|
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). |
EventName |
|
The name of the event, within the namespace scoped to the title. The naming convention is up to the caller, but it commonly follows the subject_verb_object pattern (e.g. player_logged_in). |
Timestamp |
|
The time (in UTC) associated with this event. The value defaults to the current time. |
WriteEventResponse
Name | Type | Description |
---|---|---|
EventId |
|
The unique identifier of the event. The values of this identifier consist of ASCII characters and are not constrained to any particular format. |
Error Codes
Name | Code |
---|---|
CharacterNotFound | 1135 |
InvalidEventField | 1216 |
NoWritePermissionsForEvent | 1207 |