# クラウドランタイムを停止

プロファイルが動作しているクラウドランタイムを停止します。
- **前提条件**
：そのプロファイルについて、自分が開始した実行が存在する必要があります。ランタイムが既に停止済みまたは解放中の状態で呼び出した場合は、何もせず成功します。
- **副作用**
：課金を止め、使用量を確定し、プロファイルロックを解放し、ランタイム解放前にプロファイルと Cookie をクラウドへアーカイブするようクライアントへ要求します。
- **完了シグナル**
：
**受理されただけで、完了ではありません。**

`/cloudbrowser/page`
 をポーリングし、
`cloudBrowserStatus`
 が
`CLOSED`
 になり、
`cloudBrowserArchiveStatus`
 が
`COMPLETED`
 または
`FAILED`
 に達するまで待ちます。
- **アーカイブ失敗時**
：実行は課金対象のまま
`RUNNING`
 として表示され続けます。
`force`
 が効くのは
**この状態のときだけ**
で、アーカイブをスキップしてランタイムを解放します。これにより当該セッションのプロファイル変更は破棄されます。
- **同時実行**
：ひとつの実行に対する同時停止は直列化されるため、重複呼び出しは安全です。

文書化されたビジネスエラー: `40002`, `40006`, `40008`, `40020`。 各コードの意味は [Error Codes](/ja/api-reference/getting-started/error-codes) を参照してください。どの操作でも共通コードが返る場合があります。

Endpoint: POST /api/cloudbrowser/stop
Version: 2026-09-05

## Request fields (application/json):

  - `envId` (string, required)
    Browser profile (environment) ID. Serialized as a decimal string to avoid JavaScript
precision loss on 64-bit integers.
    Example: 1800000000000001

  - `force` (boolean)
    Whether to forcibly release the cloud runtime. Only takes effect when the current run has
an archive status of `FAILED`; in that case the archive step is skipped and runtime
resources are reclaimed. Ignored in all other cases.
    Example: false

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

