---
title: "updateEntities(_:for:)"
framework: appintents
role: symbol
role_heading: Instance Method
path: "appintents/relevantentities/updateentities(_:for:)"
---

# updateEntities(_:for:)

Donates suggested entities for a single context.

## Declaration

```swift
func updateEntities(_ entities: [any AppEntity], for context: AppEntityContext) async throws
```

## Parameters

- `entities`: The entities to donate.
- `context`: The context with which to associate the donated entities.

## Mentioned in

Donating your app’s data and actions to the system

## Discussion

Discussion Replaces any previously donated entities associated with the given context. note: An error if the donation fails.
