---
updatedAt: 2026-06-12T17:02:44.000Z
agentTools:
  projectIndex: https://developer.spreedly.com/llms.txt
---

# Delete environment access secret

Delete an access secret in an environment. Authentication should be done using the environment where you want to delete the secret and an Organization Access Secret.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Spreedly API V1",
    "version": "v1",
    "description": "An OpenAPI specification file for V1 of the Spreedly Core Transactional API"
  },
  "x-explorer-enabled": false,
  "components": {
    "securitySchemes": {
      "basic_auth": {
        "type": "http",
        "scheme": "basic",
        "description": "Unless otherwise noted, all calls to the Spreedly API use [HTTP basic authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) over HTTPS.\n            Use the [environment key](https://developer.spreedly.com/docs/the-spreedly-app#environment-key) of the Spreedly environment you wish to execute against as the HTTP basic user, and one of your organization's [access secrets](https://developer.spreedly.com/docs/the-spreedly-app#access-secrets) as the HTTP basic password."
      }
    },
    "schemas": {
      "errors": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "attribute": {
              "type": "string",
              "description": "Which attribute(s) have an error"
            },
            "key": {
              "type": "string",
              "description": "Error Key"
            },
            "message": {
              "type": "string",
              "description": "Error Message"
            }
          },
          "required": [
            "key",
            "message"
          ]
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://core.spreedly.com/v1"
    }
  ],
  "paths": {
    "/environments/{environment_key}/access_secrets/{access_secret_key}": {
      "parameters": [
        {
          "name": "environment_key",
          "in": "path",
          "description": "The key of the environment to execute against",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "access_secret_key",
          "in": "path",
          "description": "The key of the access secret to execute against",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "summary": "Delete environment access secret",
        "tags": [
          "access_secrets"
        ],
        "security": [
          {
            "basic_auth": []
          }
        ],
        "operationId": "delete-access-secrets",
        "description": "Delete an access secret in an environment. Authentication should be done using the environment where you want to delete the secret and an Organization Access Secret.",
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errors"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/errors"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errors"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/errors"
                }
              }
            }
          }
        }
      }
    }
  }
}
```