List a company's Legacy SSH keys
Answers the Legacy keys on the company's environments, grouped by environment, 25 environments a page. A Legacy key was on the server before the Control Panel managed its keys, and stops working on ends_on unless it is kept. Paged by cursor: send next_cursor back as cursor; null means the last page.
Path parameters
The id of a company you belong to or manage. Digits only. At least 1.
Query parameters
Answer the Legacy keys of this environment only, in one page (cursor is not used, though a malformed one is still refused, and next_cursor is null). Digits only. It may be any environment you can reach. At least 1.
The next_cursor of the previous answer, sent back as it was given. Anything else (a value that is not a cursor of these lists, or more than 200 characters) is refused 422 invalid_arguments on cursor.
Returns
200 A page of Legacy keys.
Fields of the 200 answer
Send as cursor to read the next page. Null on the last page.
Fields
At least 1.
The day they stop working. Format: date.
Fields of each item
An environment, with the website and company it belongs to.
Fields
Fields
At least 1.
The environment id, the {environment} these endpoints take and the owner.id of an environment key.
cse is CoreStack Enterprise.
csecorestackcoreclusterThe site row id the /corestack/sites/{site} endpoints take. Null on CoreStack Enterprise.
Fields
At least 1.
Fields of each item
Format: date-time.
The key size, for RSA keys.
Whether the key works on this environment yet.
Fields
When a waiting environment is planned to switch over. Format: date-time.
waiting means the environment has not switched to keys managed by the Control Panel yet.
appliedapplyingremovingfailedwaitingWhether you may rename the key or change where it applies.
The SHA-256 fingerprint, as ssh-keygen -lf prints it.
The key id the /ssh/keys/{key} endpoints take. Null for the Corefinity deploy key.
Format: date-time.
Set for a Legacy key, else null.
Whether you may remove the key.
True when the key carries restrictions from before it was imported.
The restrictions as they are written in front of the key. Read-only.
The level a key on an environment comes from.
Fields
agency is a key of your agency. system is the Corefinity deploy key.
agencycompanywebsiteenvironmentuserlegacysystemNull for a key that has no owner you can see.
The key type, such as ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521 or ssh-rsa. A key imported from a server may carry an older type (ssh-dss) or a security-key type (sk-), which new keys may not.
ssh-ed25519ecdsa-sha2-nistp256ecdsa-sha2-nistp384ecdsa-sha2-nistp521ssh-rsassh-dss[email protected][email protected]True for a key that would be refused if it were added today.
Set when Corefinity has moved that day for the company.
If it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | Send a valid token as Authorization: Bearer <token>. |
403 | scope_required | Use a token with the scope named in scope. |
404 | feature_off | This feature is not on for your organisation yet. |
404 | not_found | Not found. |
422 | invalid_arguments | The 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. |
429 | rate_limited | Wait 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/companies/1204/ssh/legacy \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json"use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->get('https://manage.corefinity.com/api/companies/1204/ssh/legacy');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/companies/1204/ssh/legacy', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
},
});
// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);import os
import requests
res = requests.get(
"https://manage.corefinity.com/api/companies/1204/ssh/legacy",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"company": {
"id": 1204,
"name": "Harbour & Finch"
},
"ends_on": "2026-12-09",
"environments": [
{
"environment": {
"company": {
"id": 1204,
"name": "Harbour & Finch"
},
"id": 1311,
"name": "Production",
"product": "corecluster",
"site_id": 1042,
"website": {
"id": 1310,
"name": "Harbour & Finch trade"
}
},
"keys": [
{
"added_at": "2026-11-02T00:00:00+00:00",
"added_by": null,
"bits": null,
"delivery": {
"planned_for": null,
"state": "applied"
},
"editable": false,
"fingerprint": "SHA256:Ploa6Hz7DwoHuC3xPgwJD+qGdTytelbFQ+lXDSmu+lY",
"id": 7290,
"last_used_at": null,
"legacy": {
"ci_hint": null,
"ends_on": "2026-12-09",
"placed_at": null,
"state": "legacy"
},
"name": "deploy@build-server",
"removable": true,
"restricted": false,
"restrictions": [],
"source": {
"layer": "legacy",
"owner": {
"id": 1311,
"name": "Production",
"type": "environment"
}
},
"type": "ssh-ed25519",
"weak": false
}
],
"not_on_new_system": false
}
],
"extension": null,
"next_cursor": null
}{
"message": "Unauthenticated."
}{
"code": "scope_required",
"message": "This access token does not have the destructive scope this needs. Use a token with the destructive scope.",
"reason": "scope_required",
"scope": "destructive"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "invalid_arguments",
"errors": {
"cursor": [
"That page cursor is not valid."
]
},
"field": "cursor",
"message": "That page cursor is not valid.",
"reason": "invalid_arguments"
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}