---
title: "Start a Codex ChatGPT device login"
method: POST
path: "/api/codex-oauth/device"
tags: ["Codex OAuth"]
---

# Start a Codex ChatGPT device login

`POST /api/codex-oauth/device`

## Request body

- object

## Response `200`

Device login started

- object
  - `flowId` string, uuid, required
  - `userCode` string, required
  - `verificationUrl` string, uri, required
  - `intervalSeconds` number, required
  - `expiresAt` string, date-time, required

## Other responses

- `409` — Device login is not enabled
- `500` — Failed to store device login state
- `502` — OpenAI device login request failed

## Changes

- **2026-09-25** `452be3d6b59a` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/changes/api/codex-oauth/device/post.md)

---

[API](https://skmtc.dev/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/revisions/01e2386c97da?raw)
