---
title: "Insert"
method: POST
path: "/api/v1/database/insert"
---

# Insert

`POST /api/v1/database/insert`

Insert new records into the database. Will not update existing records.
Args:
    data (List[Dict]): List of dictionaries containing the data to insert
    table_name (str): Name of the table to insert into (provided in header)
    unique_key (str): Field name to use as the unique identifier (provided in header)
Returns:
    dict: Result of the insert operation with summary

## Headers

- `table-name` string, required
- `unique-key` string, required

## Request body

- object[]

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/caresquare/apis/fastapi.md) · [All operations](https://skmtc.dev/caresquare/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/caresquare/fastapi/revisions/c9df874d8d59/schema)
