---
title: "Put Codex Seat Login"
method: PUT
path: "/api/system/codex-seat/login"
tags: ["system"]
---

# Put Codex Seat Login

`PUT /api/system/codex-seat/login`

## Request

- Base URL: `https://api.pigeonly.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pigeonly.com/api/system/codex-seat/login`
- Auth: none declared

Write back the rooster container's refreshed ChatGPT login (BAKE4-2).

FOR THE `rooster` SERVICE ONLY. The Codex CLI rotates the refresh token in
`auth.json` on every refresh and that container has no volume, so the newest
copy is kept in the vault as `codex_auth_json` and restored at start
(`apps/rooster/codex_seat_vault.py`). Stored only when STRICTLY newer, under
a database lock. Answers `{"status": "written" | "unchanged" | "stale"}`
(`stale`: the vault's copy is newer, adopt it); 422 for a body that is not a
ChatGPT login; 503 without a vault key. The login text is never returned or
logged.

## Request body

- CodexSeatLoginRequest: The `auth.json` the Codex CLI wrote. Its text is never echoed back.
  - `auth_json` string, required

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os.md) - [All operations](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/llms.txt) - [OpenAPI document](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/revisions/14571c4b7007?raw)
