# Hand a connected cloud browser to a person

> Gives control to the person in the live view before they take it themselves.

Source: https://docs.spicrawl.com/api-reference/browser/browser-takeover

## POST /v1/browser/sessions/{id}/takeover

Operation ID: `browserTakeover`. API key scope: `browser`.

Gives control to the person in the live view before they take it themselves. Your connection's
input, navigation and tab changes then fail with CDP error -32001 until control is released.
The person can also take and give back control from the live view.

### Example

```bash
curl -X POST "https://api.spicrawl.com/v1/browser/sessions/{id}/takeover" \
  -H "Authorization: Bearer $SPICRAWL_API_KEY"
```

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | The `session_id` that `POST /v1/browser/token` returned for this connection. An unknown, closed or other organization's session answers 404 `ERR::REQUEST::NOT_FOUND`. |

### Responses

#### 200

Who drives the session, sent with Cache-Control no-store.

`application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `session_id` | string | yes |  |
| `status` | string | yes |  |
| `controller` | string | yes | `agent` (your CDP connection drives) or `human` (a person in the live view drives). |
| `expires_at` | string (date-time) | yes | When the session ends at the latest (its `session_ttl`). |

#### 401

Missing, invalid, revoked or expired key. Not retryable with the same key.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

#### 403

The key lacks the scope this route requires (`ERR::AUTH::INSUFFICIENT_SCOPE`), or the action is not permitted.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

#### 404

No such resource for this key's organization.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

Full OpenAPI spec: https://docs.spicrawl.com/openapi.yaml
