---
title: "corestack_deployments_company_secret_delete"
url: https://docs.corefinity.com/mcp/tools/corestack_deployments_company_secret_delete
type: tool
last_updated: 2026-11-13
feature: deployment-templates
related:
  - https://docs.corefinity.com/api/reference/deployments/delete-company-deploy-secret.md
  - https://docs.corefinity.com/guides/sites/code-and-deployments/deployment-templates.md
---
# corestack_deployments_company_secret_delete

**Delete a company registry secret.** Delete one of your company's registry secrets. Builds that install from that registry and hold no secret of their own for it then fail. Scope: write.

- Scope: `write`
- Runs as a task: no

## When to use it

Delete one of your company's registry secrets. Builds that install from that registry and hold no secret of their own for it then fail. A token restricted to some sites cannot delete company secrets.

The same action in the public REST API, with the same checks, refusals and scope: `DELETE /api/corestack/companies/{company}/deploy-secrets/{secret}`.

## Inputs

- `secret_id` (integer, ≥ 1, required)

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "secret_id": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "secret_id"
  ],
  "type": "object"
}
```

## Refusals

- `forbidden`: the person's role lacks the Edit Environment Deployment Pipeline permission, which every change to the
  company's templates, variables and registry secrets needs (they reach every environment that follows the template). The
  message names it and says an owner of the company can grant it in Roles; `details.permission` is
  `editEnvironmentDeploymentPipeline`. Nothing is changed.
- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_deployments_company_secret_delete",
  "arguments": {
    "secret_id": 318
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_deployments_company_secret_delete with secret_id 318. (Delete a company registry secret.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [DELETE /api/corestack/companies/{company}/deploy-secrets/{secret}](https://docs.corefinity.com/api/reference/deployments/delete-company-deploy-secret.md)
- Guide: [Deployment templates](https://docs.corefinity.com/guides/sites/code-and-deployments/deployment-templates.md)
