---
title: "List your company's agencies"
url: https://docs.corefinity.com/api/reference/organisation/list-company-agencies
type: endpoint
last_updated: 2026-11-13
feature: agency-links
related:
  - https://docs.corefinity.com/guides/agencies/client-organisations-and-the-switcher.md
---
# List your company's agencies

Every agency your own company is a client of, by name, with how many of your sites it manages and how many
of your environments deploy through its deployment connections. `repository_gaps` lists your environments
that lost their repository when an agency was detached and still need a new deployment connection.

```http
GET /api/company/agencies
```

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

## Request

### curl

```bash
curl https://manage.corefinity.com/api/company/agencies \
  -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/agencies');

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

### Node

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

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

## Responses

### 200 Your company's agencies.

```json
{
  "agencies": [
    {
      "deploys_through": 1,
      "id": 1180,
      "manages_sites": 0,
      "name": "Northwind Digital",
      "type": "agency"
    }
  ],
  "can_detach": true,
  "company_id": 1204,
  "repository_gaps": []
}
```

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

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

### 403 The token lacks the `read` scope (`scope_required`), or your company has been deleted (`company_unavailable`).

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

### 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 | `company_unavailable` | Your company is unavailable. |
| 403 | `scope_required` | Use a token with the scope named in `scope`. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |

## The same task elsewhere

- Guide: [Client organisations and the switcher](https://docs.corefinity.com/guides/agencies/client-organisations-and-the-switcher.md)
