CorefinityCorefinityDocs
Open the Control PanelControl Panel
Variables and secrets · 2 of 8

Create a site registry secret

Saves the credential for one private registry and answers the whole list. A registry must resolve to public addresses, and an environment holds one credential for each registry and scope.

POST/api/corestack/sites/{site}/deployments/secrets

Path parameters

siteintegerRequired

The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.

Body

auth_typestring

For Composer, how the registry signs in. Required when kind is composer.

http-basicbearergithub-oauthgitlab-token
kindstringRequired
npmcomposer
labelstringRequired

A name for the credential. Up to 255 characters.

registrystringRequired

For npm, the registry's HTTPS URL. For Composer, its host name, with a port if it needs one. Up to 255 characters.

scopestring

For npm only, the scope the credential is for, such as @northwind-digital: @, then letters, digits, dots, hyphens and underscores, starting with a letter or digit. Leave out for the default registry. Up to 214 characters.

tokenstringRequired

The token or password, kept exactly as sent. No line breaks or control characters; an npm token may not contain ${. Up to 4,096 characters.

usernamestring

For Composer with http-basic, the username, which is then required. No line breaks or control characters. Up to 255 characters.

verifyboolean

Ask the registry once, after the save, whether it accepts the credential. The answer then adds verification.

Returns

201 The environment's registry secrets, with the new one.

Fields of the 201 answer
dataarray of objectsRequired
Fields of each item
auth_typestring or nullRequired

How a Composer registry signs in. Null for npm.

http-basicbearergithub-oauthgitlab-tokennull
idintegerRequired

At least 1.

kindstringRequired
npmcomposer
labelstringRequired

The name you gave the credential.

last4string or nullRequired

The last four characters of the token. Null for a token shorter than 12 characters.

last_used_atstring or nullRequired

When a build last received the credential, in UTC. Format: date-time.

registrystringRequired

An npm registry's HTTPS URL, with one trailing slash; a Composer registry's host, with its port when that is not 443. Both in lower case.

scopestringRequired

The npm scope the credential is for, such as @northwind-digital. An empty string for the default registry and for Composer.

verified_atstring or nullRequired

When the registry last accepted the credential, in UTC. Null when it has not been checked since it last changed. Format: date-time.

verificationobject

What the registry answered. Present only when the request sent verify true.

Fields
idintegerRequired

The secret that was checked. At least 1.

messagestringRequired

What the registry answered, in plain words.

verifiedbooleanRequired
verified_atstring or nullRequired

Format: date-time.

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
409existsIt already exists. Use the existing one.
409managed_elsewhereThis site is read-only here. Change it in the control panel that manages it.
422secret_invalidChoose how the registry signs in: http-basic, bearer, github-oauth or gitlab-token.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/deployments/secrets \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "auth_type": "http-basic",
    "kind": "composer",
    "label": "Private packages",
    "registry": "packages.example.com",
    "token": "your-registry-token",
    "username": "northwind-digital"
  }'
{
  "data": [
    {
      "auth_type": "bearer",
      "id": 318,
      "kind": "composer",
      "label": "Private packages",
      "last4": "oken",
      "last_used_at": null,
      "registry": "repo.example.com",
      "scope": "",
      "verified_at": "2026-11-09T10:42:07Z"
    }
  ],
  "verification": {
    "id": 318,
    "message": "The registry accepted these credentials.",
    "verified": true,
    "verified_at": "2026-11-09T10:42:07Z"
  }
}
Try it

Try it is off for this endpointIt has not been cleared for the console. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT