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

# Enroll Device



## OpenAPI

````yaml /api-reference/openapi-developer.json post /api/v1/enroll
openapi: 3.1.0
info:
  title: PromptGuard Developer API
  description: >-
    Public API for developers to integrate PromptGuard security into their
    applications
  version: 1.0.0
servers:
  - url: https://api.promptguard.dev
    description: Production API
  - url: https://staging-api.promptguard.dev
    description: Staging API
  - url: http://localhost:8080
    description: Local Development
security:
  - ApiKeyAuth: []
paths:
  /api/v1/enroll:
    post:
      tags:
        - enroll
      summary: Enroll Device
      operationId: enroll_device_api_v1_enroll_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnrollRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrollResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    EnrollRequest:
      properties:
        token:
          type: string
          title: Token
          description: Enrollment token from the admin
        device_name:
          type: string
          maxLength: 255
          title: Device Name
          description: Hostname / device label
        platform:
          type: string
          title: Platform
          description: macos | windows | browser | linux
          default: macos
        end_user_id:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: End User Id
          description: Employee attribution label
        coverage:
          type: string
          title: Coverage
          description: 'Capture tier the agent is running: ''extension'' or ''proxy'''
          default: proxy
      type: object
      required:
        - token
        - device_name
      title: EnrollRequest
    EnrollResponse:
      properties:
        api_key:
          type: string
          title: Api Key
        project_id:
          type: string
          title: Project Id
        device_id:
          type: string
          title: Device Id
        organization_id:
          type: string
          title: Organization Id
        enforced:
          type: boolean
          title: Enforced
          default: false
        mode:
          type: string
          title: Mode
          default: enforce
        fail_closed:
          type: boolean
          title: Fail Closed
          default: true
        ca_cert:
          anyOf:
            - type: string
            - type: 'null'
          title: Ca Cert
        ca_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Ca Key
        end_user_label:
          anyOf:
            - type: string
            - type: 'null'
          title: End User Label
        account_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Name
        account_type:
          type: string
          title: Account Type
          default: personal
      type: object
      required:
        - api_key
        - project_id
        - device_id
        - organization_id
      title: EnrollResponse
    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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        PromptGuard API key for developer endpoints. Keys start with pg_live_
        and are created in the dashboard.

````