> ## Documentation Index
> Fetch the complete documentation index at: https://gcore-waap-api-guides.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a secret

> Partially updates secret metadata and/or modifies specific slots



## OpenAPI

````yaml /api-reference/services_docs_mintlify/fastedge_api.yaml patch /fastedge/v1/secrets/{secret_id}
openapi: 3.1.0
info:
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  title: Gcore OpenAPI – FastEdge API
  version: 6519d648325b
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - description: Application templates
    name: Templates
  - description: Client-level settings and limits
    name: Clients
  - description: >-
      Apps are descriptions of edge apps, that reference the binary and may
      contain app-specific settings, such as environment variables.
    name: Apps
  - description: >-
      Binaries are WebAssembly executables that are actually executed when app
      is ran.
    name: Binaries
  - description: Statistics of edge app use
    name: Stats
  - description: Secret values that can be used in apps
    name: Secrets
  - description: Key-value edge storage for apps
    name: Edge Storage
paths:
  /fastedge/v1/secrets/{secret_id}:
    patch:
      tags:
        - Secrets
      summary: Update a secret
      description: Partially updates secret metadata and/or modifies specific slots
      operationId: patchSecret
      parameters:
        - description: Unique identifier of the secret to update
          in: path
          name: secret_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/secret'
        description: Secret details
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/secret'
          description: Secret updated successfully, returns updated configuration
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Bad request
        '404':
          description: Not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/conflictError'
          description: Entity referenced
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Service unavailable
components:
  schemas:
    secret:
      type: object
      properties:
        name:
          type: string
          description: The unique name of the secret.
          minLength: 1
          maxLength: 128
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]*[a-zA-Z0-9]$
        comment:
          type: string
          description: A description or comment about the secret.
          maxLength: 1024
        app_count:
          type: integer
          format: int
          description: The number of applications that use this secret.
          readOnly: true
        secret_slots:
          type: array
          description: A list of secret slots associated with this secret.
          items:
            $ref: '#/components/schemas/secret_slot'
    error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
    conflictError:
      type: object
      required:
        - error
        - conflicting_ids
      properties:
        error:
          type: string
          description: Error message
        conflicting_ids:
          type: array
          items:
            type: integer
            format: int64
          description: List of conflicting entity IDs
    secret_slot:
      type: object
      properties:
        slot:
          type: integer
          format: int64
          description: >-
            Unix timestamp (seconds since epoch) indicating when this secret
            version becomes active. Use for time-based secret rotation.
          example: 1704067200
        value:
          type: string
          description: >-
            The plaintext secret value. Will be encrypted with AES-256-GCM
            before storage.
          writeOnly: true
          maxLength: 4096
          example: P@ssw0rd123!
        checksum:
          type: string
          description: >-
            SHA-256 hash of the decrypted value for integrity verification
            (auto-generated)
          readOnly: true
          example: 5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8
      required:
        - slot
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````