Skip to main content
POST
Execute Cloud Script

Authorizations

X-SecretKey
string
header
required

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

Body

application/json
FunctionName
string
required

The name of the CloudScript function to execute

PlayFabId
string
required

The unique user identifier for the player on whose behalf the script is being run

CustomTags
object

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

FunctionParameter
object

Object that is passed in to the function as the first argument

GeneratePlayStreamEvent
boolean

Generate a 'player_executed_cloudscript' PlayStream event containing the results of the function execution and other contextual information. This event will show up in the PlayStream debugger console for the player in Game Manager.

RevisionSelection
enum<string>

Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' executes the current live, published revision, and 'Specific' executes the specified revision. The default value is 'Specific', if the SpeificRevision parameter is specified, otherwise it is 'Live'.

Available options:
Live,
Latest,
Specific
SpecificRevision
number

The specivic revision to execute, when RevisionSelection is set to 'Specific'

Response

code
integer

The Http status code. If X-ReportErrorAsSuccess header is set to true, this will report the actual http error code.

status
string

The Http status code as a string.

data
object
Example:
Last modified on October 1, 2026