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

# Approve or deny a CLI device login

> Used by the dashboard page at /cli.

Dashboard session only: requests made with an API token are rejected.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/auth/device/approve
openapi: 3.1.0
info:
  title: OrbitLab API
  version: 1.0.0
  description: >-
    Manage OrbitLab services, deployments, domains, DNS, databases,
    organizations and billing programmatically. Authenticate with an API token:
    `Authorization: Bearer olab_…`.
servers:
  - url: https://orbitlab.dev/api
    description: Production
security: []
tags:
  - name: Authentication
    description: CLI device login.
  - name: User
    description: The authenticated user and their API tokens.
  - name: Organizations
    description: Organizations, members and invitations.
  - name: Catalog
    description: Plans and deployable templates.
  - name: Services
    description: 'Apps, WordPress sites and VPS: configuration, deployments and environment.'
  - name: Logs & metrics
    description: Build logs, runtime logs, request logs and resource usage.
  - name: Service domains
    description: Custom domains attached to a service.
  - name: Files
    description: File manager and SFTP access.
  - name: WordPress
    description: Managed actions (WP-CLI) and admin reset.
  - name: Hostings
    description: Shared hosting subscriptions and their websites.
  - name: Domains
    description: Domain registration, settings and DNS records.
  - name: Databases
    description: Managed databases.
  - name: Billing
    description: Checkout, orders, invoices, renewals and autopay.
  - name: GitHub
    description: GitHub App installations and repositories.
paths:
  /v1/auth/device/approve:
    post:
      tags:
        - Authentication
      summary: Approve or deny a CLI device login
      description: |-
        Used by the dashboard page at /cli.

        Dashboard session only: requests made with an API token are rejected.
      operationId: postAuthDeviceApprove
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                userCode:
                  type: string
                  description: Code shown by the CLI, e.g. `BCDF-GHJK`.
                approve:
                  type: boolean
                  description: '`false` to deny. Defaults to `true`.'
                organizationId:
                  type: string
                  description: Restrict the issued token to one organization; omit for all.
                  format: uuid
              required:
                - userCode
      responses:
        '200':
          description: '`status` (`approved` or `denied`) and `clientName`.'
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid or expired credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Not allowed for this token or organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited; see the Retry-After header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - sessionCookie: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          description: Error message (a string, or field errors for validation failures).
      required:
        - error
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: cookie
      name: authjs.session-token
      description: Dashboard browser session.

````