Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.0.3
info:
version: '260922'
title: PlayFab Data API
description: Store arbitrary data associated with an entity. Objects are small (~1KB) JSON-compatible objects which are stored directly on the
entity profile. Objects are made available for use in other PlayFab contexts, such as PlayStream events and CloudScript functions. Files can
efficiently store data of any size or format. Both objects and files support a flexible permissions system to control read and write access
by other entities.
termsOfService: https://playfab.com/terms/
contact:
url: https://community.playfab.com/index.html
license:
name: Apache 2.0
url: https://github.com/PlayFab/API_Specs/blob/master/LICENSE
servers:
- url: https://{titleId}.playfabapi.com
variables:
titleId:
default: titleId
description: Unique PlayFab title identifier.
tags:
- name: File
description: File Management APIs
- name: Object
description: Entity Object Management APIs
paths:
/File/AbortFileUploads:
post:
operationId: AbortFileUploads
tags:
- File
description: Abort pending file uploads to an entity's profile.
externalDocs:
url: https://docs.microsoft.com/rest/api/playfab/data/file/abortfileuploads
security:
- EntityToken: []
x-requestDetails: Aborts the pending upload of the requested files.
x-seeAlso:
- File/DeleteFiles
- File/FinalizeFileUploads
- File/GetFiles
- File/InitiateFileUploads
x-ms-docs-errors:
- FileNotFound
- NoEntityFileOperationPending
parameters:
- type: object
description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves;
the shape is unknown and is NOT a claim about the API.
x-ae-placeholder: true
responses:
'200':
description: ''
'400':
description: ''
/File/DeleteFiles:
post:
operationId: DeleteFiles
tags:
- File
description: Delete files on an entity's profile.
externalDocs:
url: https://docs.microsoft.com/rest/api/playfab/data/file/deletefiles
security:
- EntityToken: []
x-requestDetails: Deletes the requested files from the entity's profile.
x-seeAlso:
- File/AbortFileUploads
- File/FinalizeFileUploads
- File/GetFiles
- File/InitiateFileUploads
x-ms-docs-errors:
- EntityFileOperationPending
- FileNotFound
parameters:
- type: object
description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves;
the shape is unknown and is NOT a claim about the API.
x-ae-placeholder: true
responses:
'200':
description: ''
'400':
description: ''
/File/FinalizeFileUploads:
post:
operationId: FinalizeFileUploads
tags:
- File
description: Finalize file uploads to an entity's profile.
externalDocs:
url: https://docs.microsoft.com/rest/api/playfab/data/file/finalizefileuploads
security:
- EntityToken: []
x-requestDetails: Finalizes the upload of the requested files. Verifies that the files have been successfully uploaded and moves the file
pointers from pending to live.
x-seeAlso:
- File/AbortFileUploads
- File/DeleteFiles
- File/GetFiles
- File/InitiateFileUploads
x-ms-docs-errors:
- FileNotFound
- NoEntityFileOperationPending
parameters:
- type: object
description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves;
the shape is unknown and is NOT a claim about the API.
x-ae-placeholder: true
responses:
'200':
description: ''
'400':
description: ''
/File/GetFiles:
post:
operationId: GetFiles
tags:
- File
description: Retrieves file metadata from an entity's profile.
externalDocs:
url: https://docs.microsoft.com/rest/api/playfab/data/file/getfiles
security:
- EntityToken: []
x-requestDetails: Returns URLs that may be used to download the files for a profile for a limited length of time. Only returns files that
have been successfully uploaded, files that are still pending will either return the old value, if it exists, or nothing.
x-seeAlso:
- File/AbortFileUploads
- File/DeleteFiles
- File/FinalizeFileUploads
- File/InitiateFileUploads
parameters:
- type: object
description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves;
the shape is unknown and is NOT a claim about the API.
x-ae-placeholder: true
responses:
'200':
description: ''
'400':
description: ''
/File/InitiateFileUploads:
post:
operationId: InitiateFileUploads
tags:
- File
description: Initiates file uploads to an entity's profile.
externalDocs:
url: https://docs.microsoft.com/rest/api/playfab/data/file/initiatefileuploads
security:
- EntityToken: []
x-requestDetails: Returns URLs that may be used to upload the files for a profile 5 minutes. After using the upload calls FinalizeFileUploads
must be called to move the file status from pending to live.
x-seeAlso:
- File/AbortFileUploads
- File/DeleteFiles
- File/FinalizeFileUploads
- File/GetFiles
x-ms-docs-errors:
- EntityFileOperationPending
parameters:
- type: object
description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves;
the shape is unknown and is NOT a claim about the API.
x-ae-placeholder: true
responses:
'200':
description: ''
'400':
description: ''
/Object/GetObjects:
post:
operationId: GetObjects
tags:
- Object
description: Retrieves objects from an entity's profile.
externalDocs:
url: https://docs.microsoft.com/rest/api/playfab/data/object/getobjects
security:
- EntityToken: []
x-requestDetails: 'Gets JSON objects from an entity profile and returns it. '
x-seeAlso:
- Object/SetObjects
parameters:
- type: object
description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves;
the shape is unknown and is NOT a claim about the API.
x-ae-placeholder: true
responses:
'200':
description: ''
'400':
description: ''
/Object/SetObjects:
post:
operationId: SetObjects
tags:
- Object
description: Sets objects on an entity's profile.
externalDocs:
url: https://docs.microsoft.com/rest/api/playfab/data/object/setobjects
security:
- EntityToken: []
x-requestDetails: 'Sets JSON objects on the requested entity profile. May include a version number to be used to perform optimistic concurrency
operations during update. If the current version differs from the version in the request the request will be ignored. If no version is
set on the request then the value will always be updated if the values differ. Using the version value does not guarantee a write though,
ConcurrentEditError may still occur if multiple clients are attempting to update the same profile. '
x-seeAlso:
- Object/GetObjects
x-ms-docs-errors:
- InvalidJSONContent
parameters:
- type: object
description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves;
the shape is unknown and is NOT a claim about the API.
x-ae-placeholder: true
responses:
'200':
description: ''
'400':
description: ''
components:
schemas:
ApiErrorWrapper:
description: The basic wrapper around every failed API response
type: object
properties:
code:
description: Numerical HTTP code
type: integer
status:
description: String HTTP code
type: string
error:
description: Playfab error code
type: string
errorCode:
description: Numerical PlayFab error code
type: integer
errorMessage:
description: Description for the PlayFab errorCode
type: string
errorDetails:
description: Detailed description of individual issues with the request object
type: object
required:
- code
- errorCode
AbortFileUploadsRequest:
description: Aborts the pending upload of the requested files.
type: object
properties:
CustomTags:
description: The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
type: object
Entity:
$ref: '#/components/schemas/EntityKey'
description: The entity to perform this action on.
type: object
x-isclass: true
FileNames:
description: Names of the files to have their pending uploads aborted.
type: array
items:
type: string
ProfileVersion:
description: Optional field used for concurrency control. By specifying the previously returned ProfileVersion value from the InitiateFileUploads
API or other APIs, you can ensure that the file upload abort operation is performed only if the profile has not been updated since
you last loaded that version. If the profile for the same entity has been updated, the operation will fail with an EntityProfileVersionMismatch
error. The conflicting update can be caused by any operation that modifies the entity profile, including SetObjects, FinalizeFileUploads,
and UpdateStatistics.
type: number
x-actualtype: int32
required:
- FileNames
- Entity
example:
FileNames:
- avatar
- game_state
Entity:
Id: ID
Type: title_player_account
TypeString: title_player_account
AbortFileUploadsResponse:
type: object
properties:
Entity:
$ref: '#/components/schemas/EntityKey'
description: The entity id and type.
type: object
x-isclass: true
ProfileVersion:
description: The current version of the profile, can be used for concurrency control during updates.
type: number
x-actualtype: int32
required:
- ProfileVersion
example:
ProfileVersion: 8
Entity:
Id: ID
Type: title_player_account
TypeString: title_player_account
DeleteFilesRequest:
description: Deletes the requested files from the entity's profile.
type: object
properties:
CustomTags:
description: The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
type: object
Entity:
$ref: '#/components/schemas/EntityKey'
description: The entity to perform this action on.
type: object
x-isclass: true
FileNames:
description: Names of the files to be deleted.
type: array
items:
type: string
ProfileVersion:
description: Optional field used for concurrency control. By specifying the previously returned ProfileVersion value from the GetFiles
API or other APIs, you can ensure that the file deletion is performed only if the profile has not been updated since you last loaded
that version. If the profile for the same entity has been updated, the operation will fail with an EntityProfileVersionMismatch error.
The conflicting update can be caused by any operation that modifies the entity profile, including SetObjects, FinalizeFileUploads,
and UpdateStatistics.
type: number
x-actualtype: int32
required:
- FileNames
- Entity
example:
FileNames:
- game_state
- avatar
Entity:
Id: ID
Type: title_player_account
TypeString: title_player_account
DeleteFilesResponse:
type: object
properties:
Entity:
$ref: '#/components/schemas/EntityKey'
description: The entity id and type.
type: object
x-isclass: true
ProfileVersion:
description: The current version of the profile, can be used for concurrency control during updates.
type: number
x-actualtype: int32
required:
- ProfileVersion
example:
ProfileVersion: 6
Entity:
Id: ID
Type: title_player_account
TypeString: title_player_account
EntityKey:
description: Combined entity type and ID structure which uniquely identifies a single entity.
type: object
properties:
Id:
description: Unique ID of the entity.
type: string
Type:
description: Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types
type: string
required:
- Id
FinalizeFileUploadsRequest:
description: Finalizes the upload of the requested files. Verifies that the files have been successfully uploaded and moves the file pointers
from pending to live.
type: object
properties:
CustomTags:
description: The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
type: object
Entity:
$ref: '#/components/schemas/EntityKey'
description: The entity to perform this action on.
type: object
x-isclass: true
FileNames:
description: Names of the files to be finalized. Restricted to a-Z, 0-9, '(', ')', '_', '-' and '.'
type: array
items:
type: string
ProfileVersion:
description: Field used for concurrency control. By specifying the previously returned ProfileVersion value from the InitiateFileUploads
API, you can ensure that the file upload finalization is performed only if the profile has not been updated since you last loaded
that version. If the profile for the same entity has been updated, the operation will fail with an EntityProfileVersionMismatch error.
The conflicting update can be caused by any operation that modifies the entity profile, including SetObjects, FinalizeFileUploads,
and UpdateStatistics.
type: number
x-actualtype: int32
required:
- ProfileVersion
- FileNames
- Entity
example:
FileNames:
- avatar
- game_state
Entity:
Id: ID
Type: title_player_account
TypeString: title_player_account
FinalizeFileUploadsResponse:
type: object
properties:
Entity:
$ref: '#/components/schemas/EntityKey'
description: The entity id and type.
type: object
x-isclass: true
Metadata:
$ref: '#/components/schemas/GetFileMetadata'
description: Collection of metadata for the entity's files
type: object
x-isclass: true
ProfileVersion:
description: The current version of the profile, can be used for concurrency control during updates.
type: number
x-actualtype: int32
required:
- ProfileVersion
GetFileMetadata:
type: object
properties:
Checksum:
description: Checksum value for the file, can be used to check if the file on the server has changed.
type: string
DownloadUrl:
description: Download URL where the file can be retrieved
type: string
FileName:
description: Name of the file
type: string
LastModified:
description: Last UTC time the file was modified
type: string
Size:
description: Storage service's reported byte count
type: number
x-actualtype: int32
required:
- Size
- LastModified
GetFilesRequest:
description: Returns URLs that may be used to download the files for a profile for a limited length of time. Only returns files that have
been successfully uploaded, files that are still pending will either return the old value, if it exists, or nothing.
type: object
properties:
CustomTags:
description: The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
type: object
Entity:
$ref: '#/components/schemas/EntityKey'
description: The entity to perform this action on.
type: object
x-isclass: true
required:
- Entity
example:
Entity:
Id: ID
Type: title_player_account
TypeString: title_player_account
GetFilesResponse:
type: object
properties:
Entity:
$ref: '#/components/schemas/EntityKey'
description: The entity id and type.
type: object
x-isclass: true
Metadata:
$ref: '#/components/schemas/GetFileMetadata'
description: Collection of metadata for the entity's files
type: object
x-isclass: true
ProfileVersion:
description: The current version of the profile, can be used for concurrency control during updates.
type: number
x-actualtype: int32
required:
- ProfileVersion
example:
ProfileVersion: 5
Metadata:
game_settings:
FileName: game_settings
DownloadUrl: https://...
Size: 5683
Checksum: 97129sdlkj9129
LastModified: '2017-12-05T17:36:05'
Entity:
Id: ID
Type: title_player_account
TypeString: title_player_account
GetObjectsRequest:
description: 'Gets JSON objects from an entity profile and returns it. '
type: object
properties:
CustomTags:
description: The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
type: object
Entity:
$ref: '#/components/schemas/EntityKey'
description: The entity to perform this action on.
type: object
x-isclass: true
EscapeObject:
description: Determines whether the object will be returned as an escaped JSON string or as a un-escaped JSON object. Default is JSON
object.
type: boolean
required:
- Entity
example:
Entity:
Id: ABC90712ABC
Type: title_player_account
TypeString: title_player_account
GetObjectsResponse:
type: object
properties:
Entity:
$ref: '#/components/schemas/EntityKey'
description: The entity id and type.
type: object
x-isclass: true
Objects:
$ref: '#/components/schemas/ObjectResult'
description: Requested objects that the calling entity has access to
type: object
x-isclass: true
ProfileVersion:
description: The current version of the profile, can be used for concurrency control during updates.
type: number
x-actualtype: int32
required:
- ProfileVersion
example:
ProfileVersion: 17
Objects:
gameState:
ObjectName: gameState
EscapedDataObject: '{ "Property": { "ValueName": 5 } }'
Entity:
Id: ABC1234ABC
Type: title_player_account
TypeString: title_player_account
InitiateFileUploadMetadata:
type: object
properties:
FileName:
description: Name of the file.
type: string
UploadUrl:
description: Location the data should be sent to via an HTTP PUT operation.
type: string
InitiateFileUploadsRequest:
description: Returns URLs that may be used to upload the files for a profile 5 minutes. After using the upload calls FinalizeFileUploads
must be called to move the file status from pending to live.
type: object
properties:
CustomTags:
description: The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
type: object
Entity:
$ref: '#/components/schemas/EntityKey'
description: The entity to perform this action on.
type: object
x-isclass: true
FileNames:
description: Names of the files to be set. Restricted to a-Z, 0-9, '(', ')', '_', '-' and '.'
type: array
items:
type: string
ProfileVersion:
description: Optional field used for concurrency control. By specifying the previously returned ProfileVersion value from the GetFiles
API or other APIs, you can ensure that the file upload initiation is performed only if the profile has not been updated since you
last loaded that version. If the profile for the same entity has been updated, the operation will fail with an EntityProfileVersionMismatch
error. The conflicting update can be caused by any operation that modifies the entity profile, including SetObjects, FinalizeFileUploads,
and UpdateStatistics.
type: number
x-actualtype: int32
required:
- FileNames
- Entity
example:
FileNames:
- avatar
- game_state
Entity:
Id: ID
Type: title_player_account
TypeString: title_player_account
InitiateFileUploadsResponse:
type: object
properties:
Entity:
$ref: '#/components/schemas/EntityKey'
description: The entity id and type.
type: object
x-isclass: true
ProfileVersion:
description: The current version of the profile, can be used for concurrency control during updates.
type: number
x-actualtype: int32
UploadDetails:
description: Collection of file names and upload urls
type: array
items:
$ref: '#/components/schemas/InitiateFileUploadMetadata'
x-isclass: true
required:
- ProfileVersion
example:
ProfileVersion: 5
UploadDetails:
- FileName: game_state
UploadUrl: https://...
- FileName: avatar
UploadUrl: https://...
Entity:
Id: ID
Type: title_player_account
TypeString: title_player_account
ObjectResult:
type: object
properties:
DataObject:
description: Un-escaped JSON object, if EscapeObject false or default.
type: object
EscapedDataObject:
description: Escaped string JSON body of the object, if EscapeObject is true.
type: string
ObjectName:
description: Name of the object. Restricted to a-Z, 0-9, '(', ')', '_', '-' and '.'
type: string
example:
ObjectName: SaveSate
EscapedDataObject: '{"PlayerDetails":{"LastMissionSuccess":"2017-06-15T11:05:19Z","LastMissionFailure":"2017-06-12T11:05:19Z","MapPosition":[22.0,37.78],"IsPaidUpgrade":true},"GameSettings":{"Screen":"FriendsList","Favorites":["Place
1","Place 2"]},"Social":{"Facebook":{"LikedPage":true,"PostedShare":true}}}'
OperationTypes:
type: string
enum:
- Created
- Updated
- Deleted
- None
SetObject:
type: object
properties:
DataObject:
description: Body of the object to be saved. If empty and DeleteObject is true object will be deleted if it exists, or no operation
will occur if it does not exist. Only one of Object or EscapedDataObject fields may be used.
type: object
DeleteObject:
description: Flag to indicate that this object should be deleted. Both DataObject and EscapedDataObject must not be set as well.
type: boolean
EscapedDataObject:
description: Body of the object to be saved as an escaped JSON string. If empty and DeleteObject is true object will be deleted if it
exists, or no operation will occur if it does not exist. Only one of DataObject or EscapedDataObject fields may be used.
type: string
ObjectName:
description: Name of object. Restricted to a-Z, 0-9, '(', ')', '_', '-' and '.'.
type: string
required:
- ObjectName
SetObjectInfo:
type: object
properties:
ObjectName:
description: Name of the object
type: string
OperationReason:
description: Optional reason to explain why the operation was the result that it was.
type: string
SetResult:
$ref: '#/components/schemas/OperationTypes'
description: Indicates which operation was completed, either Created, Updated, Deleted or None.
type: string
x-isenum: true
SetObjectsRequest:
description: 'Sets JSON objects on the requested entity profile. May include a version number to be used to perform optimistic concurrency
operations during update. If the current version differs from the version in the request the request will be ignored. If no version is
set on the request then the value will always be updated if the values differ. Using the version value does not guarantee a write though,
ConcurrentEditError may still occur if multiple clients are attempting to update the same profile. '
type: object
properties:
CustomTags:
description: The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
type: object
Entity:
$ref: '#/components/schemas/EntityKey'
description: The entity to perform this action on.
type: object
x-isclass: true
ExpectedProfileVersion:
description: Optional field used for concurrency control. By specifying the previously returned ProfileVersion value from the GetObjects
API or other APIs, you can ensure that the object update is performed only if the profile has not been updated since you last loaded
that version. If the profile for the same entity has been updated, the operation will fail with an EntityProfileVersionMismatch error.
The conflicting update can be caused by any operation that modifies the entity profile, including SetObjects, FinalizeFileUploads,
and UpdateStatistics.
type: number
x-actualtype: int32
Objects:
description: Collection of objects to set on the profile.
type: array
items:
$ref: '#/components/schemas/SetObject'
x-isclass: true
required:
- Objects
- Entity
example:
ExpectedProfileVersion: 5
Objects:
- ObjectName: SaveSate
DataObject:
PlayerDetails:
LastMissionSuccess: '2017-06-15T11:05:19Z'
LastMissionFailure: '2017-06-12T11:05:19Z'
MapPosition:
- 22
- 37.78
IsPaidUpgrade: true
GameSettings:
Screen: FriendsList
Favorites:
- Place 1
- Place 2
SimpleStatements:
Read:
- Friend: true
Write:
- Self
Entity:
Id: A8140AB9109712B
Type: title_player_account
TypeString: title_player_account
SetObjectsResponse:
type: object
properties:
ProfileVersion:
description: New version of the entity profile.
type: number
x-actualtype: int32
SetResults:
description: New version of the entity profile.
type: array
items:
$ref: '#/components/schemas/SetObjectInfo'
x-isclass: true
required:
- ProfileVersion
example:
SetResults:
- {}
ProfileVersion: 5
securitySchemes:
None:
type: apiKey
in: header
name: None
description: This API requires no authentication headers (usually provides one to other calls).
SessionTicket:
type: apiKey
in: header
name: X-Authorization
description: This API requires a client session ticket, available from any Client Login function.
SecretKey:
type: apiKey
in: header
name: X-SecretKey
description: This API requires a title secret key, available to title admins, from PlayFab Game Manager.
EntityToken:
type: apiKey
in: header
name: X-EntityToken
description: This API requires an Entity Session Token, available from the Entity GetEntityToken method.
x-source:
converted-from: https://raw.githubusercontent.com/PlayFab/API_Specs/master/Swagger/PlayFab/Data.swagger.json
method: converted swagger 2.0 -> openapi 3.0.3 mechanically
generated: '2026-11-05'