# Hand the cloud browser sign in to a new popup

> Hand the cloud browser sign in to a new popup: reference page for this CustomDomain™ API operation. Covers parameters, request body, responses and error codes.

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

## `POST https://api.customdomain.ai/v1/connections/{id}/browser:resume`

**Customer present only.** The customer left the popup to read a code in their mail app and the phone threw it away, or closed the window by mistake, while the session still waits on them. This hands the SAME session (the same remote browser, still on the provider's page) to a new popup: the answer is the one of `browser:start`, with a new single use bootstrap code in the popup's address, and the previous popup's session token stops working at once. One popup at a time.

Allowed only while the session waits on the customer: about to sign in, signing in (a code prompt included), or while the agent has handed the page back. It takes the gate of `browser:start` (an end user's widget token bound to the domain and the end user, or the console, and an `Origin` on the return origin allowlist). A session takes a few, one every few seconds.

### Authentication

`widgetJWT`, `apiKey`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `locale` | string | no | The language the new popup reads in, a plain code such as `en`. Defaults to the session's. |
| `session_id` | string | no | The session the caller last held. When present and the connection's waiting session is another one, the answer is `409 browser_not_waiting`, and the caller starts a new sign in. |
| `return_origin` | string | no | The caller's origin, as for `browser:start`. When present it must be an allowed origin; the session keeps the origin it started with. |
| `viewport_hint` | object | no | Accepted for symmetry with `browser:start` and not used; the session keeps its size. |

### Responses

| Status | Description |
| --- | --- |
| `200` | The session was handed to a new popup. |
| `400` | Error envelope: {code, title, details}. |
| `401` | Error envelope: {code, title, details}. |
| `403` | `browser_customer_present_only` (as for `browser:start`), or `workspace_suspended`. |
| `404` | Error envelope: {code, title, details}. |
| `409` | `browser_not_waiting`: no secure sign in for this domain is waiting on the customer (none is running, or the agent or a change is working). |
| `410` | `browser_expired`: the session ran out of time. |
| `429` | `browser_rate_limited`: resumed a moment ago (`Retry-After`), or too many times for one session (start again). |
| `503` | Error envelope: {code, title, details}. |

### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `session_id` | string | yes | The same session id the start answered. |
| `open_url` | string | yes | The popup page, with `#c=<new bootstrap code>&l=<locale>` in its fragment. |
| `vendor` | string | yes | The browser hosting company, shown to the customer. |
| `expires_at` | string | yes | The latest the session can end now. |

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