> ## Documentation Index
> Fetch the complete documentation index at: https://microstrate-1133-notifications-prefs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create or update a secret

> Stores a new secret or updates an existing one in the secrets bucket



## OpenAPI

````yaml /api-reference/endpoint/secrets-manager/openapi.json put /secrets
openapi: 3.0.0
info:
  title: quiva.ai Gateway
  description: API for managing secrets in the quiva.ai platform
  version: 0.1.0
  contact:
    name: quiva.ai Support
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Secrets
    description: Operations for managing secrets
paths:
  /secrets:
    put:
      tags:
        - Secrets
      summary: Create or update a secret
      description: Stores a new secret or updates an existing one in the secrets bucket
      operationId: putSecret
      requestBody:
        description: Secret details to store
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SecretCreate'
            example:
              key: api-key
              value: sk_live_abcdefghijklmnopqrstuvwxyz
      responses:
        '200':
          description: Secret created/updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: success
              example:
                message: success
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: invalid request format
components:
  schemas:
    SecretCreate:
      type: object
      properties:
        key:
          type: string
          description: The unique identifier for the secret
        value:
          type: string
          description: The secret value to store
      required:
        - key
        - value
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````