---
title: "POST /v1/matters/{matterId}/holds/{holdId}:addHeldAccounts"
method: POST
path: "/v1/matters/{matterId}/holds/{holdId}:addHeldAccounts"
tags: ["matters"]
---

# POST /v1/matters/{matterId}/holds/{holdId}:addHeldAccounts

`POST /v1/matters/{matterId}/holds/{holdId}:addHeldAccounts`

## Request

- Base URL: `https://vault.googleapis.com`
- URL: `https://vault.googleapis.com/v1/matters/{matterId}/holds/{holdId}:addHeldAccounts`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/ediscovery`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/ediscovery`
- TypeScript: <https://skmtc.dev/google/apis/vault/docs/v1/matters/:matterId/holds/:holdId:addHeldAccounts/post.ts> (a function with typed inputs; its response is checked against the schema)

Adds accounts to a hold. Returns a list of accounts that have been successfully added. Accounts can be added only to an existing account-based hold.

## Path parameters

- `matterId` string, required
- `holdId` string, required

## Request body

- AddHeldAccountsRequest: Add a list of accounts to a hold.
  - `accountIds` string[]: A comma-separated list of the account IDs of the accounts to add to the hold. Specify either **emails** or **account_ids**, but not both.
  - `emails` string[]: A comma-separated list of the emails of the accounts to add to the hold. Specify either **emails** or **account_ids**, but not both.

## Response `200`

Successful response

- AddHeldAccountsResponse: Response for batch create held accounts.
  - `responses` AddHeldAccountResult[]: The list of responses, in the same order as the batch request.
    - `account` HeldAccount: An account covered by a hold. This structure is immutable. It can be an individual account or a Google Group, depending on the service. To work with Vault resources, the account must have the [required Vault privileges] (https://support.google.com/vault/answer/2799699) and access to the matter. To access a matter, the account must have created the matter, have the matter shared with them, or have the **View All Matters** privilege.
      - `accountId` string: The account ID, as provided by the [Admin SDK](https://developers.google.com/admin-sdk/).
      - `email` string: The primary email address of the account. If used as an input, this takes precedence over **accountId**.
      - `firstName` string: Output only. The first name of the account holder.
      - `holdTime` string, google-datetime: Output only. When the account was put on hold.
      - `lastName` string: Output only. The last name of the account holder.
    - `status` Status: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
      - `code` integer: The status code, which should be an enum value of google.rpc.Code.
      - `details` object[]: A list of messages that carry the error details. There is a common set of message types for APIs to use.
      - `message` string: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.

## Changes

- **2026-10-10** `ddd37fff1925`: 2 breaking
  - removed the request body
  - removed the media type `*/*` for the response with the status `200`

[Operation history](https://skmtc.dev/google/apis/vault/changes/v1/matters/:matterId/holds/:holdId:addHeldAccounts/post.md)

---

[API](https://skmtc.dev/google/apis/vault.md) - [All operations](https://skmtc.dev/google/apis/vault/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/vault/revisions/726c68a20360?raw)
