> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Title Data quickstart

> Read and write PlayFab Title Data key-value pairs from game clients and servers using GetTitleData and SetTitleData APIs with C# code samples.

Title data is the set of plain text key-value pairs, used for storing and managing the game's configuration data remotely on the server. It keeps the title wide configuration variables accessible and organized which can be retrieved on the client-side.

This QuickStart describes how to programmatically create and use title data.

This an important topic because storing a game's configuration data remotely on the server - where it can be changed at any time - is one of the most basic reasons to use a service like PlayFab.

## Getting title data

### From the game client

Use [GetTitleData](xref:titleid.playfabapi.com.client.title-widedatamanagement.gettitledata) from the `PlayFabClientAPI` to get the KVPs for a specific title. The following code example displays the values of all of the title data.

```csharp theme={null}
public void ClientGetTitleData() {
    PlayFabClientAPI.GetTitleData(new GetTitleDataRequest(),
        result => {
            if(result.Data == null || !result.Data.ContainsKey("MonsterName")) Debug.Log("No MonsterName");
            else Debug.Log("MonsterName: "+result.Data["MonsterName"]);
        },
        error => {
            Debug.Log("Got error getting titleData:");
            Debug.Log(error.GenerateErrorReport());
        }
    );
}
```

### From the game server

Use [GetTitleData](xref:titleid.playfabapi.com.server.title-widedatamanagement.gettitledata) from the `PlayFabServerAPI` to get the KVPs for a specific Title. The following code example displays the values of all of the Title Data.

```csharp theme={null}
public void ServerGetTitleData() {
    PlayFabServerAPI.GetTitleData( new GetTitleDataRequest(),
        result => {
            if (result.Data == null || !result.Data.ContainsKey("MonsterName")) Debug.Log("No MonsterName");
            else Debug.Log("MonsterName: " + result.Data["MonsterName"]);
        },
        error => {
            Debug.Log("Got error getting titleData:");
            Debug.Log(error.GenerateErrorReport());
        });
}
```

## Setting title data

It is unlikely that title data will change very frequently. For most situations, you should use your title data for static data that is mostly unchanged for the life of the title.

You can set title data by using the Game Manager, or by a server API function.

### Setting title data using Game Manager

To add Primary Title Data using Game Manager to a title, perform the following steps.

1. Open the title in **Game Manager**.
2. Select **Content**, then **Title Data**.
3. Select **New Title Data**
4. In the new title data page, enter a value for the **Key** and a value for the **Value**. Both the **Key** and the **Value** are stored as strings.
5. Use the **Save** button to save the new data item.

<img src="https://mintcdn.com/microsoft-4404708b/3hg2JQs0m7qmDqay/images/playfab/live-service-management/game-configuration/titledata/tutorials/title-data-new-title-data.PNG?fit=max&auto=format&n=3hg2JQs0m7qmDqay&q=85&s=2aad92647840e49665b006d43d2b6128" alt="Screenshot shows new title data." width="2965" height="1053" data-path="images/playfab/live-service-management/game-configuration/titledata/tutorials/title-data-new-title-data.PNG" />

<img src="https://mintcdn.com/microsoft-4404708b/3hg2JQs0m7qmDqay/images/playfab/live-service-management/game-configuration/titledata/tutorials/title-data-add-primary-title-data.PNG?fit=max&auto=format&n=3hg2JQs0m7qmDqay&q=85&s=e4d36dac8aaf57c54f680f7bae73be7e" alt="Screenshot of Title data" width="3000" height="1001" data-path="images/playfab/live-service-management/game-configuration/titledata/tutorials/title-data-add-primary-title-data.PNG" />

### Setting title data by calling the server API in C

The [SetTitleData](xref:titleid.playfabapi.com.server.title-widedatamanagement.settitledata) API is a server API that you must call from a dedicated server. You can only set one title data KVP in each call to `SetTitleData`.

```csharp theme={null}
public void SetTitleData() {
    PlayFabServerAPI.SetTitleData(
        new SetTitleDataRequest {
            Key = "MonsterName",
            Value = "Dorf"
        },
        result => Debug.Log("Set titleData successful"),
        error => {
            Debug.Log("Got error setting titleData:");
            Debug.Log(error.GenerateErrorReport());
        }
    );
}
```

### Setting title data overrides using Game Manager

