---
title: "Switch Active Account"
method: POST
path: "/api/v1/auth/accounts/switch"
tags: ["authentication"]
---

# Switch Active Account

`POST /api/v1/auth/accounts/switch`

## Request

- Base URL: `https://memory.kagura-ai.com` (the document declares no server; this is the origin it was published from)
- URL: `https://memory.kagura-ai.com/api/v1/auth/accounts/switch`
- Auth: none declared

Make another already-signed-in account active (#1488 Phase 2).

The security boundary is `switch_account`'s membership check: the target
must already be in THIS session's container. A caller naming an arbitrary
user id gets 404, not that user's session — there is no lookup anywhere in
this path, so no id a caller invents can widen their access.

404 rather than 403 on a non-member: whether some other account exists is
not this caller's business to learn.

## Headers

- `authorization` string, nullable

## Request body

- AccountSwitchRequest: Which already-signed-in account to make active (#1488).
  - `user_id` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud.md) · [All operations](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/revisions/09f17f5ada29?raw)
