# List tenants

> The tenants of the key, the oldest first, with the role of the key in each.

`GET /v1/tenants`

```bash curl
curl -X GET "https://api.shako.dev/v1/tenants" \
  -H "Authorization: Bearer $SHAKO_API_KEY"
```

```python Python
import os

import requests

response = requests.get(
    "https://api.shako.dev/v1/tenants",
    headers={"Authorization": f"Bearer {os.environ['SHAKO_API_KEY']}"},
)
response.raise_for_status()
print(response.json())
```

```javascript JavaScript
const response = await fetch("https://api.shako.dev/v1/tenants", {
  method: "GET",
  headers: { Authorization: `Bearer ${process.env.SHAKO_API_KEY}` },
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());
```

```json 200 (excerpt)
{
  "data": [
    {
      "name": "acme",
      "role": "contributor",
      "default": true
    }
  ]
}
```

Authenticate with `Authorization: Bearer <API key>` on `https://api.shako.dev`. Role: any key.

## Response

200 with {"data": [...]}: a list of [the tenant object](https://shako.dev/api/objects/tenant-view.md).

The errors: https://shako.dev/api/errors.md. All the endpoints of Tenants: https://shako.dev/api/tenants.md.
