---
title: "Start a global AO Codex account switch"
method: POST
path: "/api/v1/agents/codex/account-switches"
tags: ["agents"]
---

# Start a global AO Codex account switch

`POST /api/v1/agents/codex/account-switches`

## Request body

- StartCodexAccountSwitchRequest
  - `expectedAccountRevision` integer, nullable
  - `idempotencyKey` string, required
  - `targetAccountId` string, required

## Response `202`

Accepted

- CodexAccountSwitchResponse
  - `completedAt` string, date-time, nullable
  - `createdAt` string, date-time, required
  - `credentialsCommittedAt` string, date-time, nullable
  - `failureCode` string
  - `id` string, required
  - `phase` 'requested' | 'checkpointing_source' | 'activating_target' | 'recovery_required' | 'completed' | 'failed', required
  - `sourceAccountId` string
  - `sourceKind` 'managed' | 'device' | 'none', required
  - `targetAccountId` string, required
  - `updatedAt` string, date-time, required

## Other responses

- `400` — Bad Request
- `409` — Conflict
- `503` — Service Unavailable

## Changes

- **2026-09-15** `7f5cb1f3ca16` — 4 breaking, 9 info
  - the `expectedAccountRevision` request property type changed from `integer` to `null, integer`, and format from `int64` to no format
  - the response property `sourceAccountId` became optional for the status `202`
  - removed the required property `canRecover` from the response with the `202` status
  - removed the required property `sessions` from the response with the `202` status
  - …9 more
- **2026-09-03** `d31a2d019c47` — 3 info
  - added the optional property `reporting_owner` to the response with the `400` status
  - added the optional property `reporting_owner` to the response with the `409` status
  - added the optional property `reporting_owner` to the response with the `503` status
- **2026-09-03** `0989da474d24` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/changes/api/v1/agents/codex/account-switches/post.md)

---

[API](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon.md) · [All operations](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/llms.txt) · [OpenAPI document](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/revisions/18ef9deb25de?raw)
