# Approve the exact plan

> Approve the exact plan: CustomDomain™ API reference in the cloud browser group. Covers request parameters, the request body, responses and error codes.

Source: https://docs.customdomain.ai/docs/api-reference/cloud-browser/approveBrowserSession

## `POST https://api.customdomain.ai/v1/browser-sessions/{sid}:approve`

Works once, only in `plan_ready`, only within the approval window (180 seconds), and only with the exact current plan hash. A wrong hash writes nothing. If the records changed after the plan was made, the session returns to `checking` with a fresh plan and a new hash.

### Authentication

`browserSession`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `sid` | path | string | yes | The cloud browser session id, `bs_` and 32 hex characters. |

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `plan_hash` | string | yes | All 64 hex characters of the plan hash on screen. |

### Responses

| Status | Description |
| --- | --- |
| `202` | Applying. |
| `401` | Error envelope: {code, title, details}. |
| `409` | `browser_plan_mismatch` (not the current plan) or `browser_wrong_state` (not in `plan_ready`, or already approved). |
| `410` | `browser_expired`: the approval window ran out. |

### `202` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `state` | `applying` | no |  |

The full specification is served at `GET https://api.customdomain.ai/v1/openapi.json`.
