> ## 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

> Guide: [Enroll your team's devices](https://docs.promptguard.co/shadow-ai/fleet-enrollment)



## 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.co
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/v1/enroll:
    post:
      tags:
        - enroll
      summary: Enroll Device
      description: >-
        Guide: [Enroll your team's
        devices](https://docs.promptguard.co/shadow-ai/fleet-enrollment)
      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'
              example:
                api_key: pg_live_Hq3nW8vR_...
                project_id: 910b6423-8a12-4461-a6bf-9148d9b6b8e3
                device_id: 5c1f0a9e-3b7d-4e2a-9c41-7d2e8f6a0b13
                organization_id: 12613a5a-ff26-4e72-8105-a36b40327a7c
                enforced: false
                mode: enforce
                fail_closed: true
                end_user_label: jane@acme.example
                account_name: Acme Corp
                identity_verified: true
                account_email: jane@acme.example
                account_type: org
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorEnvelope'
      externalDocs:
        description: 'Guide: Enroll your team''s devices'
        url: https://docs.promptguard.co/shadow-ai/fleet-enrollment
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
        machine_identity:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Machine Identity
          description: Lowercase hex SHA-256 the agent derived from this machine's identity
        machine_identity_source:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Machine Identity Source
          description: >-
            What machine_identity was derived from: hardware | os_install |
            vdi_pool
      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
        end_user_label:
          anyOf:
            - type: string
            - type: 'null'
          title: End User Label
        account_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Name
        identity_verified:
          type: boolean
          title: Identity Verified
          default: false
        account_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Email
        account_type:
          type: string
          title: Account Type
          default: personal
      type: object
      required:
        - api_key
        - project_id
        - device_id
        - organization_id
      title: EnrollResponse
    ValidationErrorEnvelope:
      description: The developer API's 422 (`shared/infrastructure/framework_errors.py`).
      properties:
        error:
          $ref: '#/components/schemas/ValidationErrorDetail'
        detail:
          deprecated: true
          description: >-
            The same list as `error.details`, in FastAPI's old shape. Removed on
            2027-02-11; read `error.details`
          items:
            $ref: '#/components/schemas/ValidationErrorField'
          title: Detail
          type: array
      required:
        - error
        - detail
      title: ValidationErrorEnvelope
      type: object
      example:
        error:
          message: 'The request is invalid: body.messages: Field required'
          type: invalid_request_error
          code: invalid_request
          details:
            - type: missing
              loc:
                - body
                - messages
              msg: Field required
              input:
                direction: input
          error_id: 3f0b8c1e-6a0e-4d52-9a57-0c2a9a7f5b11
          doc_url: >-
            https://docs.promptguard.co/production/error-handling#invalid_request
        detail:
          - type: missing
            loc:
              - body
              - messages
            msg: Field required
            input:
              direction: input
    ValidationErrorDetail:
      properties:
        message:
          description: The failed fields, one line
          title: Message
          type: string
        type:
          description: '''invalid_request_error'''
          title: Type
          type: string
        code:
          description: '''invalid_request'''
          title: Code
          type: string
        details:
          description: Each field that failed
          items:
            $ref: '#/components/schemas/ValidationErrorField'
          title: Details
          type: array
        error_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Equals the X-Request-ID header
          title: Error Id
        doc_url:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            The error catalogue's entry for `code` (cause and fix); present when
            the catalogue documents the code
          title: Doc Url
      required:
        - message
        - type
        - code
        - details
      title: ValidationErrorDetail
      type: object
    ValidationErrorField:
      description: One field that failed validation, as FastAPI reports it.
      properties:
        loc:
          description: The field's path, e.g. ['body', 'messages']
          items:
            anyOf:
              - type: string
              - type: integer
          title: Loc
          type: array
        msg:
          description: What is wrong with it
          title: Msg
          type: string
        type:
          description: The kind of failure, e.g. 'missing'
          title: Type
          type: string
        input:
          default: null
          description: The value that was sent
          title: Input
        ctx:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          description: The limit it broke, where there is one
          title: Ctx
      required:
        - loc
        - msg
        - type
      title: ValidationErrorField
      type: object
  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.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.