CorefinityCorefinityDocs
Open the Control PanelControl Panel
Deployments · 43 of 65

corestack_deployments_company_secret_set

Set a company registry secret.

Scope writeNo secrets returned
On this page

When to use it

Add or change an npm or Composer registry secret your company's sites' builds install with, and optionally verify it with the registry. Without secret_id it creates one (kind, registry, token); with it, it changes what you send (never the kind); secret_id with verify: true alone verifies a stored one. shared_with_managed matters only for an agency: the secret then also reaches the builds of the sites it manages for clients. An environment's own secret for the same registry wins over the company's. The token and username are write-only. A token restricted to some sites cannot change company secrets.

The same action in the public REST API, with the same checks, refusals and scope: POST /api/corestack/companies/{company}/deploy-secrets (a new secret) and PUT /api/corestack/companies/{company}/deploy-secrets/{secret} (secret_id).

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_deployments_company_secret_set with kind npm, label GitHub Packages, registry https://npm.pkg.github.com, scope @acme, token <the registry token>, shared_with_managed false, verify true. (Set a company registry secret.) Tell me what it returned.

Inputs

auth_typestring

Composer.

http-basicbearergithub-oauthgitlab-token
kindstring

On create.

npmcomposer
labelstring
registrystring

npm: an https:// URL; Composer: the host.

scopestring

npm: @scope. Up to 214 characters.

secret_idinteger

Update this secret. At least 1.

shared_with_managedboolean

An agency only: also the sites it manages for clients.

tokenstring
usernamestring

Composer http-basic.

verifyboolean

Ask the registry once.

Example call

tools/call
{
  "name": "corestack_deployments_company_secret_set",
  "arguments": {
    "kind": "npm",
    "label": "GitHub Packages",
    "registry": "https://npm.pkg.github.com",
    "scope": "@acme",
    "token": "<the registry token>",
    "shared_with_managed": false,
    "verify": true
  }
}

If it is refused

ReasonWhat to do
forbiddenThe 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.
existsA secret for that registry and scope is already saved; update it with its secret_id (in details.id).
secret_invalidThe registry is not an HTTPS address on the public internet, or a field is not valid.
too_many_secretsThe company already holds the most registry secrets it can (20); delete one first.
upstream_unavailableThe registry could not be asked; try again later.
invalid_argumentsThe arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again.
tenant_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it.
rate_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT