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

# Generate a unique device code



## OpenAPI

````yaml openapi.json post /device
openapi: 3.1.0
info:
  title: Bin (Board Modified)
  description: >-
    A minimalist pastebin API modified for Board. Device-based storage with
    authentication.
  contact:
    name: Jordan Doyle
    email: jordan@doyle.la
  license:
    name: WTFPL OR 0BSD
    identifier: WTFPL OR 0BSD
  version: 2.0.2
servers: []
security: []
tags:
  - name: info
    description: API information endpoints
  - name: device
    description: Device management endpoints
  - name: paste
    description: Paste management endpoints
paths:
  /device:
    post:
      tags:
        - device
      summary: Generate a unique device code
      operationId: generate_device_code
      responses:
        '200':
          description: Generated device code (8 alphanumeric uppercase characters)
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized - invalid or missing App-Password
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - app_password: []
components:
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
        - status
      properties:
        error:
          type: string
          description: Error message
        status:
          type: integer
          format: int32
          description: HTTP status code
          minimum: 0
  securitySchemes:
    app_password:
      type: apiKey
      in: header
      name: App-Password

````