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

# Insert

`POST /api/v1/database/insert`

## Request

- Base URL: `https://api.caresquare.com.au` (the document declares no server; this is the origin it was published from)
- URL: `https://api.caresquare.com.au/api/v1/database/insert`
- Auth: none declared. Required headers: `table-name`, `unique-key`

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/caresquare-api.md) - [All operations](https://skmtc.dev/caresquare/apis/caresquare-api/llms.txt) - [OpenAPI document](https://skmtc.dev/caresquare/apis/caresquare-api/revisions/d428fe38bf62?raw)
