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

# Create or update a vault secret key

> Write a key-value pair to a vault KV v2 path. Merges with existing keys. Requires BAO_TOKEN configured on API service. Admin only.




## OpenAPI

````yaml /openapi.yaml put /admin/secrets/kv
openapi: 3.0.3
info:
  title: Hill90 API
  description: Hill90 platform API — agent management and lifecycle operations.
  version: 0.1.0
servers:
  - url: /
    description: Relative (behind Traefik reverse proxy)
security: []
paths:
  /admin/secrets/kv:
    put:
      summary: Create or update a vault secret key
      description: >
        Write a key-value pair to a vault KV v2 path. Merges with existing keys.
        Requires BAO_TOKEN configured on API service. Admin only.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - path
                - key
                - value
              properties:
                path:
                  type: string
                  description: Vault path (e.g. secret/shared/database)
                key:
                  type: string
                  description: Secret key name
                value:
                  type: string
                  description: Secret value
      responses:
        '200':
          description: Secret saved
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  path:
                    type: string
                  key:
                    type: string
        '400':
          description: Missing required fields
        '401':
          description: Not authenticated
        '403':
          description: Requires admin role
        '502':
          description: Vault write failed
        '503':
          description: Vault token not configured
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````