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

# Delete Application Env Secret

> Clear one environment secret: the catalogue entry and the stored value. The <app>-env Secret stops carrying the key on the application's next deploy. A browser session twin is mounted at the same path without the /api/v1 prefix (cookie authentication plus the X-Ankra-CSRF double-submit header).



## OpenAPI

````yaml https://platform.ankra.app/openapi.json delete /api/v1/org/applications/{application_id}/env-secrets/{secret_key}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /api/v1/org/applications/{application_id}/env-secrets/{secret_key}:
    delete:
      tags:
        - Applications API
      summary: Delete Application Env Secret
      description: >-
        Clear one environment secret: the catalogue entry and the stored value.
        The <app>-env Secret stops carrying the key on the application's next
        deploy. A browser session twin is mounted at the same path without the
        /api/v1 prefix (cookie authentication plus the X-Ankra-CSRF
        double-submit header).
      operationId: >-
        delete_application_env_secret_api_v1_org_applications__application_id__env_secrets__secret_key__delete
      parameters:
        - in: path
          name: application_id
          required: true
          schema:
            title: Application Id
            type: string
        - in: path
          name: secret_key
          required: true
          schema:
            title: Secret Key
            type: string
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: x-ankra-organisation-id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Ankra-Organisation-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteApplicationEnvSecretResponse'
          description: Successful Response
        '401':
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DemoDetailError'
          description: CSRF check failed (browser twin only)
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DemoDetailError'
          description: >-
            Not found ("Application not found" or "Environment secret not
            found")
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DemoDetailError'
          description: The secret store is not available ("Secret store is not available")
components:
  schemas:
    DeleteApplicationEnvSecretResponse:
      properties:
        deleted:
          title: Deleted
          type: boolean
      required:
        - deleted
      title: DeleteApplicationEnvSecretResponse
      type: object
    DemoDetailError:
      description: >-
        The FastAPI-style detail envelope the demo routes use for
        400/403/404/409/502 responses.
      properties:
        detail:
          type: string
      required:
        - detail
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````