---
title: requiredResponse
framework: matter
role: symbol
role_heading: Instance Property
path: matter/mtrcommandwithrequiredresponse/requiredresponse
---

# requiredResponse

The response that represents this command succeeding.

## Declaration

```swift
var requiredResponse: [NSNumber : [String : Any]]? { get set }
```

## Discussion

Discussion If this is nil, that indicates that the invoke is considered successful if it does not result in an error status response. If this is is not nil, then the invoke is considered successful if the response is a data response and for each entry in the provided requiredResponse the field whose field ID matches the key of the entry has a value that equals the value of the entry.  Values of entries are data-value dictionaries.
