---
title: "init(id:date:subject:body:sender:recipients:)"
framework: Suggested Actions
role: symbol
role_heading: Initializer
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, visionOS 27.0+]
path: "suggestedactions/suggestedactionsmessage/init(id:date:subject:body:sender:recipients:)"
---

# init(id:date:subject:body:sender:recipients:)

Creates a representation of a message that the system uses to display suggested actions.

## Declaration

```swift
init(id: some Hashable, date: Date, subject: AttributedString?, body: AttributedString, sender: SuggestedActionsMessage.Participant, recipients: [SuggestedActionsMessage.Participant])
```

## Parameters

- `id`: A stable, unique identifier for the message. Common types for this identifier are String, UUID, or a custom identifier type, but any Hashable value works. The identifier must remain consistent across the lifetime of the message and across app launches.
- `date`: The date when the sender sent the message or the date your app received it.
- `subject`: The subject line of the message.
- `body`: The body content of the message.
- `sender`: The participant who sent the message.
- `recipients`: The participants who received the message.

## See Also

### Creating the message representation

- [SuggestedActionsMessage.Participant](suggestedactions/suggestedactionsmessage/participant.md)
