---
title: "Check a company's Marketplace keys"
url: https://docs.corefinity.com/api/reference/organisation/check-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_check.md
---
# Check a company's Marketplace keys

Asks the Magento repository again what the saved keys can install and answers the keys with the new result. Up to 6 checks an hour for each company.

```http
POST /api/companies/{company}/magento-keys/check
```

- Scope: `write`
- Two-factor: required on your account (all)
- Rate limit: 6 a minute; 6 an hour for each company
- 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 -X POST https://manage.corefinity.com/api/companies/1204/magento-keys/check \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
```

### PHP

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

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->post('https://manage.corefinity.com/api/companies/1204/magento-keys/check');

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

### Node

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

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

## Responses

### 200 The keys, checked again.

```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), your company requires two-factor authentication and you have not set it up, or your account has no company that can use Managed Clusters, for example because the company was closed (`company_unavailable` or `company_not_enabled`, whichever the route checks first). For Managed Clusters routes; any other route uses `ForbiddenScopeOrTwoFactor`.

```json
{
  "code": "company_unavailable",
  "message": "Your company is unavailable.",
  "reason": "company_unavailable"
}
```

### 404 Not found: the company has no keys of its own to check, it is not one whose keys you can manage, Magento 2 is not offered, or the feature is off (`feature_off`).

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

### 429 Too many requests in a minute, or the keys were already checked 6 times in the last hour. Wait for `Retry-After` seconds.

```json
{
  "code": "rate_limited",
  "message": "The keys were checked several times in the last hour. Try again later.",
  "reason": "rate_limited",
  "retry_after_seconds": 1700
}
```

### 502 The Magento repository could not be reached. The saved answer stands and is sent in `keys`, with `entitlements.error` `unreachable`. The body carries a `message` and no `reason`.

```json
{
  "keys": {
    "agency": "string",
    "can_change": true,
    "commerce_sites": {
      "count": 1,
      "sites": [
        null
      ]
    },
    "entitlements": {
      "checked_at": "2026-11-09T20:14:07Z",
      "commerce": true,
      "error": "string",
      "open_source": true
    },
    "fallback": "string",
    "public_key_last4": "string",
    "source": "string",
    "updated_at": "2026-11-09T20:14:07Z",
    "updated_by": {
      "id": 1,
      "name": "string"
    },
    "verified_at": "2026-11-09T20:14:07Z"
  },
  "message": "string"
}
```

## If it is refused

| Status | Reason | What to do |
|---|---|---|
| 401 |  | Send a valid token as `Authorization: Bearer <token>`. |
| 403 | `company_unavailable` | Your company is unavailable. |
| 403 | `scope_required` | Use a token with the scope named in `scope`. |
| 403 | `two_factor_required` | Turn on two-factor on your account, then send again. |
| 404 | `feature_off` | This feature is not on for your organisation yet. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |
| 502 |  | Read the message; it says what happened. |

## The same task elsewhere

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