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

# Create collection

`POST /api/collections`

Create a new collection.

## Headers

- `X-Reqres-Env` string

## Request body

- CollectionCreateRequest
  - `name` string, required
  - `slug` string
  - `schema` object
  - `project_id` union
    - string
    - integer
  - `visibility` string

## Response `201`

Collection created

- CollectionResponse
  - `data` Collection, required
    - `id` string, required
    - `project_id` string
    - `user_id` string
    - `name` string, required
    - `slug` string, required
    - `schema` object
    - `visibility` string
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `400` — Error response
- `401` — Error response

---

[API](https://skmtc.net/reqres/apis/reqres-api.md) · [All operations](https://skmtc.net/reqres/apis/reqres-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/reqres/reqres-api/versions/e5ced6578853/schema)