An override is also a set of JSON key-value pairs and ideally should be purposed to possess the delta change required in the key-values pairs of the Primary Title Data. The delta change could comprise of the key-value pairs when compared to Primary Title data as new key-value, change in an existing key's value or deletion of a key (with NULL as an input of the value).

To add overrides to the primary title data, perform the following steps.

1. Open the title in **Game Manager**.
2. Select **Content**, then **Title Data**.
3. Select **New Override**.
4. Enter the Override Label, plus, enter a value for the **Key** and a value for the **Value**. Both the Key and the Value are stored as strings.
5. Use the **Save** button to save the new Title Data Override.

<Note>
  This override set of key/value pairs comes in-effect only using [Experiments](/services/playfab/live-service-management/game-configuration/experiments) for now.
</Note>

If the player belongs to an experiment variant which contain title data overrides, the overrides are applied automatically on server side and returned with the title data on client side.

<Note>
  Title Data Override values may take up to one minute to refresh and persist.
</Note>

<img src="https://mintcdn.com/microsoft-4404708b/3hg2JQs0m7qmDqay/images/playfab/live-service-management/game-configuration/titledata/tutorials/new-title-data-override.PNG?fit=max&auto=format&n=3hg2JQs0m7qmDqay&q=85&s=d0bf7381eb30bee016b63b5b8ae57eb0" alt="Screenshot shows new title data override." width="2955" height="1006" data-path="images/playfab/live-service-management/game-configuration/titledata/tutorials/new-title-data-override.PNG" />

<img src="https://mintcdn.com/microsoft-4404708b/3hg2JQs0m7qmDqay/images/playfab/live-service-management/game-configuration/titledata/tutorials/set-title-data-override.PNG?fit=max&auto=format&n=3hg2JQs0m7qmDqay&q=85&s=a4f1978c4749d06b4767a0cfaf64bbd5" alt="Screenshot shows how to set ne title data override." width="2999" height="974" data-path="images/playfab/live-service-management/game-configuration/titledata/tutorials/set-title-data-override.PNG" />

<img src="https://mintcdn.com/microsoft-4404708b/3hg2JQs0m7qmDqay/images/playfab/live-service-management/game-configuration/titledata/tutorials/title-data-landing.PNG?fit=max&auto=format&n=3hg2JQs0m7qmDqay&q=85&s=2655a7e1a34589e3c6f19590262d3426" alt="Screenshot shows title data and override." width="2969" height="1572" data-path="images/playfab/live-service-management/game-configuration/titledata/tutorials/title-data-landing.PNG" />

## Internal title data

Similarly to User Data, title data has internal storage that is hidden from the client. This data can also be set in the Game Manager, or via a server API.

### Getting internal title data by calling the server API in C \#

```csharp theme={null}
public void GetTitleInternalData()
{
    PlayFabServerAPI.GetTitleInternalData( new GetTitleDataRequest(),
        result => {
            if (result.Data == null || !result.Data.ContainsKey("PlayFab")) Debug.Log("No PlayFab");
            else Debug.Log("PlayFab: " + result.Data["PlayFab"]);
        },
        error => {
            Debug.Log("Got error getting titleData:");
            Debug.Log(error.GenerateErrorReport());
        }
    );
}
```

### Setting internal title data by calling the server API in C \#

```csharp theme={null}
public void SetTitleInternalData() {
    PlayFabServerAPI.SetTitleInternalData(
        new SetTitleDataRequest {
            Key = "PlayFab",
            Value = "{ \"Status\": \"Secretly Awesome\" }"
        },
        result => { Debug.Log("Set titleData successful"); },
        error =>
        {
            Debug.Log("Got error setting titleData:");
            Debug.Log(error.GenerateErrorReport());
        });
}
```

## See also

* [Using Publisher Data](/services/playfab/live-service-management/game-configuration/titledata/using-publisher-data)
* [Player Data Quickstart](/services/playfab/player-progression/player-data/quickstart)
* [CloudScript Quickstart](/services/playfab/live-service-management/service-gateway/automation/cloudscript/quickstart)


## Related topics

- [Quickstart Player Data](/services/playfab/player-progression/player-data/quickstart.md)
- [Title Data](/services/playfab/live-service-management/game-configuration/titledata/index.md)
- [Using publisher data](/services/playfab/live-service-management/game-configuration/titledata/using-publisher-data.md)
- [Data Explorer quickstart](/services/playfab/data-analytics/learn-data/data-explorer/quickstart.md)
- [Title News quickstart](/services/playfab/live-service-management/game-configuration/title-communications/news/quickstart.md)
