bitwarden/server · error · BadRequestException
You can only restore up to 500 items at a time.
Error message
You can only restore up to 500 items at a time.
What it means
Error "You can only restore up to 500 items at a time." thrown in bitwarden/server.
Source
Thrown at src/Api/Vault/Controllers/CiphersController.cs:1168
{
var userId = _userService.GetProperUserId(User).Value;
var cipher = await GetByIdAsyncAdmin(id);
if (cipher == null || !cipher.OrganizationId.HasValue ||
!await CanDeleteOrRestoreCipherAsAdminAsync(cipher.OrganizationId.Value, new[] { cipher.Id }))
{
throw new NotFoundException();
}
await _cipherService.RestoreAsync(new CipherDetails(cipher), userId, true);
return new CipherMiniResponseModel(cipher, _globalSettings, cipher.OrganizationUseTotp);
}
[HttpPut("restore")]
public async Task<ListResponseModel<CipherMiniResponseModel>> PutRestoreMany([FromBody] CipherBulkRestoreRequestModel model)
{
if (!_globalSettings.SelfHosted && model.Ids.Count() > 500)
{
throw new BadRequestException("You can only restore up to 500 items at a time.");
}
var userId = _userService.GetProperUserId(User).Value;
var cipherIdsToRestore = new HashSet<Guid>(model.Ids.Select(i => new Guid(i)));
var restoredCiphers = await _cipherService.RestoreManyAsync(cipherIdsToRestore, userId);
var responses = restoredCiphers.Select(c => new CipherMiniResponseModel(c, _globalSettings, c.OrganizationUseTotp));
return new ListResponseModel<CipherMiniResponseModel>(responses);
}
[HttpPut("restore-admin")]
public async Task<ListResponseModel<CipherMiniResponseModel>> PutRestoreManyAdmin([FromBody] CipherBulkRestoreRequestModel model)
{
if (!_globalSettings.SelfHosted && model.Ids.Count() > 500)
{
throw new BadRequestException("You can only restore up to 500 items at a time.");
}
View on GitHub (pinned to e93b962371)
Solutions
- Split the restore request into batches of 500 items or fewer.
- Use the vault purge or bulk management UI options for very large restore operations.
When it happens
Trigger: Thrown when a restore request includes more than 500 cipher IDs in a single bulk restore operation.
Common situations: See trigger scenarios.
AI-assisted analysis of bitwarden/server@e93b962371 (2026-08-13).
Data as JSON: /api/errors/6a3b98942f602f1e.
Report an issue: GitHub.