CorefinityCorefinityDocs
Open the Control PanelControl Panel
Access · 5 of 7

Update an SSH or SFTP user

Changes a named user's type, root_path, label or password; send only what changes. A change of the label alone answers at once, with no operation, and the built-in web user cannot be changed.

PATCH/api/corestack/sites/{site}/access/users/{user}
  • Needs exec as well: The body asks for a generated password (password is generate).

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.

userintegerRequired

The id of one of the site's users, as GET /corestack/sites/{site}/access answers it. Digits only. At least 1.

Body

labelstring or null

Up to 60 characters.

passwordstring or null

set uses password_value. generate makes a password and answers it once; it also needs the exec scope. clear removes the password, and so does none. Leave password out to keep the password as it is.

generatesetclearnonenull
password_valuestring or null

The password, with set, and needed then: 12 to 64 characters, not the username and not containing the site's domain. One that breaks these is refused on password_value.

root_pathstring or null

As when the user is created. Up to 200 characters.

typestring or null
sshsftpnull

Returns

200 The user as it is now. operation is sent when a change is being applied, and password when one was generated. The answer is sent with Cache-Control: no-store.

Fields of the 200 answer
operationobject

Sent when a change is being applied. A change of the label alone has none. A change the Control Panel is making or has made. A save or an action that starts work answers one in operation; read it again by id with GET /corestack/operations/{operation} until status is completed or failed. Both answers have this shape; the few endpoints that answer a different one say so.

Fields
applied_atstring or null
can_retryboolean or null
clusterobject or any or null

The cluster the operation runs on.

committed_atstring or null
completed_atstring or nullRequired
created_atstring or nullRequired
environmentobject or any or null
errorstring or nullRequired

Why the operation failed, in plain words. Null unless status is failed.

failure_reasonstring or null

A stable code for the failure.

from_versionstring or null
hotboolean or null

True when the change applies without a maintenance window.

idintegerRequired
installobject or null
labelstring or null
notesarray of objects

What the operation did differently on purpose. Empty when nothing.

Fields of each item
codestringRequired
textstringRequired
parent_operation_idinteger or null
requested_byany

Who asked for the change.

reset_targetany

Present on some site creations and copies.

resultany

Always null here. A one-time result is read once with the reveal endpoint.

result_statestring
nonependingavailableviewed
retried_by_operation_idinteger or null
retries_operation_idinteger or null
retry_requiresany

What a retry needs first, if anything.

revealedany

Who revealed a one-time result and when, when there was one.

scopestringRequired
siteclusterbatch
siteobject or any or null

The website the operation belongs to. Null for a cluster's own operation.

statusstringRequired

Where a change is. completed and failed are final; every other status means the change is still running and blocks another change to the same site.

pendingcommittedrolling_outexecutingcompletedfailed
status_labelstringRequired
stepstring or null

The key of the step the operation is at. Null once it has completed.

stepsarray of objectsRequired
Fields of each item
keystring
labelstring
statestring

One of done, current, todo, failed or skipped.

subjectobject or null
summarystring or null
to_versionstring or null
typestringRequired

The kind of change, such as crons_change or redirects_change.

type_labelstringRequired
passwordobject

Sent when a password was generated. A generated password. It is in this answer only and is kept nowhere.

Fields
revealed_atstringRequired
valuestringRequired
userobjectRequired

The built-in web user, or a named SSH or SFTP user.

Fields
can_changebooleanRequired
can_deletebooleanRequired
connectionobjectRequired
Fields
commandstring or nullRequired

The ssh command. Null for an SFTP user.

sftp_commandstring or nullRequired
created_atstring or nullRequired
created_byobject or any or nullRequired
idintegerRequired

The id the /access/users/{user} endpoints take.

keysarray of objectsRequired

The user's keys. While SSH keys are on for your company, web lists every key that can log in as it, from every level.

Fields of each item
added_atstring or nullRequired
added_byobject or any or nullRequired
bitsinteger or nullRequired
can_deletebooleanRequired

