---
title: "Create or return a collection"
method: POST
path: "/api/collections"
tags: ["Tags and collections"]
---

# Create or return a collection

`POST /api/collections`

## Request

- Base URL: `https://keep.md`
- URL: `https://keep.md/api/collections`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `keep.session_token`

Create or return a collection.

## Headers

- `Keep-API-Version` string

## Request body

- object
  - `name` string, required

## Response `200`

Collection

- object
  - `collection` Collection, required
    - `id` string, required
    - `name` string, required
    - `slug` string, required

## Other responses

- `400`: Invalid request
- `401`: Authentication required
- `403`: The credential lacks access or the plan does not include the feature

---

[API](https://skmtc.dev/keep/apis/keep-api.md) · [All operations](https://skmtc.dev/keep/apis/keep-api/llms.txt) · [OpenAPI document](https://skmtc.dev/keep/apis/keep-api/revisions/a338a455bd0f?raw)
