> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runaether.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Poll Codex device auth



## OpenAPI

````yaml api-reference/openapi.account.json POST /codex/device-auth/poll
openapi: 3.1.0
info:
  title: Aether Account & Integrations API
  version: 0.1.0
  description: >-
    Account, billing, and integration-management endpoints used by the Aether
    web app and CLI. Root-mounted; NOT part of the versioned /v1 contract.
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /codex/device-auth/poll:
    post:
      tags:
        - codex-auth
      summary: Poll Codex device auth
      operationId: pollCodexDeviceAuth
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PollCodexDeviceAuthRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PollCodexDeviceAuthResponse'
          description: OK
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PollCodexDeviceAuthResponse'
          description: Accepted
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Gateway
components:
  schemas:
    PollCodexDeviceAuthRequest:
      additionalProperties: false
      properties:
        device_auth_id:
          minLength: 1
          pattern: \S
          type: string
        user_code:
          minLength: 1
          pattern: \S
          type: string
      required:
        - device_auth_id
        - user_code
      type: object
    PollCodexDeviceAuthResponse:
      discriminator:
        mapping:
          complete:
            $ref: '#/components/schemas/PollCodexDeviceAuthCompleteResponse'
          pending:
            $ref: '#/components/schemas/PollCodexDeviceAuthPendingResponse'
        propertyName: status
      oneOf:
        - $ref: '#/components/schemas/PollCodexDeviceAuthPendingResponse'
        - $ref: '#/components/schemas/PollCodexDeviceAuthCompleteResponse'
    ErrorResponse:
      additionalProperties: false
      properties:
        code:
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
      type: object
    PollCodexDeviceAuthCompleteResponse:
      additionalProperties: false
      properties:
        auth:
          $ref: '#/components/schemas/CodexSubscriptionAuthStatus'
        status:
          enum:
            - complete
          type: string
      required:
        - status
        - auth
      type: object
    PollCodexDeviceAuthPendingResponse:
      additionalProperties: false
      properties:
        status:
          enum:
            - pending
          type: string
      required:
        - status
      type: object
    CodexSubscriptionAuthStatus:
      additionalProperties: false
      properties:
        account_id:
          minLength: 1
          type: string
        email:
          minLength: 1
          type: string
        plan_type:
          enum:
            - free
            - go
            - plus
            - pro
            - team
            - business
            - enterprise
            - edu
            - unknown
          type: string
        type:
          enum:
            - subscription
          type: string
      required:
        - type
        - account_id
        - plan_type
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````