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

# XGameSave (API contents)

> XGameSave

The XGameSave API is designed to enable creating, loading, saving and managing game related states. The primary difference between this and previous implementations is that this will provide a flat API with access to an Asynchronous Programming Model that allows the caller to control the threading and memory management of how the API behaves.

## Functions

| Function | Description |
| - | - |
| [XGameSaveBlobInfoCallback](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesaveblobinfocallback.md) | Callback function to retrieve the results of [XGameSaveEnumerateBlobInfo](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesaveenumerateblobinfo.md). |
| [XGameSaveCloseContainer](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesaveclosecontainer.md) | Closes the XGameSaveContainer. |
| [XGameSaveCloseProvider](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavecloseprovider.md) | Releases resources held by the XGameSaveProvider. |
| [XGameSaveCloseUpdate](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavecloseupdate.md) | Closes a XGameSaveUpdate. |
| [XGameSaveContainerInfoCallback](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavecontainerinfocallback.md) | The callback function for a call made to [XGameSaveGetContainerInfo](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavegetcontainerinfo.md). |
| [XGameSaveCreateContainer](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavecreatecontainer.md) | Creates a XGameSaveContainer handle. |
| [XGameSaveCreateUpdate](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavecreateupdate.md) | Creates an update which will later be submitted by calling [XGameSaveSubmitUpdate](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavesubmitupdate.md). |
| [XGameSaveDeleteContainer](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavedeletecontainer.md) | Deletes a XGameSaveContainer from cloud storage. |
| [XGameSaveDeleteContainerAsync](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavedeletecontainerasync.md) | Deletes a XGameSaveContainer asynchronously. |
| [XGameSaveDeleteContainerResult](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavedeletecontainerresult.md) | Retrieves the result of a [XGameSaveDeleteContainerAsync](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavedeletecontainerasync.md) call, use this function to check the success of the call. |
| [XGameSaveEnumerateBlobInfo](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesaveenumerateblobinfo.md) | Retrieves the blob info for the contents of a XGameSaveContainer. |
| [XGameSaveEnumerateBlobInfoByName](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesaveenumerateblobinfobyname.md) | Retrieves the blob info for the contents of a XGameSaveContainer limited to the blobs which share a prefix with the blobNamePrefix parameter. |
| [XGameSaveEnumerateContainerInfo](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesaveenumeratecontainerinfo.md) | Retrieves the container info for a XGameSaveProvider. |
| [XGameSaveEnumerateContainerInfoByName](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesaveenumeratecontainerinfobyname.md) | Retrieves the container info for a XGameSaveProvider. |
| [XGameSaveGetContainerInfo](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavegetcontainerinfo.md) | Retrieves info for the containers in a XGameSaveProvider. |
| [XGameSaveGetRemainingQuota](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavegetremainingquota.md) | Returns the amount of data available to store using the XGameSave api. |
| [XGameSaveGetRemainingQuotaAsync](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavegetremainingquotaasync.md) | Returns the amount of data available to store using the XGameSave api asynchronously. |
| [XGameSaveGetRemainingQuotaResult](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavegetremainingquotaresult.md) | Retrieves the results of the [XGameSaveGetRemainingQuotaAsync](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavegetremainingquotaasync.md) function. |
| [XGameSaveInitializeProvider](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesaveinitializeprovider.md) | Provides and initializes a XGameSave Provider handle. |
| [XGameSaveInitializeProviderAsync](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesaveinitializeproviderasync.md) | Provides and initializes an XGameSave Provider handle asynchronously. |
| [XGameSaveInitializeProviderResult](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesaveinitializeproviderresult.md) | Contains the results of a [XGameSaveInitializeProviderAsync](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesaveinitializeproviderasync.md) call. |
| [XGameSaveReadBlobData](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavereadblobdata.md) | Reads the blob data for a container. |
| [XGameSaveReadBlobDataAsync](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavereadblobdataasync.md) | Read XGameSaveBlob data from a XGameSaveContainer asynchronously. |
| [XGameSaveReadBlobDataResult](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavereadblobdataresult.md) | Retrieves the results of a [XGameSaveReadBlobDataAsync](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavereadblobdataasync.md) call. |
| [XGameSaveSubmitBlobDelete](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavesubmitblobdelete.md) | Adds a delete action to a game save XGameSaveUpdate. |
| [XGameSaveSubmitBlobWrite](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavesubmitblobwrite.md) | Adds a write action to a XGameSaveUpdate. |
| [XGameSaveSubmitUpdate](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavesubmitupdate.md) | Submit an update to the XGameSave service. Updates blobs within a container. |
| [XGameSaveSubmitUpdateAsync](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavesubmitupdateasync.md) | Submit an update to the XGameSave service asynchronously. Updates blobs within a container. |
| [XGameSaveSubmitUpdateResult](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavesubmitupdateresult.md) | Retrieves the result of the [XGameSaveSubmitUpdateAsync](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavesubmitupdateasync.md) call. |

