---
title: "init(identifier:conversationIdentifier:content:dateSent:sender:recipients:groupName:messageType:)"
framework: intents
role: symbol
role_heading: Initializer
path: "intents/inmessage/init(identifier:conversationidentifier:content:datesent:sender:recipients:groupname:messagetype:)"
---

# init(identifier:conversationIdentifier:content:dateSent:sender:recipients:groupName:messageType:)

Creates a message with the specified content and an optional group name.

## Declaration

```swift
convenience init(identifier: String, conversationIdentifier: String?, content: String?, dateSent: Date?, sender: INPerson?, recipients: [INPerson]?, groupName: INSpeakableString?, messageType: INMessageType)
```

## Parameters

- `identifier`: The message’s unique identifier. Specify a value that you can later use to identify the same message.
- `conversationIdentifier`: The identifier of the conversation that contains this message.
- `content`: The text that Siri recites to the message recipient.
- `dateSent`: The date and time the app sent the message to each recipient.
- `sender`: The person who sent the message.
- `recipients`: The people who recieved the message.
- `groupName`: The name of the grouped conversation. Provide a value only when the message belongs to a named group; otherwise, specify nil.
- `messageType`: The type of content the message contains. For possible values, see doc://com.apple.sirikit/documentation/Intents/INMessageType.

## Return Value

Return Value A message that SiriKit configures with the specified parameters, or nil if there was a problem creating the message.

## Discussion

Discussion Use the conversationIdentifier parameter to associate individual messages with a larger discussion among a specific group of people. For each participant in the message (sender and recipients), create an instance of INPerson using one of the initializers that require an isMe parameter. Use true for the participant that represents the user of the current device; for all other participants, use false. When creating each of those objects, provide enough information for you to later identify that same person.

## See Also

### Creating a Message

- [init(identifier:conversationIdentifier:content:dateSent:sender:recipients:groupName:messageType:serviceName:audioMessageFile:)](intents/inmessage/init(identifier:conversationidentifier:content:datesent:sender:recipients:groupname:messagetype:servicename:audiomessagefile:).md)
- [init(identifier:conversationIdentifier:content:dateSent:sender:recipients:groupName:messageType:serviceName:)](intents/inmessage/init(identifier:conversationidentifier:content:datesent:sender:recipients:groupname:messagetype:servicename:).md)
- [init(identifier:conversationIdentifier:content:dateSent:sender:recipients:messageType:)](intents/inmessage/init(identifier:conversationidentifier:content:datesent:sender:recipients:messagetype:).md)
- [init(identifier:content:dateSent:sender:recipients:)](intents/inmessage/init(identifier:content:datesent:sender:recipients:).md)
