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

# Get secret value

> Retrieve the decrypted value of a specific secret by its key



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/secrets.yaml get /api/secrets/{key}
openapi: 3.0.3
info:
  title: Insforge Secrets API
  version: 1.0.0
  description: >-
    Secure secrets management for storing API keys, tokens, and sensitive
    configuration
servers: []
security: []
paths:
  /api/secrets/{key}:
    get:
      tags:
        - Admin
      summary: Get secret value
      description: Retrieve the decrypted value of a specific secret by its key
      parameters:
        - name: key
          in: path
          required: true
          schema:
            type: string
            pattern: ^[A-Z0-9_]+$
          description: Secret key identifier
          example: STRIPE_API_KEY
      responses:
        '200':
          description: Secret value retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  key:
                    type: string
                  value:
                    type: string
              example:
                key: STRIPE_API_KEY
                value: sk_live_...
        '401':
          description: Unauthorized
        '403':
          description: Forbidden - Admin only
        '404':
          description: Secret not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: NOT_FOUND
                message: 'Secret not found: INVALID_KEY'
                statusCode: 404
      security:
        - bearerAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
        - message
        - statusCode
      properties:
        error:
          type: string
          description: Error code for programmatic handling
          example: INVALID_INPUT
        message:
          type: string
          description: Human-readable error message
          example: Invalid input data
        statusCode:
          type: integer
          description: HTTP status code
          example: 400
        nextActions:
          type: string
          description: Suggested action to resolve the error
          example: Check the request body format
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````