# 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.

<codetabs>

<codetabs-item value="aspnet" label=".NET">

```csharp
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);
```

</codetabs-item>

</codetabs>

### Get Many

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

<codetabs>

<codetabs-item value="aspnet" label=".NET">

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

</codetabs-item>

</codetabs>

### Delete Many

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

<codetabs>

<codetabs-item value="aspnet" label=".NET">

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

</codetabs-item>

</codetabs>


---

This page was last updated at 2026-03-16T10:38:03.481Z.

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