## Structures

| Structure | Description |
| - | - |
| [XGameSaveBlob](https://docs.xbox.com/reference/system/xgamesave/structs/xgamesaveblob.md) | Unit of information for XGameSave storage. Resides within a XGameSaveContainer. |
| [XGameSaveBlobInfo](https://docs.xbox.com/reference/system/xgamesave/structs/xgamesaveblobinfo.md) | Information about the XGameSaveBlob. |
| [XGameSaveContainerInfo](https://docs.xbox.com/reference/system/xgamesave/structs/xgamesavecontainerinfo.md) | Information about a XGameSaveContainer. |

## Error Codes

The following error codes may be returned by XGameSave APIs. For a complete list, see [Error codes](https://docs.xbox.com/reference/errorcodes.md). For detailed troubleshooting guidance, see [Game Saves Debugging](https://docs.xbox.com/build/core-features/common/game-save/game-saves-debugging.md).

| Code | Value | Description |
| - | - | - |
| E\_GS\_INVALID\_CONTAINER\_NAME | 0x80830001 | The name of the container is invalid. Valid container name characters include uppercase/lowercase letters, digits, underscores, and forward slashes. |
| E\_GS\_NO\_ACCESS | 0x80830002 | The operation failed because the title does not have access to the container storage spaces. Check that the SCID and TitleId are configured correctly. |
| E\_GS\_OUT\_OF\_LOCAL\_STORAGE | 0x80830003 | The device does not have enough storage capacity to save the game. |
| E\_GS\_USER\_CANCELED | 0x80830004 | The user canceled the download of their save games. |
| E\_GS\_UPDATE\_TOO\_BIG | 0x80830005 | The size of the save update is too large. The total size of an XGameSave update must be smaller than GS\_MAX\_BLOB\_SIZE (16 MB). |
| E\_GS\_QUOTA\_EXCEEDED | 0x80830006 | The title's storage quota for this user has been exceeded. |
| E\_GS\_PROVIDED\_BUFFER\_TOO\_SMALL | 0x80830007 | The buffer provided to the API was too small. |
| E\_GS\_BLOB\_NOT\_FOUND | 0x80830008 | The specified blob cannot be found. |
| E\_GS\_NO\_SERVICE\_CONFIGURATION | 0x80830009 | The title is not properly configured for connected storage. Check that the SCID is correct and the title is configured in Partner Center. |
| E\_GS\_CONTAINER\_NOT\_IN\_SYNC | 0x8083000A | The container is not synchronized yet. Ensure the XGameSave container is synchronized before submitting updates. |
| E\_GS\_CONTAINER\_SYNC\_FAILED | 0x8083000B | The synchronization of the container failed. |
| E\_GS\_USER\_NOT\_REGISTERED\_IN\_SERVICE | 0x8083000C | The user's MSA is not yet an XBOX services account. |
| E\_GS\_HANDLE\_EXPIRED | 0x8083000D | The handle used by the function expired and must be reacquired. |
| E\_GS\_ASYNC\_FUNCTION\_REQUIRED | 0x8083000E | This synchronous function is being called on a time-sensitive thread and risks deadlocks. Use the async implementation instead. |
| E\_GS\_PROVIDER\_MISMATCH | 0x8083000F | The game is mixing XGameSave and XGameSaveFiles calls, which is not supported. |

## Conceptual documentation

* [Game Saves overview](https://docs.xbox.com/build/core-features/common/game-save/game-saves-overview.md)
* [XGameSave guide](https://docs.xbox.com/build/core-features/common/game-save/xgamesave.md)
* [Game Saves debugging](https://docs.xbox.com/build/core-features/common/game-save/game-saves-debugging.md)

## See also

[System API reference](https://docs.xbox.com/reference/system/gc-reference-system-toc.md)


## Related topics

- [XGameSave API overview](https://docs.xbox.com/build/core-features/common/game-save/xgamesave.md)
- [Debugging Game Saves](https://docs.xbox.com/build/core-features/common/game-save/game-saves-debugging.md)
- [Game Saves tools](https://docs.xbox.com/build/core-features/common/game-save/game-saves-tools.md)
- [Game Saves storage systems](https://docs.xbox.com/build/core-features/common/game-save/game-saves-storage-systems.md)
- [XGameSave Wrapper Reference (API contents)](https://docs.xbox.com/reference/system/Wrappers/xgamesave_wrapper_members.md)