Whether this endpoint group can remove the key. Other keys are removed where they were added.

commentstring or nullRequired

The comment at the end of the key line, when it had one.

company_key_idinteger or nullRequired
fingerprintstringRequired

The SHA-256 fingerprint, as ssh-keygen -lf prints it.

idintegerRequired

The id DELETE /corestack/sites/{site}/access/keys/{key} takes. 0 for the Corefinity deploy key.

namestringRequired
originobject

Sent while SSH keys are on for your company. The level the key comes from.

Fields
layerstringRequired
agencycompanywebsiteenvironmentuserlegacysystem
ownerobject or any or nullRequired
restrictedbooleanRequired

True when the key carries restrictions from before it was imported. Only Corefinity changes those.

restrictionsarray of stringsRequired
sourcestringRequired

company is a company key. system is the Corefinity deploy key. Everything else reads user.

usercompanysystem
statusstringRequired
pendingappliedfailedremoving
status_labelstringRequired
typestringRequired

The key type, such as ssh-ed25519 or ssh-rsa.

kindstringRequired

built_in is web. It cannot be changed or removed.

built_innamed
labelstring or nullRequired
passwordobjectRequired

Whether the user has a password. The password itself is never answered here.

Fields
setbooleanRequired
set_atstring or nullRequired
set_byobject or any or nullRequired
root_pathstring or nullRequired

The folder an SFTP user is limited to, relative to the site.

root_path_absolutestring or nullRequired

The same folder as a path on the server.

statusstringRequired

pending until the change that made or changed the user is live.

pendingappliedfailedremoving
status_labelstringRequired
typestringRequired
sshsftp
type_labelstringRequired
uidinteger or nullRequired

The user's numeric id on the server.

usernamestringRequired

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.
403restrictedRestricted keys are changed by staff.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
409busyAnother operation is running on the site. Wait for it to finish.
409in_useIt is still in use, still being removed, or managed somewhere else. Read the message: wait for the removal, remove what uses it first, or remove it where the message says.
409managed_elsewhereThis site is read-only here. Change it in the control panel that manages it.
409ssh_key_duplicateThe key is already added here. Use the existing one.
422invalidFix the field named in field; errors says why.
422ssh_person_managed_elsewhereThat username belongs to a person's own SSH login, managed in their profile. Choose another name.
429rate_limitedWait for the seconds in Retry-After.
502noneRead the message; it says what happened.
503noneTry again shortly.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X PATCH https://manage.corefinity.com/api/corestack/sites/1042/access/users/3418 \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "Print supplier (Leeds)"
  }'
{
  "user": {
    "can_change": true,
    "can_delete": true,
    "connection": {
      "command": "ssh -p 20101 [email protected]",
      "sftp_command": "sftp -P 20101 [email protected]"
    },
    "created_at": "2026-11-02T10:15:00+00:00",
    "created_by": {
      "id": 2011,
      "name": "Maya Okafor"
    },
    "id": 3418,
    "keys": [
      {
        "added_at": "2026-11-03T10:02:44+00:00",
        "added_by": null,
        "bits": null,
        "can_delete": true,
        "comment": null,
        "company_key_id": null,
        "fingerprint": "SHA256:KhDfvkk2rdhCA9zaR3SurL80w/B/MbslK5FOxIaEpY0",
        "id": 7312,
        "name": "Supplier laptop",
        "restricted": false,
        "restrictions": [],
        "source": "user",
        "status": "applied",
        "status_label": "Applied",
        "type": "ssh-ed25519"
      }
    ],
    "kind": "named",
    "label": "Print supplier (Leeds)",
    "password": {
      "set": false,
      "set_at": null,
      "set_by": null
    },
    "root_path": null,
    "root_path_absolute": null,
    "status": "applied",
    "status_label": "Applied",
    "type": "ssh",
    "type_label": "SSH + SFTP",
    "uid": 20001,
    "username": "supplier"
  }
}
Try it

Try it is off for this endpointIt reveals a secret. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT