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

# Start the CLI authentication process



## OpenAPI

````yaml https://manage.nervescloud.com/api/openapi post /api/auth/cli_session
openapi: 3.0.0
info:
  description: >
    The NervesCloud API gives users full access to their

    Orgs, Products, and corresponding Device fleets.


    The API can be used to integrate with your own systems, providing full
    access to your Product and Device data.


    The API is documented using the OpenAPI 3.0 specification.
  title: NervesCloud API
  version: 2.0.0
servers:
  - url: https://manage.nervescloud.com
    variables: {}
security:
  - bearer_auth: []
tags:
  - description: User authentication and API token creation
    name: Auth
  - description: Organization Certificate Authority management
    name: CA Certificates
  - description: >-
      Device management, including action requests eg. upgrade, reboot,
      reconnect
    name: Devices
  - description: Log lines Devices have sent over the logging extension
    name: Device Logs
  - description: >-
      Device management, including action requests eg. upgrade, reboot,
      reconnect
    name: Devices (short URL)
  - description: Device Certificate management
    name: Device Certificates
  - description: Identities a Device holds on networks NervesHub does not run
    name: Network Identities
  - description: Deployment Group and release management
    name: Deployment Groups
  - description: Firmware uploading and management
    name: Firmwares
  - description: Organization iroh endpoint id registration
    name: Iroh Endpoints
  - description: Organization management
    name: Organizations
  - description: Organization User membership management
    name: Organization Members
  - description: Product management
    name: Products
  - description: Organization Signing Key management
    name: Signing Keys
  - description: Product Support Script management
    name: Support Scripts
  - description: Platform healthcheck
    name: Platform Status
paths:
  /api/auth/cli_session:
    post:
      tags:
        - Auth
      summary: Start the CLI authentication process
      operationId: NervesHubWeb.API.UserController.cli_session
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserAuthCLISessionRequest'
        description: CLI Session attributes
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserAuthCLISessionResponse'
          description: Auth CLI session token response
      callbacks: {}
      security: []
components:
  schemas:
    UserAuthCLISessionRequest:
      description: POST body for authenticating a user via CLI session
      example:
        note: nerves_hub_cli 2.0.0
      properties:
        note:
          type: string
      title: UserAuthCLISessionRequest
      type: object
    UserAuthCLISessionResponse:
      description: Response for authenticating a new CLI session
      example:
        data:
          token: 218ed524-eb74-47d7-aedc-11e386961b72
          url: >-
            https://manage.nervescloud.com/auth/cli/218ed524-eb74-47d7-aedc-11e386961b72
      properties:
        data:
          $ref: '#/components/schemas/CLISession'
      title: UserAuthCLISessionResponse
      type: object
    CLISession:
      description: A new CLI auth exchange session
      example:
        confirmation_code: '312812'
        token: 218ed524-eb74-47d7-aedc-11e386961b72
        url: >-
          https://manage.nervescloud.com/auth/cli/218ed524-eb74-47d7-aedc-11e386961b72
      properties:
        confirmation_code:
          description: Confirmation code to help verify a valid auth exchange
          type: string
        token:
          description: Auth token
          type: string
        url:
          description: URL to complete the auth exchange
          type: string
      required:
        - token
        - url
      title: CLISession
      type: object
  securitySchemes:
    bearer_auth:
      scheme: bearer
      type: http

````