> ## Documentation Index
> Fetch the complete documentation index at: https://docs.privy.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update an account

> Update an existing account display name or add new wallets to the account

Update an existing account by its unique account ID. Update the account's display name and add new wallets to the account.

When updating an account:

* Update the **display name** for the account.
* Add new **wallets** to the account, either by providing a `wallets_configuration` to create new wallets, or a list of `wallet_ids` to add existing wallets. Wallets cannot be removed from an account.

<Tip>
  [Update the wallets](/wallets/wallets/update-a-wallet) within an account directly to set [owners,
  signers,](/controls/authorization-keys/owners/overview) [policies](/controls/policies/overview),
  and more.
</Tip>

<Info>View the full [API reference](/api-reference/accounts/update) for updating an account.</Info>

## Usage

<Tabs>
  <Tab title="REST API">
    To update an account via REST API, make a `PATCH` request to:

    ```bash theme={"system"}
    https://api.privy.io/v1/accounts/{account_id}
    ```

    ### Path parameters

    <ParamField path="account_id" type="string" required>
      The unique ID of the account to update.
    </ParamField>

    ### Body

    <ParamField path="display_name" type="string">
      An optional display name for the account.
    </ParamField>

    Provide exactly **one** of the following (`wallets_configuration` or `wallets_ids`) to add wallets to the account:

    <ParamField path="wallets_configuration" type="object[]">
      New wallets to create and add to the account, each specified with a chain type and optional custody configuration. Maximum of five wallets total per account.

      Mutually exclusive with `wallet_ids`.

      Each item in the array has the following fields:

      <Expandable title="wallets_configuration item fields">
        <ParamField path="chain_type" type="'ethereum' | 'solana'" required>
          The chain type of the wallet to create.
        </ParamField>

        <ParamField path="custody" type="object">
          The custody configuration for the wallet. If omitted, the wallet is non-custodial.

          <Expandable title="custody fields">
            <ParamField path="provider" type="string" required>
              The custody provider. Currently, `'bridge'` is the only supported value.
            </ParamField>

            <ParamField path="provider_user_id" type="string" required>
              The custody provider's unique ID for the KYC'ed entity associated with the wallet.
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="wallet_ids" type="string[]" required>
      IDs of existing wallets to add to the account. Must contain between one and five wallet IDs.

      Mutually exclusive with `wallets_configuration`.
    </ParamField>

    ### Response

    <ResponseField name="id" type="string">
      The unique ID of the account.
    </ResponseField>

    <ResponseField name="display_name" type="string | null">
      The updated display name for the account, or `null` if not set.
    </ResponseField>

    <ResponseField name="wallets" type="object[]">
      All wallets in the account, including any newly added wallets. Each wallet contains:

      * `id` (string): The wallet ID
      * `chain_type` (`'ethereum' | 'solana'`): The chain type of the wallet
      * `address` (string): The on-chain address of the wallet
      * `custody` (object | undefined): The custody configuration, if the wallet is custodial
    </ResponseField>

    ### Examples

    #### Using `wallets_configuration`

    Use `wallets_configuration` to create and add new wallets to the account.

    **Request**

    ```bash theme={"system"}
    curl --request PATCH https://api.privy.io/v1/accounts/<account-id> \
      -u "your-app-id:your-app-secret" \
      -H "privy-app-id: your-app-id" \
      -H "Content-Type: application/json" \
      -d '{
        "display_name": "Updated Account Name",
        "wallets_configuration": [
          {
            "chain_type": "solana"
          }
        ]
      }'
    ```

    **Response**

    ```json theme={"system"}
    {
      "id": "<account-id>",
      "display_name": "Updated Account Name",
      "wallets": [
        {
          "id": "<wallet-id>",
          "chain_type": "ethereum",
          "address": "0x4f3A1c8B2dE07f59Ca83b1eD6F42c9Ae5d03B7e"
        },
        {
          "id": "<wallet-id>",
          "chain_type": "ethereum",
          "address": "0x9bC2E4A0dF31856e7a4D9cB3F108e2Ac6b75d1E",
          "custody": {
            "provider": "bridge",
            "provider_user_id": "<insert-provider-user-id>"
          }
        },
        {
          "id": "<wallet-id>",
          "chain_type": "solana",
          "address": "7mXkPqR3nWvJhYzT5sLdAeG2cFbN9pUoViQwKtBxC4D"
        }
      ]
    }
    ```

    #### Using `wallet_ids`

    Use `wallet_ids` to add existing wallets to the account.

    **Request**

    ```bash theme={"system"}
    curl --request PATCH https://api.privy.io/v1/accounts/<account-id> \
      -u "your-app-id:your-app-secret" \
      -H "privy-app-id: your-app-id" \
      -H "Content-Type: application/json" \
      -d '{
        "wallet_ids": [
          "<wallet-id-1>"
        ]
      }'
    ```

    **Response**

    ```json theme={"system"}
    {
      "id": "<account-id>",
      "display_name": "Updated Account Name",
      "wallets": [
        {
          "id": "<wallet-id>",
          "chain_type": "ethereum",
          "address": "0x4f3A1c8B2dE07f59Ca83b1eD6F42c9Ae5d03B7e"
        },
        {
          "id": "<wallet-id-1>",
          "chain_type": "solana",
          "address": "7mXkPqR3nWvJhYzT5sLdAeG2cFbN9pUoViQwKtBxC4D"
        }
      ]
    }
    ```
  </Tab>
</Tabs>
