# Sign in with another account

> Sign in with another account: 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/switchAccountBrowserSession

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

The customer signed in to the provider with an account that does not hold the domain (the view says `wrongAccount`), and tries another one. Allowed only then. The control plane signs the cloud browser out of the provider in the background (the provider's own sign out page, then the browser forgets the provider's cookies and storage, never a social sign in's) and opens the provider's sign in again; meanwhile the view says `notice` `switching_account` and takes no input. The sign in window starts again; the hard cap does not move. At most three accounts are tried: the third that does not hold the domain ends the session (`failed`, `error.code` `browser_wrong_account`), and so does a sign out that fails. No body.

### Authentication

`browserSession`

### Parameters

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

### Responses

| Status | Description |
| --- | --- |
| `202` | Signing out; the sign in follows. |
| `401` | `browser_expired`: the token is wrong, expired, or for another session. |
| `404` | Error envelope: {code, title, details}. |
| `409` | `browser_wrong_state`: the session is not waiting for a choice of account (no `wrongAccount` in the view), or is signing out already. |
| `410` | `browser_expired`: the session ran out of time. |
| `429` | `browser_rate_limited`: switched less than ten seconds ago. |

### `202` response body

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

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