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

# SubscriptionChangeMessage real-time messages type

> SubscriptionChangeMessage type for PlayFab real-time messages, reporting subscribe or unsubscribe results like SubscribeSuccess or NoSubscription.

<Note>
  The REST and SignalR APIs documented here are more complex than the client SDKs. Consider using the [Lobby C++ SDK](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members) or [Matchmaking C++ SDK](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members) instead, unless those SDKs don't meet your needs.
</Note>

```json theme={null}
{
    "entityType": "title_player_account",
    "entityId": "6C6B908A2B5B9A4",
    "topic": "Opaque~Topic~String~6183258",
    "status": "SubscribeSuccess",
    "unsubscribeReason": "ResourceOwningServiceDefinedReason",
    "traceId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
```

## Members

**`entityType`**   string

The [type of the
entity](/services/playfab/live-service-management/game-configuration/entities/available-built-in-entity-types#title_player_account)
whose subscription changed. Clients may only care about this field if they
[added multiple entities](/services/playfab/multiplayer/real-time-messages/server-methods/add-entity-to-session) to the
same session.

Example: `title_player_account`

**`entityId`**   string

The [ID of the
entity](/services/playfab/live-service-management/game-configuration/entities/available-built-in-entity-types#title_player_account)
whose subscription changed. Clients may only care about this field if they
[added multiple entities](/services/playfab/multiplayer/real-time-messages/server-methods/add-entity-to-session) to the
same session.

Example: `6C6B908A2B5B9A4`

**`topic`**   string

A topic string, matching the topic string returned when [subscribing to
resources](/services/playfab/multiplayer/real-time-messages/subscribing-to-resources). This field allows the client to keep
track of which messages are for which resources they subscribed to.

Example: `Opaque~Topic~String~6183258`

**`status`**   string

The status of the subscription change.

| Possible Values      | Description                                                                                                                                                   |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `SubscribeSuccess`   | The subscription succeeded. The client can assume they'll receive all messages for the topic from this point on.                                              |
| `SubscribeFailure`   | The subscription failed. The client can retry [subscribing to the resource](/services/playfab/multiplayer/real-time-messages/subscribing-to-resources).       |
| `AlreadySubscribed`  | The client is already subscribed to the resource it attempted to subscribe to again.                                                                          |
| `UnsubscribeSuccess` | The unsubscription succeeded.                                                                                                                                 |
| `UnsubscribeFailure` | The unsubscription failed. The client can retry [unsubscribing from the resource](/services/playfab/multiplayer/real-time-messages/subscribing-to-resources). |
| `NoSubscription`     | The client isn't subscribed to the resource it attempted to unsubscribe from.                                                                                 |

**`unsubscribeReason`**   string *optional*

A reason for unsubscription, that can be optionally provided by the service
handling the unsubscribe request.

Example: `ResourceOwningServiceDefinedReason`

**`traceId`**   string

A [W3C TraceContext trace-id](https://www.w3.org/TR/trace-context/#trace-id).
The client should log this field so it can be included if you need to send a bug
report to the PlayFab team.

Example: `4bf92f3577b34da6a3ce929d0e0e4736`

## See also

* Client method
  [ReceiveSubscriptionChangeMessage](/services/playfab/multiplayer/real-time-messages/client-methods/receive-subscription-change-message)
* [Real-time messages SignalR Hub](/services/playfab/multiplayer/real-time-messages/signalr-hub)
* [Real-time messages for Lobby and Matchmaking APIs](/services/playfab/multiplayer/real-time-messages/overview)


## Related topics

- [StartOrRecoverSessionRequest real-time messages type](/services/playfab/multiplayer/real-time-messages/types/start-or-recover-session-request.md)
- [StartOrRecoverSessionResponse real-time messages type](/services/playfab/multiplayer/real-time-messages/types/start-or-recover-session-response.md)
- [Message real-time messages type](/services/playfab/multiplayer/real-time-messages/types/message.md)
- [EndSessionRequest real-time messages type](/services/playfab/multiplayer/real-time-messages/types/end-session-request.md)
- [EndSessionResponse real-time messages type](/services/playfab/multiplayer/real-time-messages/types/end-session-response.md)
