---
title: "Open an inline native login terminal for a new AO Codex account"
method: POST
path: "/api/v1/agents/codex/accounts/login-terminal"
tags: ["agents"]
---

# Open an inline native login terminal for a new AO Codex account

`POST /api/v1/agents/codex/accounts/login-terminal`

## Response `202`

Accepted

- OpenCodexAccountLoginTerminalResponse
  - `operation` CodexAccountLoginResponse, required
    - `account` CodexAccountResponse
      - `accountEmail` string, nullable
      - `active` boolean, required
      - `authMethod` 'chatgpt' | 'api_key' | 'other' | 'unknown', required
      - `authentication` CodexAuthenticationResponse, required
        - `attemptedAt` string, date-time, nullable, required
        - `checkedAt` string, date-time, nullable, required
        - `freshness` 'fresh' | 'stale' | 'checking', required
        - `reason` string, required
        - `reasonCode` string, required
        - `state` 'authorized' | 'unauthorized' | 'unknown' | 'not_applicable', required
      - `capacity` CodexAccountCapacityResponse, required
        - `additionalBuckets` CodexCapacityBucketResponse[], required
          - `displayName` string, nullable
          - `primary` CodexCapacityWindowResponse
            - `resetsAt` string, date-time, nullable
            - `usedPercent` number, double, required
            - `windowDurationMinutes` integer, nullable
          - `reached` 'not_reached' | 'reached' | 'unknown', required
          - `secondary` CodexCapacityWindowResponse
            - `resetsAt` string, date-time, nullable
            - `usedPercent` number, double, required
            - `windowDurationMinutes` integer, nullable
        - `attemptedAt` string, date-time, nullable
        - `checkedAt` string, date-time, nullable
        - `freshness` 'fresh' | 'stale' | 'checking', required
        - `observedAt` string, date-time, nullable
        - `overall` CodexCapacityBucketResponse
          - `displayName` string, nullable
          - `primary` CodexCapacityWindowResponse
            - `resetsAt` string, date-time, nullable
            - `usedPercent` number, double, required
            - `windowDurationMinutes` integer, nullable
          - `reached` 'not_reached' | 'reached' | 'unknown', required
          - `secondary` CodexCapacityWindowResponse
            - `resetsAt` string, date-time, nullable
            - `usedPercent` number, double, required
            - `windowDurationMinutes` integer, nullable
        - `plan` string, nullable
        - `reason` string, required
        - `reasonCode` string, required
        - `remainingPercent` number, nullable
        - `resetCredits` CodexResetCreditsSummaryResponse
          - `availableCount` integer, required
          - `nearestExpiresAt` string, date-time, nullable
        - `resetsAt` string, date-time, nullable
        - `state` 'available' | 'near_limit' | 'exhausted' | 'unknown' | 'unsupported', required
        - `usedPercent` number, nullable
      - `createdAt` string, date-time, required
      - `id` string, required
      - `label` string, required
      - `reason` string, required
      - `reasonCode` string, required
      - `status` 'valid' | 'signed_out' | 'broken', required
      - `usageSummary` CodexAccountUsageSummaryResponse
        - `currentStreakDays` integer, nullable
        - `latestDayStartDate` string, nullable
        - `latestDayTokens` integer, nullable
        - `lifetimeTokens` integer, nullable
        - `longestRunningTurnSeconds` integer, nullable
        - `longestStreakDays` integer, nullable
        - `observedAt` string, date-time, required
        - `peakDailyTokens` integer, nullable
    - `accountId` string
    - `expiresAt` string, date-time, required
    - `operationId` string, required
    - `reason` string, required
    - `reasonCode` string, required
    - `status` 'pending' | 'verifying' | 'unauthorized' | 'retryable' | 'completed' | 'cancelled' | 'failed' | 'expired', required
  - `shellTerminal` CodexAccountLoginTerminalResponse, required
    - `createdAt` string, date-time, required
    - `handleId` string, required
    - `title` string, required

## Other responses

- `409` — Conflict
- `501` — Not Implemented
- `503` — Service Unavailable

## Changes

- **2026-09-15** `7f5cb1f3ca16` — 1 warning, 1 info
  - added the new `retryable` enum value to the `operation/status` response property for the response status `202`
  - removed the `unverified` enum value from the `operation/status` response property for the response status `202`
- **2026-09-03** `d31a2d019c47` — 3 info
  - added the optional property `reporting_owner` to the response with the `409` status
  - added the optional property `reporting_owner` to the response with the `501` 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/accounts/login-terminal/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/1e9e4bbb67f1?raw)
