# ブラウザープロファイルを変更

既存のブラウザープロファイルを更新します。リクエストに含まれるフィールドのみが変更されます。
- **前提条件**
：プロファイルがチーム内に存在すること。エンドツーエンド暗号化されたプロファイルは更新できません。OS とブラウザー種別は変更できません。起動中のプロファイルも更新できます。
- **副作用**
：プロファイルのレコード、その拡張設定、Cookie を書き込み、高度な指紋設定をマージします（上書きされない限り既存の値は保持されます）。
- **完了シグナル**
：同期的です。
- **リトライ**
：同一のリクエストボディで繰り返しても安全です。ただし楽観ロックはありません。同一プロファイルへの同時更新は後書き優先で、指紋のマージは書き込み前に読み取るため、同時に呼び出すと変更が失われることがあります。
- **Open API**
：カーネルを再マッチングする必要がある場合、プロファイルに既に保存されている OS が使われます。クライアントの OS やバージョンは読み取りません。

文書化されたビジネスエラー: `19001`, `19039`, `19104`, `19105`, `19106`, `19107`, `19108`, `19142`, `19159`, `19160`, `19175`, `19193`。 各コードの意味は [Error Codes](/ja/api-reference/getting-started/error-codes) を参照してください。どの操作でも共通コードが返る場合があります。

Endpoint: POST /env/update
Version: 2026-09-05
Security: OpenApiBearer

## Security:

  - `OpenApiBearer` (unknown)
    http bearer JWT

## Request fields (application/json):

  - `envId` (string, required)
    プロファイル ID。リクエストはフィールド別名 `id` も受け付けます。
    Example: 1800000000000001

  - `envName` (string)
    プロファイル名。
    Example: marketing-01-updated

  - `groupId` (string)
    グループ ID。`0` は未グループを表します。
    Example: 0

  - `groupName` (string)
    グループ名。指定すると、そのグループを検索するか自動的に作成します。
    Example: Marketing

  - `tagIds` (array)
    タグ ID の一覧。
    Example: ["1800000000000301"]

  - `proxyId` (string)
    既存のプロキシ ID。`0` はプロキシなしを表します。
    Example: 0

  - `envRemark` (string)
    プロファイルの備考。
    Example: Updated through the Open API

  - `uaVersion` (integer)
    UA のメジャーバージョン。
    Example: 124

  - `browserCore` (integer)
    カーネルのメジャーバージョン。
    Example: 124

  - `systemBitType` (integer)
    システムのビット数。デフォルトは `1`：
- `0`
 — 32 ビット
- `1`
 — 64 ビット
    Enum: "0", "1"

  - `architecture` (integer)
    CPU アーキテクチャ。デフォルトは `0`：
- `0`
 — x86
- `1`
 — ARM
    Enum: "0", "1"

  - `accountInfo` (object)
    プロファイルに紐付いたプラットフォームアカウント。

  - `accountInfo.username` (string)
    プラットフォームアカウントのユーザー名。
    Example: account@example.com

  - `accountInfo.password` (string)
    プラットフォームアカウントのパスワード。
    Example: secret

  - `accountInfo.siteId` (string)
    サイト ID。
    Example: 1800000000000201

  - `accountInfo.platformId` (string, required)
    プラットフォーム ID。`9999` はカスタムプラットフォームを意味します。
    Example: 9999

  - `accountInfo.customerUrl` (string)
    カスタムプラットフォームの URL。`platformId` が `9999` の場合は必須です。有効な URL である必要があります。
    Example: https://example.com

  - `accountInfo.otpSecret` (string)
    2 要素認証（2FA）のシークレット。
    Example: BASE32SECRET

  - `isShowAccount` (integer)
    パスワード保護スイッチ。
    Enum: "0", "1"

  - `afterStartupConfig` (object)
    ブラウザ起動後に適用される動作。

  - `afterStartupConfig.afterStartup` (integer)
    起動時の動作。デフォルトは `1`：
- `1`
 — 前回セッションのページを再度開く
- `2`
 — 指定したページを開く
- `3`
 — 指定したページとプラットフォームを開く
- `4`
 — 前回セッションのページとプラットフォームを再度開く
    Enum: "1", "2", "3", "4"

  - `afterStartupConfig.autoOpenUrls` (array)
    自動的に開くページ。各要素は有効な URL である必要があります。
    Example: ["https://example.com"]

  - `afterStartupConfig.stayOnCheckIPPage` (boolean)
    起動後に IP 確認ページに留まるかどうか。
    Example: false

  - `startupParams` (array)
    Example: ["--disable-notifications"]

  - `cookies` (string)
    JSON テキスト形式の Cookie。
    Example: [{"name":"sid","value":"abc"}]

  - `advancedSetting` (object)
    動的な指紋設定。キーはプロファイルの高度な設定プロトコルに由来し、
値はキーに応じて文字列、数値、真偽値、配列、オブジェクトのいずれかになります。
    Example: {"language":"en-US","timezone":"America/Los_Angeles"}

  - `disableAudio` (integer)
    オーディオ再生をブロックするかどうか。
    Enum: "0", "1"

  - `disableVideo` (integer)
    動画の読み込みをブロックするかどうか。
    Enum: "0", "1"

  - `disableImg` (integer)
    画像の読み込みをブロックするかどうか。
    Enum: "0", "1"

  - `imgLimitSize` (integer)
    読み込む画像の最大サイズ（KB）。
    Example: 1000

  - `hostnameSource` (integer)
    端末名のソース：
- `0`
 — カスタム
- `1`
 — 実際の値
    Enum: "0", "1"

  - `hostname` (string)
    端末名。`hostnameSource` が `0` のときに使われます。
    Example: DESKTOP-OPENAPI

  - `macAddressSource` (integer)
    MAC アドレスのソース：
- `0`
 — カスタム
- `1`
 — 実際の値
    Enum: "0", "1"

  - `macAddress` (string)
    MAC アドレス。`macAddressSource` が `0` のときに使われます。
    Example: 00:16:3E:12:34:56

## Response 200:

  - `200` (unknown)
    Success

## Response 200 fields (application/json):

  - `code` (integer, required)
    Return result code. `0` means success; other codes indicate exceptions.
    Example: 0

  - `msg` (string | null, required)
    Error message. Usually `null` on success.
    Example: null

  - `requestId` (string)
    Operation request ID. This field may be present when the request passes through the API gateway.
    Example: 1d4f3ea968664593860b94b35d4ebf5e

  - `data` (null)
    Example: null

