---
title: "Confirm a pending switch to another Google account: the mirror state is cleared and the new account takes over. 409 drive_account_switch_expired when none is pending. Clerk session only."
method: POST
path: "/drive/account-switch"
tags: ["Google Drive"]
---

# Confirm a pending switch to another Google account: the mirror state is cleared and the new account takes over. 409 drive_account_switch_expired when none is pending. Clerk session only.

`POST /drive/account-switch`

## Request

- Base URL: `https://www.livediagram.app/api`
- URL: `https://www.livediagram.app/api/drive/account-switch`
- Auth: HTTP bearer

## Response `200`

Success.

- object
  - `connection` DriveConnection, required
    - `connectedAt` number, required
    - `hasRefreshToken` boolean, required
    - `pageToken` string, nullable, required
    - `pageTokenSavedAt` number, nullable, required
    - `pendingAccountSwitch` object, nullable, required
      - `expiresAt` number, required
    - `rootFolderId` string, nullable, required
    - `status` 'connected' | 'needs_reconnect', required

## Other responses

- `401`: Error.
- `409`: Error.
- `429`: Rate limited. Back off and retry.
- `503`: Error.

---

[API](https://skmtc.dev/livediagram/apis/livediagram-api.md) · [All operations](https://skmtc.dev/livediagram/apis/livediagram-api/llms.txt) · [OpenAPI document](https://skmtc.dev/livediagram/apis/livediagram-api/revisions/f286d27acfd2?raw)
