<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GroupActivities",
  "identifier" : "/documentation/GroupActivities/GroupSessionMessenger/send(_:to:)-2a4ku",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Group Activities",
      "GroupActivities"
    ],
    "preciseIdentifier" : "s:15GroupActivities0A16SessionMessengerC4send_2toyx_AA12ParticipantsOtYaKSeRzSERzlF"
  },
  "title" : "send(_:to:)"
}
-->

# send(_:to:)

Sends a custom type asynchronously to other participants in the group session.

```
final func send<Message>(_ value: Message, to participants: Participants = .all) async throws where Message : Decodable, Message : Encodable
```

## Parameters

`participants`

The recipients of the message. The default value of this
parameter is the set of all active participants in the session. Use the
[`Participants.only(_:)`](/documentation/GroupActivities/Participants/only(_:)-swift.enum.case) option to specify a subset of participants.

## Discussion

Use this method to send data that you package into a custom class or
structure. The method encodes your custom structure’s type information,
and delivers the data only to message sequences of the same type.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)