> ## 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.

# POST /titles/{titleId}/recentplayers/server

> Post Server Recent Players

Appends to or updates a set of users' lists of recent players (unidirectional). This is essentially a batch API of the client API, for servers.

This API allows a game server to append to a set of users' lists of recent players, and to update existing recent player entries. Each user's recent players list is unidirectional.

```http theme={null}
POST /titles/{titleId}/recentplayers/server
```

## URI parameters

| Parameter | In | Required | Type | Description |
| - | - | - | - | - |
| titleId | path | TRUE | integer | The titleId of the game that the request is being sent for. |

## Request header

| Name | Required | Type | Description |
| - | - | - | - |
| Authorization | TRUE | integer | Caller must supply an XToken in the XBL 3.0 authorization format. For example, Authorization: XBL3.0 x=2553948354698;>encrypted token\<) |
| Content-Type | TRUE | string | ContentType must be set to application/json |

## Request body

| Name | Required | Type | Description |
| - | - | - | - |
| recentPlayersByXuid | TRUE | [ServerRecentPlayersByXuid](#serverrecentplayersbyxuid)\[] | Array of objects representing a XUID and their recent players. There should be at least 1 and at most 20 XUID entries. |

## Responses

| Name | Type | Description |
| - | - | - |
| 204 No Content | | The recent players request was sent successfully. |
| 400 Bad Request | [ErrorResponse](#errorresponse) | An error occurred while processing the request. Possible error codes: "RequestValidationError: The request validation has failed.", " AuthorizationError: The caller is not allowed to access the resource." |
| Other Status Codes | [ThrottledEntity](#throttledentity) | Too many requests. Headers Retry-After: integer |

## Definitions

* [EncounterType](#encountertype)
* [ErrorResponse](#errorresponse)
* [Network](#network)
* [ServerRecentPlayersByXuid](#serverrecentplayersbyxuid)
* [ServerRecentPlayersRequest](#serverrecentplayersrequest)
* [ThrottledEntity](#throttledentity)
* [UnidirectionalRecentPlayer](#unidirectionalrecentplayer)

### EncounterType

The type of recent players encounter. This field is optional and defaults to Default. Default has no prescribed meaning - it is up to the caller to interpret this value appropriately.

| Name | Type | Description |
| - | - | - |
| Default | string | |
| Opponent | string | |
| Teammate | string | |

### ErrorResponse

| Name | Type | Description |
| - | - | - |
| debugMessage | string | Human readable version of the error message that can be used for debugging. |
| errorCode | string | Error code enum. |

### Network

| Name | Type | Description |
| - | - | - |
| XboxLive | string | |

### ServerRecentPlayersByXuid

| Name | Type | Description |
| - | - | - |
| recentPlayers | [UnidirectionalRecentPlayer](#unidirectionalrecentplayer)\[] | The array of recent players for this user. There should be at least 1 recent players and at most 100 recent players. |
| xuid | string | The user's XUID (base 10 integer). |

### ServerRecentPlayersRequest

| Name | Type | Description |
| - | - | - |
| recentPlayersByXuid | [ServerRecentPlayersByXuid](#serverrecentplayersbyxuid)\[] | Array of objects representing a XUID and their recent players. There should be at least 1 and at most 20 XUID entries. |

### ThrottledEntity

| Name | Type | Description |
| - | - | - |
| currentRequests | string | Current number of requests - concurrency or rate. |
| debugMessage | string | Human readable version of the throttle message that can be used for debugging. |
| limitType | string | The limit type i.e. concurrency or rate. |
| maxRequests | string | Max request allowed - concurrency or rate. |
| periodInSeconds | string | The period in seconds that applies when rate or concurrency limits are exceeded. |
| version | string | Current throttle contract version. |

## UnidirectionalRecentPlayer

| Name | Type | Description |
| - | - | - |
| encounterType | [EncounterType](#encountertype) | The type of recent players encounter. This field is optional and defaults to Default. Default has no prescribed meaning - it is up to the caller to interpret this value appropriately. |
| id | string | The Id (a XUID base 10 integer) of another user. |
| network | [Network](#network) | The network the other user was encountered on. |
| timestamp | string | |


## Related topics

- [POST /titles/{titleId}/recentplayergroups/server](https://docs.xbox.com/reference/live/rest/uri/multiplayeractivity/swagger-uris/uri-PostServerRecentPlayerGroup.md)
- [POST /titles/{titleId}/recentplayers](https://docs.xbox.com/reference/live/rest/uri/multiplayeractivity/swagger-uris/uri-PostUniRecentPlayers.md)
- [POST /titles/{titleId}/invites/server API](https://docs.xbox.com/reference/live/rest/uri/multiplayeractivity/swagger-uris/uri-SendServerInvite.md)
- [POST /titles/{titleId}/invites](https://docs.xbox.com/reference/live/rest/uri/multiplayeractivity/swagger-uris/uri-SendInvite.md)
- [POST /titles/{titleId}/activities/query](https://docs.xbox.com/reference/live/rest/uri/multiplayeractivity/swagger-uris/uri-ExternalGetActivityBatch.md)
