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

# Delete a secret

> Delete a secret. This cannot be undone.

<Warning>
  Any function or integration still configured to use this secret will start failing until reconfigured. This action cannot be undone.
</Warning>

<Note>
  Secrets are looked up by `secretName` within the account (workspace), the same scoping as [Create a secret](/api-reference/agents/endpoint/secrets/create-a-secret).
</Note>


## OpenAPI

````yaml DELETE /v1/agents/{agentId}/secrets/{secretName}
openapi: 3.1.0
info:
  title: PolyAI Agents API
  version: 1.0.11
  description: Manage PolyAI agents, telephony, deployments, and real-time configs.
servers:
  - url: https://api.us.poly.ai
    description: US region
  - url: https://api.eu.poly.ai
    description: EU region
  - url: https://api.uk.poly.ai
    description: UK region
  - url: https://api.studio.poly.ai
    description: Studio region
security:
  - polyApiKey: []
paths:
  /v1/agents/{agentId}/secrets/{secretName}:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
      - name: secretName
        in: path
        required: true
        schema:
          type: string
    delete:
      tags:
        - Secrets
      summary: Delete a secret
      description: Delete a secret. This cannot be undone.
      responses:
        '200':
          description: Secret deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteSecretResponse'
components:
  schemas:
    DeleteSecretResponse:
      type: object
      properties:
        name:
          type: string
          description: Display name of the deleted secret
      required:
        - name
      additionalProperties: false
      title: DeleteSecretResponse
  securitySchemes:
    polyApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````