--- title: Title data description: Read, set, and delete title-wide key/value data, either client-readable or internal. --- # Title data Manage title-wide key/value data. Commands target client-readable title data, which players' game clients read, unless you add `--internal` to target server-only internal title data. You need **Admin** permission on the title; see [How PlayFab authentication works](../../authentication.md#how-playfab-authentication-works). | Command | PlayFab API path | Description | | --- | --- | --- | | `playfab title-data get` | `/Admin/GetTitleData` or `/Admin/GetTitleInternalData` | Read one key, several keys, or all keys. | | `playfab title-data set` | `/Admin/SetTitleData` or `/Admin/SetTitleInternalData` | Set one or more keys. | | `playfab title-data delete` | `/Admin/SetTitleData` or `/Admin/SetTitleInternalData`, with `null` values | Remove one or more keys. | `title-data` commands don't accept `--output table`. ## `playfab title-data get` ```text xbox playfab title-data get [key] --playfab-title-id ABC123 [flags] ``` | Argument / option | Description | | --- | --- | | `[key]` | One key to read. Same as `--key`; pass one or the other. A blank key is refused, rather than read as every key. | | `--key ` | A key to read. Repeat it to read several keys. | | `--internal` | Read internal title data instead of client-readable title data. | Omit the key and `--key` to read every key. A `get` for one key prints the key's bare value. Reading several keys or every key shows a row for each key with its value. `--output json` writes the full envelope as JSON, even for one key, and `--data-only` with it writes only its `data`. ```bash xbox playfab title-data get MyKey --playfab-title-id ABC123 ``` ```text my-value ``` When the one key doesn't exist, `get` writes `Key 'MyKey' was not found.` to stderr and exits with code `1`. ```bash xbox playfab title-data get MyKey --internal --playfab-title-id ABC123 xbox playfab title-data get MyKey --output json --playfab-title-id ABC123 xbox playfab title-data get --key MyKey --key OtherKey --playfab-title-id ABC123 xbox playfab title-data get --playfab-title-id ABC123 ``` ## `playfab title-data set` | Option | Description | | --- | --- | | `--key ` | The key to set. Use with `--value`. | | `--value ` | The value for `--key`, stored as is. | | `--data ` | A JSON object of key/value pairs, to set several keys at once. Can't be combined with `--key` and `--value`. | | `--internal` | Write internal title data instead of client-readable title data. | Set one key: ```bash xbox playfab title-data set --key MyKey --value my-value --playfab-title-id ABC123 ``` Or set several keys at once: ```bash xbox playfab title-data set --data '{"MyKey":"my-value","OtherKey":"2"}' --playfab-title-id ABC123 ``` In Windows PowerShell 5.1, `--data` gets invalid JSON, so set each key with `--key` and `--value`, or use PowerShell 7.3 or later. See [PlayFab API integration](../../playfab-api.md#windows-powershell-51). On success, `set` shows the keys it set. With `--output json`, it writes them as `{"applied":["MyKey","OtherKey"]}`. ## `playfab title-data delete` | Option | Required | Description | | --- | --- | --- | | `--key ` | Yes | A key to remove. Repeat it to remove several keys. | | `--internal` | No | Remove internal title data instead of client-readable title data. | ```bash xbox playfab title-data delete --key MyKey --key OldKey --playfab-title-id ABC123 ``` `delete` asks before it removes the keys, as in `Delete 2 keys on ABC123?`; see [What asks first](../../safety.md#what-asks-first). On success, it shows the keys it removed. With `--output json`, it writes them as `{"applied":["MyKey","OldKey"]}`. ## When a multi-key write stops partway `set` and `delete` write one key at a time, in order, and stop at the first key that doesn't succeed. Keys before it were written; keys after it weren't tried. The command exits with code `1` and writes to stderr the keys it wrote, the key that didn't succeed, and why. The key that didn't succeed is labeled with what happened to it: | Label | Meaning | | --- | --- | | `Not saved` or `Not deleted` | PlayFab rejected the key, with the error that follows. It wasn't written. | | `Unknown` | The key's request might have reached PlayFab without a conclusive answer, such as after a timeout, Ctrl+C, or an HTTP 5xx error. It might have been written, so check it with `title-data get` before you run the command again. | | `Not sent` | The key's request never left, such as when signing in failed. It wasn't written. | After Ctrl+C on the second key, stderr shows: ```text ✓ Saved MyKey ! Unknown OtherKey might have changed ✗ Request failed /Admin/SetTitleData may have reached PlayFab, but the request was canceled, so its outcome is unknown. Check whether it was applied before retrying. ``` With `--output json` or `json-compact`, stderr gets a JSON summary instead. `applied` lists the keys that were written, and the key that didn't succeed is in `failed`, `unknown`, or `notSent`, which match the labels above, with its error. `unknown` also has `outcomeUnknown`: ```json { "applied": [ "MyKey" ], "unknown": { "key": "OtherKey", "error": "The operation was canceled.", "outcomeUnknown": "/Admin/SetTitleData may have reached PlayFab, but the request was canceled, so its outcome is unknown. Check whether it was applied before retrying." } } ```