> For the complete documentation index, see [llms.txt](https://docs.mindplug.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mindplug.io/api/list-collections.md).

# List Collections

### Prerequisites

Requires a user auth token. See the [API Auth](/api/api-setup-text.md) section.

### Listing Collections

Takes in a name of the database `db` and returns a list of all collections in that db.

{% code overflow="wrap" lineNumbers="true" %}

```javascript
import mindplug from "@/src/mindplugAPI"; // base instance

mindplug.post("/collection/list", {
    db: "walmart",
});
```

{% endcode %}

*Note the collections are automatically created when you add new data to the database.*

### Sample Response

```json
{
    "data": [
        {
            "collection": "OfficeSupplies",
            "totalVectors": 0,
            "collectionId": "591ed632-cf38-403e-8e63-be87999d4115"
        }
    ],
    "count": 1
}
```
