CorefinityCorefinityDocs
Open the Control PanelControl Panel
Access · 1 of 7

Get a site's SSH and SFTP access

Answers how to connect to the site or environment, its users with their keys, the company keys that reach it, and ready ssh, sftp, rsync and database tunnel commands for the built-in web user. While SSH keys are on for your company it also answers the usernames and host keys, and web lists every key that can log in as it.

GET/api/corestack/sites/{site}/access

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.

Returns

200 The site's access.

Fields of the 200 answer
applyobjectRequired

Whether the saved users and keys are live on the site. Whether a saved set of rules is live on the site.

Fields
applied_atstring or nullRequired
detailany

Sent only by the sets that have more to say, such as HTTP authentication.

errorstring or nullRequired
operationobject or any or nullRequired

The change that is applying the set, while one is running.

statestringRequired

Such as applied or applying.

state_labelstringRequired
company_keysarray of objectsRequired

The company keys that can reach the site.

Fields of each item
applied_herebooleanRequired

Whether the key reaches this site.

appliesstringRequired

Whether the company key applies to all of the company's sites or to selected ones.

allselected
fingerprintstringRequired
idintegerRequired

At least 1.

namestringRequired
connectionobjectRequired

Where to connect.

Fields
hoststringRequired

The SSH host of the site's cluster. Empty while the site has none yet.

portinteger or nullRequired

The site's or environment's own port.

ssh_userstringRequired

The built-in user, web.

tunnel_commandstringRequired

An ssh command that opens a tunnel to the database on 127.0.0.1:3306 of your machine.

limitsobjectRequired
Fields
company_keys_maxintegerRequired
keys_per_user_maxintegerRequired
root_path_suggestionsarray of stringsRequired

Folders an SFTP user is often limited to on this kind of site.

users_maxintegerRequired

The most named users a site can have.

terminalobjectRequired

Whether the browser terminal can be opened for the site.

Fields
active_sessionobject or nullRequired

The open terminal session on the site, when there is one, whoever opened it.

Fields
idintegerRequired

At least 1.

started_atstring or nullRequired

When the session started, in UTC with a +00:00 offset. Format: date-time.

userobjectRequired

Who opened the session. A session Corefinity support opened reads Corefinity support with a null id. A person by id and name. Corefinity staff read as Corefinity support with a null id.

Fields
idinteger or nullRequired
namestring or nullRequired
availablebooleanRequired
reasonstring or nullRequired

Why not, in plain words.

usersarray of objectsRequired

The built-in web user first, then the named users.

Fields of each item
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
host_keysobject

The host keys the site presents.

Fields
currentarray of objectsRequired
Fields of each item
fingerprintstringRequired
typestringRequired
ed25519ecdsarsa
managed_bystring or nullRequired
nextarray of objects or nullRequired

The host keys a staged rotation will switch to.

Fields of each item
fingerprintstringRequired
typestringRequired
ed25519ecdsarsa
known_hostsarray of stringsRequired

Complete known_hosts lines for the site's host keys. Empty when none are recorded.

loginsobject

The usernames you can connect with.

Fields
webobjectRequired
Fields
commandstring or nullRequired
loginstringRequired
youobject or any or nullRequired

Your own username on this environment.

personsarray of objects

The personal usernames that reach the site, with their keys. Read-only here.

Fields of each item
can_changebooleanRequired
can_deletebooleanRequired
keysarray of objectsRequired
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
loginstringRequired
personobject or any or nullRequired
youbooleanRequired
ready_linesobject or arrayRequired

Ready commands for the built-in web user. An empty list while the site has no SSH host or port yet.

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.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl https://manage.corefinity.com/api/corestack/sites/1042/access \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "apply": {
    "applied_at": "2026-11-03T10:03:10+00:00",
    "error": null,
    "operation": null,
    "state": "applied",
    "state_label": "Applied"
  },
  "company_keys": [],
  "connection": {
    "host": "ssh-northwind.example.net",
    "port": 20101,
    "ssh_user": "web",
    "tunnel_command": "ssh -N -L 3306:127.0.0.1:3306 -p 20101 [email protected]"
  },
  "host_keys": {
    "current": [
      {
        "fingerprint": "SHA256:ExampleHostKeyEd25519FingerprintNotARealOne",
        "type": "ed25519"
      }
    ],
    "managed_by": "panel",
    "next": null
  },
  "known_hosts": [
    "[ssh-northwind.example.net]:20101 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAAAExampleHostKeyOnlyThisIsNotARealHostKey1"
  ],
  "limits": {
    "company_keys_max": 50,
    "keys_per_user_max": 50,
    "root_path_suggestions": [
      "htdocs",
      "htdocs/wp-content/uploads",
      "shared"
    ],
    "users_max": 25
  },
  "logins": {
    "web": {
      "command": "ssh -p 20101 [email protected]",
      "login": "web"
    },
    "you": {
      "command": "ssh -p 20101 [email protected]",
      "delivered": true,
      "login": "maya-northwind",
      "state": "ready"
    }
  },
  "persons": [],
  "ready_lines": {
    "rsync": "rsync -e 'ssh -p 20101' -a ./ [email protected]:/var/www/harbourandfinch.example.com/htdocs/",
    "sftp": "sftp -P 20101 [email protected]",
    "ssh": "ssh -p 20101 [email protected]",
    "tunnel": "ssh -N -L 3306:127.0.0.1:3306 -p 20101 [email protected]"
  },
  "terminal": {
    "active_session": null,
    "available": true,
    "reason": null
  },
  "users": [
    {
      "can_change": false,
      "can_delete": false,
      "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": null,
      "id": 417,
      "keys": [
        {
          "added_at": "2026-11-03T10:02:44+00:00",
          "added_by": {
            "id": 2011,
            "name": "Maya Okafor"
          },
          "bits": null,
          "can_delete": true,
          "comment": null,
          "company_key_id": null,
          "fingerprint": "SHA256:O2Hqs6Iw0tDmPEeRkLTcr6n4V7Vhu5oPJRWviv9+2Ro",
          "id": 7308,
          "name": "Deployment service",
          "origin": {
            "layer": "environment",
            "owner": {
              "id": 1342,
              "name": "Production",
              "type": "environment"
            }
          },
          "restricted": false,
          "restrictions": [],
          "source": "user",
          "status": "applied",
          "status_label": "Applied",
          "type": "ssh-ed25519"
        },
        {
          "added_at": "2026-11-02T10:15:00+00:00",
          "added_by": null,
          "bits": null,
          "can_delete": false,
          "comment": null,
          "company_key_id": null,
          "fingerprint": "SHA256:ExampleDeployKeyFingerprintNotARealOne00000",
          "id": 0,
          "name": "Corefinity deploy key",
          "origin": {
            "layer": "system",
            "owner": null
          },
          "restricted": false,
          "restrictions": [],
          "source": "system",
          "status": "applied",
          "status_label": "Applied",
          "type": "ssh-rsa"
        }
      ],
      "kind": "built_in",
      "label": null,
      "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": 9991,
      "username": "web"
    },
    {
      "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",
      "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
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT