---
title: "Get a company's Marketplace keys"
url: https://docs.corefinity.com/api/reference/organisation/get-company-magento-keys
type: endpoint
last_updated: 2026-11-13
feature: magento
related:
  - https://docs.corefinity.com/guides/platforms/magento-2.md
  - https://docs.corefinity.com/mcp/tools/corestack_company_magento_keys_get.md
---
# Get a company's Marketplace keys

Answers which Marketplace keys a company's Magento 2 installs use and what they can install.
A key is never answered, only the last four characters of the public key.

```http
GET /api/companies/{company}/magento-keys
```

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

## Path parameters

- `company` (integer, required): The id of a company you belong to or manage. Digits only.

## Request

### curl

```bash
curl https://manage.corefinity.com/api/companies/1204/magento-keys \
  -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/companies/1204/magento-keys');

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

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/companies/1204/magento-keys', {
  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/companies/1204/magento-keys",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
)

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

## Responses

### 200 The keys in use.

```json
{
  "agency": "own",
  "can_change": true,
  "commerce_sites": {
    "count": 0,
    "sites": []
  },
  "entitlements": {
    "checked_at": "2026-11-19T08:00:00Z",
    "commerce": true,
    "error": null,
    "open_source": true
  },
  "fallback": "none",
  "public_key_last4": "3f9a",
  "source": "company",
  "updated_at": "2026-11-19T08:00:00Z",
  "updated_by": {
    "agency": null,
    "id": 2012,
    "name": "Daniel Reyes"
  },
  "verified_at": "2026-11-19T08:00:00Z"
}
```

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

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

### 403 The token lacks the scope (`scope_required`, with the `scope` to use), or your account has no company that can use Managed Clusters, for example because the company was closed (`company_not_enabled`). For Managed Clusters routes that do not ask for two-factor authentication.

```json
{
  "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"
}
```

### 404 Not found: the company is not one whose Marketplace keys you can manage, Magento 2 is not offered to your company, or the feature is off (`feature_off`).

```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 | `scope_required` | Use a token with the scope named in `scope`. |
| 404 | `feature_off` | This feature is not on for your organisation yet. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |

## The same task elsewhere

- Guide: [Magento 2](https://docs.corefinity.com/guides/platforms/magento-2.md)
- MCP tool: [`corestack_company_magento_keys_get`](https://docs.corefinity.com/mcp/tools/corestack_company_magento_keys_get.md)
