---
title: "Create a collection"
method: POST
path: "/collections"
tags: ["Collections"]
---

# Create a collection

`POST /collections`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/collections`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

## Request body

- CreateCollectionPayload
  - `project_id` integer, required
  - `name` string, required
  - `description` string, nullable
  - `dashboard_ids` integer[]

## Response `200`

Request fulfilled, document follows

- CollectionDetail
  - `id` integer, required
  - `name` string, required
  - `description` string, nullable
  - `url` string, required
  - `project_id` integer, required
  - `workspace_id` integer, required
  - `role` string, required: 'manager' (edits its project) or 'member'
  - `dashboard_count` integer, required
  - `member_count` integer, nullable: Managers only — a member never sees the roster
  - `cover_url` string, nullable: The first published board's url token, for a thumbnail
  - `shared_by_name` string, nullable: Members only: who shared it with them
  - `has_refresh` boolean
  - `updated_at` string, date-time, nullable
  - `dashboards` CollectionBoardOut[], required
    - `dashboard_id` integer, required
    - `title` string, required
    - `url` string, required
    - `engine` string, nullable
    - `position` integer, required
    - `tab_label` string, nullable
    - `is_published` boolean, required
    - `updated_at` string, date-time, nullable
    - `added_at` string, date-time, nullable
  - `members` CollectionMemberOut[], nullable
    - `email` string, required
    - `status` string, required: 'active' (has an account) or 'pending'
    - `shared_by_name` string, nullable
    - `shared_at` string, date-time, nullable
  - `automation_id` integer, nullable
  - `refresh_folder_resource_id` integer, nullable
  - `refresh_datasets` object[]

## Other responses

- `400`: Bad request syntax or unsupported method

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/4b2c943a00dc?raw)
