---
title: "Get your company's SSH keys"
url: https://docs.corefinity.com/api/reference/access/get-own-company-ssh
type: endpoint
last_updated: 2026-11-13
feature: ssh-keys
related:
  - https://docs.corefinity.com/guides/sites/access-and-security/ssh-keys.md
---
# Get your company's SSH keys

The same answer as `GET /companies/{company}/ssh`, for the company of the person the token belongs to.

```http
GET /api/company/ssh
```

- Scope: `read`
- Rate limit: 120 a minute
- Try it in the console: on

## Request

### curl

```bash
curl https://manage.corefinity.com/api/company/ssh \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
```

### PHP

```php
use Illuminate\Support\Facades\Http;

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->get('https://manage.corefinity.com/api/company/ssh');

$data = $response->json();
```

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/company/ssh', {
  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);
```

### Python

```python
import os
import requests

res = requests.get(
    "https://manage.corefinity.com/api/company/ssh",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
)

data = res.json() if res.content else None
```

## Responses

### 200 Your company's keys.

```json
{
  "agency": null,
  "can_add": {
    "allowed": true,
    "message": null,
    "refused": null
  },
  "company": {
    "handle": "harbourfinch",
    "id": 1204,
    "is_agency": false,
    "name": "Harbour & Finch"
  },
  "grants": [
    {
      "added_at": "2026-11-03T10:02:44+00:00",
      "added_by": {
        "former": false,
        "name": "Eleanor Finch",
        "support": false
      },
      "also_granted": [],
      "applies_to": {
        "environment_ids": [],
        "mode": "all"
      },
      "bits": null,
      "delivery": {
        "applied": 1,
        "not_on_new_system": 0,
        "removed": 0,
        "state": "applied",
        "total": 1,
        "waiting": 0,
        "waiting_platform_update": 0
      },
      "editable": true,
      "fingerprint": "SHA256:o6poLLVqPDVYtxLTdagh8mUo96coeRXfX7Uxorxr158",
      "id": 7305,
      "last_used_at": "2026-11-04T16:20:11+00:00",
      "layer": "company",
      "legacy": null,
      "lifecycle": "active",
      "login": "web",
      "name": "Office workstation",
      "owner": {
        "id": 1204,
        "name": "Harbour & Finch",
        "type": "company"
      },
      "quarantine_reason": null,
      "reach": {
        "clients": 0,
        "environments": 1,
        "websites": 1
      },
      "removable": true,
      "restricted": false,
      "restrictions": [],
      "type": "ssh-ed25519",
      "weak": false
    }
  ],
  "inherited": [],
  "legacy": {
    "count": 1,
    "ends_on": "2026-12-09",
    "environments": 1
  },
  "reach": {
    "clients": 0,
    "environments": 1,
    "items": [
      {
        "company": {
          "id": 1204,
          "name": "Harbour & Finch"
        },
        "id": 1311,
        "name": "Production",
        "product": "corecluster",
        "site_id": 1042,
        "website": {
          "id": 1310,
          "name": "Harbour & Finch trade"
        }
      }
    ],
    "websites": 1
  }
}
```

### 401 No token, or a token that is not valid.

```json
{
  "message": "Unauthenticated."
}
```

### 403 The token lacks the `read` scope (`scope_required`), or your role lacks the View Company SSH Keys permission (`forbidden`; `permission` names it, and `field` is null as on every SSH refusal).

```json
{
  "code": "forbidden",
  "field": null,
  "message": "You need the View Company SSH Keys permission to do this. An owner of your company can grant it in Roles.",
  "permission": "viewCompanySSHKeys",
  "reason": "forbidden"
}
```

### 404 The id does not exist or is something you cannot reach (`not_found`; both answer the same body), or SSH keys are not on for it (`feature_off`, which on a key change may add `field: null`).

```json
{
  "code": "feature_off",
  "message": "Not found.",
  "reason": "feature_off"
}
```

### 429 Too many requests (`rate_limited`). Wait for the number of seconds in `Retry-After`, which `retry_after_seconds` repeats.

```json
{
  "code": "rate_limited",
  "message": "Too many requests. Try again in 60 seconds.",
  "reason": "rate_limited",
  "retry_after_seconds": 60
}
```

## If it is refused

| Status | Reason | What to do |
|---|---|---|
| 401 |  | Send a valid token as `Authorization: Bearer <token>`. |
| 403 | `forbidden` | The person is not allowed to do this. |
| 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. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |

## The same task elsewhere

- Guide: [SSH keys](https://docs.corefinity.com/guides/sites/access-and-security/ssh-keys.md)
