openapi: 3.1.0
info:
  title: Paper Wigs Web4 API
  version: 1.0.0
  description: Public read APIs for Paper Wigs by Donna Marie Milligan. Protected writes require PLATPHORM_API_KEY.
servers:
  - url: https://paperwigs.platphormnews.com
components:
  securitySchemes:
    PlatPhormApiKey:
      type: apiKey
      in: header
      name: X-PlatPhorm-API-Key
    PlatPhormBearer:
      type: http
      scheme: bearer
paths:
  /api/health:
    get:
      summary: Health check
      responses:
        '200':
          description: OK
  /api/search:
    get:
      summary: Search Paper Wig and gallery records
      responses:
        '200':
          description: OK
  /api/paper-wigs:
    get:
      summary: List public Paper Wig records
      responses:
        '200':
          description: OK
  /api/paper-wigs/{slug}:
    get:
      summary: Get a public Paper Wig record by slug
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
        '404':
          description: Not found
  /api/gallery:
    get:
      summary: List public gallery image records
      responses:
        '200':
          description: OK
  /api/commissions/request:
    post:
      summary: Validate a public commission inquiry and return dry-run/not_configured state
      responses:
        '200':
          description: Dry run or not configured
        '400':
          description: Validation error
  /api/web4/status:
    get:
      summary: Web4 status
      responses:
        '200':
          description: OK
  /api/web4/scorecard:
    get:
      summary: Web4 readiness scorecard
      responses:
        '200':
          description: OK
  /api/web4/fingerprints:
    get:
      summary: Public-safe fingerprints
      responses:
        '200':
          description: OK
  /api/provenance/lookup:
    get:
      summary: Lookup public provenance records
      responses:
        '200':
          description: OK
  /api/provenance/verify:
    get:
      summary: Verify a provenance record/hash
      responses:
        '200':
          description: OK
  /api/indexnow/status:
    get:
      summary: IndexNow configuration status
      responses:
        '200':
          description: OK
  /api/indexnow/submit:
    post:
      summary: Submit allowed public URLs to IndexNow or dry-run payload generation
      security:
        - PlatPhormApiKey: []
        - PlatPhormBearer: []
      responses:
        '200':
          description: Submitted or dry run
        '401':
          description: Requires PLATPHORM_API_KEY
  /api/xr/manifest:
    get:
      summary: Progressive XR manifest
      responses:
        '200':
          description: OK
