<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SiriKit",
  "identifier" : "/documentation/Intents/INSearchForMessagesIntentResponse",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "c:objc(cs)INSearchForMessagesIntentResponse"
  },
  "title" : "INSearchForMessagesIntentResponse"
}
-->

# INSearchForMessagesIntentResponse

Your app’s response to a search for messages intent.

```
class INSearchForMessagesIntentResponse
```

## Overview

Use an [`INSearchForMessagesIntentResponse`](/documentation/Intents/INSearchForMessagesIntentResponse) object to specify the results of searching the user’s messages. After performing a search using the criteria specified in the [`INSearchForMessagesIntent`](/documentation/Intents/INSearchForMessagesIntent) object, create an instance of this class with the results of that search. Siri communicates the status from your response to the user at appropriate times.

You create an [`INSearchForMessagesIntentResponse`](/documentation/Intents/INSearchForMessagesIntentResponse) object in the [`confirm(intent:completion:)`](/documentation/Intents/INSearchForMessagesIntentHandling/confirm(intent:completion:)) and [`handle(intent:completion:)`](/documentation/Intents/INSearchForMessagesIntentHandling/handle(intent:completion:)) methods of your search for messages handler object. For more information about implementing your handler object, see [`INSearchForMessagesIntentHandling`](/documentation/Intents/INSearchForMessagesIntentHandling).

## Topics

### Initializing the Response Object

[`init(code:userActivity:)`](/documentation/Intents/INSearchForMessagesIntentResponse/init(code:userActivity:))

Initializes the response object with the specified code and user activity object.

### Getting the Response Code

[`code`](/documentation/Intents/INSearchForMessagesIntentResponse/code)

The code indicating whether you successfully handled the intent.

[`INSearchForMessagesIntentResponseCode`](/documentation/Intents/INSearchForMessagesIntentResponseCode)

Constants that indicate the response state.

### Accessing the Response Details

[`messages`](/documentation/Intents/INSearchForMessagesIntentResponse/messages)

The array of messages matching the search parameters.



---

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)