---
title: "Upsert Bulk Records"
method: PATCH
path: "/api/bulk-upsert/{objectNames}/{recordId}/{childObjectName}"
tags: ["Records Management"]
---

# Upsert Bulk Records

`PATCH /api/bulk-upsert/{objectNames}/{recordId}/{childObjectName}`

## Request

- Base URL: `https://api.reallysimplesystems.com`
- URL: `https://api.reallysimplesystems.com/api/bulk-upsert/{objectNames}/{recordId}/{childObjectName}`
- Auth: HTTP bearer

Upsert multiple records for an object. This endpoint allows you to update existing records or create new ones if they do not exist, based on the id field in the payload, which is useful for synchronizing data or bulk updating records.

## Request body

- object
  - `data` string[], required: An array of records to upsert. Every record MUST include an `id` field: use `null` to create a new record, or the id of an existing record to update it. Any record missing the `id` field fails the whole batch.

## Response `201`

Records created and/or updated successfully.

- object
  - `status` string
  - `message` string
  - `data` object[]
    - `metadata` object
      - `url` string
      - `list_url` string
      - `parent` string, nullable
      - `object_type` string
      - `record_type` string
    - `record` object
      - `id` integer
      - `name` string
      - `ownerid` integer

## Other responses

- `422`
- `500`: An unexpected error occurred while upserting the records.

---

[API](https://skmtc.dev/reallysimplesystems/apis/crm-api-documentation.md) · [All operations](https://skmtc.dev/reallysimplesystems/apis/crm-api-documentation/llms.txt) · [OpenAPI document](https://skmtc.dev/reallysimplesystems/apis/crm-api-documentation/revisions/eb046f87bd56?raw)
