> ## Documentation Index
> Fetch the complete documentation index at: https://omni.fireflo.au/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /v1/agents/knowledge/collections

> The account's knowledge collections, with how many sources each holds.

Collections group knowledge sources by topic. An agent can be limited to some of them with its `knowledge_collections`; every account has **General**, where sources go when no collection is given.

<Note>Needs the `agents.knowledge:read` scope.</Note>

## Request

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.fireflo.au/v1/agents/knowledge/collections" \
    -H "Authorization: Bearer $OMNI_API_KEY"
  ```

  ```python Python theme={null}
  import os

  import requests

  response = requests.get(
      "https://api.fireflo.au/v1/agents/knowledge/collections",
      headers={"Authorization": f"Bearer {os.environ['OMNI_API_KEY']}"},
  )
  print(response.status_code, response.json())
  ```

  ```javascript Node theme={null}
  const response = await fetch("https://api.fireflo.au/v1/agents/knowledge/collections", {
    headers: { Authorization: `Bearer ${process.env.OMNI_API_KEY}` },
  });
  console.log(response.status, await response.json());
  ```
</CodeGroup>

## Response

`200 OK` — `data` holds every collection, by name, with how many `sources` it holds. The list isn't paged.

```json theme={null}
{
  "data": [
    {
      "id": 1,
      "name": "General",
      "description": "",
      "sources": 14
    },
    {
      "id": 3,
      "name": "Returns & warranty",
      "description": "Refunds, replacements and warranty claims",
      "sources": 9
    }
  ]
}
```

## Errors

Every refusal is `{"error": {"code", "message", "field"}}`; `field` is there when one input is at fault.

| Status | Error code | When |
| :- | :- | :- |
| 404 | `module_off` | The account doesn't have AI agents on: they aren't in its plan, or are switched off for it. |
| 403 | `scope_missing` | The key doesn't have the `agents.knowledge:read` scope. |

Any request can also be refused for its key, its account or its rate (`key_required`, `invalid_key`, `account_suspended`, `plan_excludes_api`, `address_not_allowed`, `rate_limited`); see [the overview](/api-reference/overview).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.