# Batch Endpoints

You can use batch endpoints to insert, delete or read multiple entries at once. These three endpoints are only available when running Stream on your backend.

### Upsert

Upsert allows you to insert or update up to 1000 entries with a single API call. The payload is an array of entries.
Entries that already exist (same ID) will be updated with the new version.

<Tabs>

```csharp label=".NET"
var users = new List<User>
{
  new User { Id = userIds[0], Data = new Dictionary<string, object> { { "field", "value1" } } },
  new User { Id = userIds[1], Data = new Dictionary<string, object> { { "field", "value2" } } },
};
//overrideExisting: to override existing users or skip themwith conflicting userIDs
var addResponse = await Client.UsersBatch.UpsertUsersAsync(users, overrideExisting: false);
```

</Tabs>

### Get Many

This method allows you to retrieve up to 1000 entries by ID.

<Tabs>

```csharp label=".NET"
//userIds list of userIds as string to fetch
var getUsersResponse = await Client.UsersBatch.GetUsersAsync(userIds);
```

</Tabs>

### Delete Many

This method allows you to delete up to 1000 entries by ID.

<Tabs>

```csharp label=".NET"
//userIds list of userIds as string to delete
var deleteResponse = await Client.UsersBatch.DeleteUsersAsync(userIds);
```

</Tabs>


---

This page was last updated at 2026-05-22T16:31:48.603Z.

For the most recent version of this documentation, visit [https://getstream.io/activity-feeds/docs/php/v2/batch-endpoints/](https://getstream.io/activity-feeds/docs/php/v2/batch-endpoints/).