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

# Enroll

> Exchange enrollment token for permanent VM API key



## OpenAPI

````yaml post /api/driver/enroll
openapi: 3.1.0
info:
  title: Axion Backend API
  description: Backend API for Axion platform with desktop automation capabilities
  version: 1.0.0
servers:
  - url: https://api.getgranite.ai
    description: Production server
  - url: http://localhost:8000
    description: Local development server
security: []
tags:
  - name: Authentication
    description: User authentication and session management
  - name: Organizations
    description: Organization management and membership
  - name: Health
    description: API health and status monitoring
  - name: Automations
    description: Automation planning and execution
  - name: MIG
    description: Managed Instance Group operations
  - name: Agent
    description: Agent execution and streaming
  - name: Onboarding
    description: Organization onboarding flow
  - name: Organization Automations
    description: Organization automation endpoint management
  - name: Organization Endpoints
    description: Public endpoints for organization automations
  - name: Analytics
    description: Analytics and reporting endpoints
paths:
  /api/driver/enroll:
    post:
      tags:
        - driver-enrollment
      summary: Enroll driver with enrollment token
      description: Exchange enrollment token for permanent VM API key
      operationId: enrollDriver
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DriverEnrollmentRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DriverEnrollmentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DriverEnrollmentRequest:
      properties:
        client_machine_id:
          type: string
          title: Client Machine Id
          description: Driver-generated UUID
        machine_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Machine Name
          description: Friendly machine name
        hostname:
          anyOf:
            - type: string
            - type: 'null'
          title: Hostname
          description: Machine hostname
        os_platform:
          anyOf:
            - type: string
            - type: 'null'
          title: Os Platform
          description: Operating system (Windows, Linux, Darwin)
        os_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Os Version
          description: OS version
        arch:
          anyOf:
            - type: string
            - type: 'null'
          title: Arch
          description: Architecture (x86_64, ARM64, etc.)
        driver_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Driver Version
          description: Driver version
        app_version:
          anyOf:
            - type: string
            - type: 'null'
          title: App Version
          description: App version
        executor_active:
          type: boolean
          title: Executor Active
          description: Whether driver is accepting jobs
          default: true
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Additional metadata
      type: object
      required:
        - client_machine_id
      title: DriverEnrollmentRequest
      description: Request to enroll a new driver (exchange token for API key)
    DriverEnrollmentResponse:
      properties:
        vm_api_key:
          type: string
          title: Vm Api Key
          description: Permanent API key for driver
        driver_machine_id:
          type: string
          title: Driver Machine Id
          description: Backend-assigned machine ID
        client_machine_id:
          type: string
          title: Client Machine Id
          description: Client's UUID (echoed back)
        org_id:
          type: string
          title: Org Id
          description: Organization ID
      type: object
      required:
        - vm_api_key
        - driver_machine_id
        - client_machine_id
        - org_id
      title: DriverEnrollmentResponse
      description: Response from driver enrollment
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````