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

# Delete a secret

> Permanently delete a secret and all its slot values.
Secrets in use by applications require force=true to delete.



## OpenAPI

````yaml /api-reference/services_documented/fastedge_api.yaml delete /fastedge/v1/secrets/{secret_id}
openapi: 3.1.0
info:
  title: Gcore OpenAPI – FastEdge API
  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.
  version: '2026-05-11T15:10:30.328297+00:00'
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - description: Application templates
    name: FastEdge Templates
    x-displayName: Templates
  - description: Client-level settings and limits
    name: FastEdge Clients
    x-displayName: Clients
  - description: >-
      Apps are descriptions of edge apps, that reference the binary and may
      contain app-specific settings, such as environment variables.
    name: Apps
    x-displayName: Apps
  - description: >-
      Binaries are WebAssembly executables that are actually executed when app
      is ran.
    name: Binaries
    x-displayName: Binaries
  - description: Statistics of edge app use
    name: Stats
    x-displayName: Stats
  - description: Secret values that can be used in apps
    name: FastEdge Secrets
    x-displayName: Secrets
  - description: Key-value edge storage for apps
    name: Edge Storage
    x-displayName: Edge Storage
paths:
  /fastedge/v1/secrets/{secret_id}:
    delete:
      tags:
        - FastEdge Secrets
      summary: Delete a secret
      description: |-
        Permanently delete a secret and all its slot values.
        Secrets in use by applications require force=true to delete.
      operationId: deleteSecret
      parameters:
        - description: Unique identifier of the secret to delete
          in: path
          name: secret_id
          required: true
          schema:
            type: integer
            format: int64
        - description: >-
            When true, deletes secret even if used by applications. Defaults to
            false.
          in: query
          name: force
          schema:
            type: boolean
      responses:
        '204':
          description: Secret successfully deleted
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Bad request
        '404':
          description: Secret not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/conflictError'
          description: Secret is in use by applications (use force=true to override)
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Service temporarily unavailable
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from gcore import Gcore

            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )
            client.fastedge.secrets.delete(
                secret_id=0,
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/fastedge\"\n\t\"github.com/G-Core/gcore-go/option\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Fastedge.Secrets.Delete(\n\t\tcontext.TODO(),\n\t\t0,\n\t\tfastedge.SecretDeleteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
components:
  schemas:
    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
  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

````