---
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`

The IDs of the added documents

- string[]

## Other responses

- `400` — error
- `409` — error

---

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