---
title: "POST /collections/{name}"
method: POST
path: "/collections/{name}"
tags: ["document"]
---

# POST /collections/{name}

`POST /collections/{name}`

Add document(s) to a collection

## Path parameters

- `name` string, required

## Request body

- union
  - Document
  - Document[]

## Response `200`

ok

## Other responses

- `400` — error
- `default`

## Changes

- **2026-02-26** `e5def1d468f5` — 3 info
  - api operation id `collection_add` removed and replaced with `document_add`
  - api tag `document` added
  - api tag `collection` removed
- **2026-02-24** `598f4d25a175` — 1 info
  - api operation id `collection_create` removed and replaced with `collection_add`
- **2025-06-02** `60812f5416c5` — 1 breaking, 4 info
  - removed the media type `application/json` for the response with the status `200`
  - api operation id `add_document` removed and replaced with `collection_create`
  - api tag `collection` added
  - api tag `document` removed
  - …1 more

[Change history](https://skmtc.dev/sourcenetwork/apis/defradb-api/changes/collections/:name/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.dev/sourcenetwork/apis/defradb-api/revisions/e5def1d468f5?raw)
