# List agents

`GET` `https://goblins-call-api.onrender.com/v1/agents`

Returns every agent in your workspace, most recently edited first, each with how many calls it is on right now.

Works with a [workspace API key](https://www.cracklehq.com/docs/authentication) or the agent’s own key.

## Query parameters

- `userId` (string, optional): A workspace ID. A key belongs to one workspace, so this is never needed with one; naming another workspace answers `403`.

## Response

- `agents[].activeCalls` (integer): Calls this agent is on at the moment.
- `agents[].costPerMinute` (number): What a minute of this agent’s calls costs, in USD.
- `agents[].stats` (object): Lifetime totals: `totalCalls`, `totalSeconds` and `totalCost`.

## Notes

- Each agent is the full object shown under Get an agent; the sample here is shortened.
- With an agent’s own key the list holds that one agent.

Request:

cURL:

```bash
curl "https://goblins-call-api.onrender.com/v1/agents" \
  -H "Authorization: Bearer $CRACKLE_API_KEY"
```

Node.js:

```js
const response = await fetch('https://goblins-call-api.onrender.com/v1/agents', {
  headers: {
    Authorization: `Bearer ${process.env.CRACKLE_API_KEY}`,
  },
});
if (!response.ok) throw new Error(await response.text());
const data = await response.json();
```

Python:

```python
import os
import requests

response = requests.get(
    "https://goblins-call-api.onrender.com/v1/agents",
    headers={"Authorization": f"Bearer {os.environ['CRACKLE_API_KEY']}"},
    timeout=30,
)
response.raise_for_status()
data = response.json()
```

Response · 200 OK:

```json
{
  "agents": [
    {
      "id": "ua_3f9a1c2b",
      "name": "Front desk",
      "costPerMinute": 0.07,
      "voice": { "provider": "cartesia", "language": "en", "speaker": "…" },
      "systemTools": { "endCall": true },
      "stats": { "totalCalls": 128, "totalSeconds": 20412, "totalCost": 23.81 },
      "activeCalls": 1,
      "updatedAt": "2026-10-11T08:12:44.000Z"
    }
  ]
}
```

Source: https://www.cracklehq.com/docs/reference/agents/list
