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

# POST /collections

`POST /collections`

Add a new collection

## Response `200`

Collection(s)

- Collection[]
  - `CollectionID` string
  - `CollectionSet` unknown
  - `EncryptedIndexes` object[]
    - `FieldName` string
    - `Type` string
  - `Fields` object[]
    - `DefaultValue` unknown
    - `FieldID` string
    - `IsPrimary` boolean
    - `Kind` unknown
    - `Name` string
    - `RelationName` unknown
    - `Size` integer
    - `Typ` integer
  - `Indexes` object[]
    - `Fields` object[]
      - `Descending` boolean
      - `Name` string
    - `ID` integer
    - `Kind` integer
    - `KindDescription` unknown
    - `Name` string
    - `Unique` boolean
  - `IsActive` boolean
  - `IsBranchable` boolean
  - `IsEmbeddedOnly` boolean
  - `IsMaterialized` boolean
  - `IsPlaceholder` boolean
  - `Name` string
  - `Policy` unknown
  - `PreviousVersion` unknown
  - `Query` unknown
  - `VectorEmbeddings` object[]
    - `FieldName` string
    - `Fields` string[]
    - `Model` string
    - `Provider` string
    - `Template` string
    - `URL` string
  - `VersionID` string

## Other responses

- `400` — error

## Changes

> 53 revisions in range; 2 could not be searched.

- **2026-03-02** `8c167ee47363` — 1 info
  - api operation id `collection_add` removed and replaced with `add_collection`
- **2026-03-02** `fe7f44056f99` — 1 info
  - endpoint added
- **2025-06-02** `60812f5416c5` — 1 breaking
  - api removed without deprecation

[Change history](https://skmtc.dev/sourcenetwork/apis/defradb-api/changes/collections/post.md)

---

[API](https://skmtc.dev/sourcenetwork/apis/defradb-api.md) · [All operations](https://skmtc.dev/sourcenetwork/apis/defradb-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sourcenetwork/defradb-api/revisions/659e79583f79/schema)
