---
title: "Upsert entities"
method: PUT
path: "/api/v1-beta/customers/{id}/entities"
tags: ["Beta - Entities"]
---

# Upsert entities

`PUT /api/v1-beta/customers/{id}/entities`

Creates or updates entities in bulk for the given customer. Existing entities matched by id are updated; new ids are created.

## Path parameters

- `id` string, required

## Headers

- `X-ACCOUNT-ID` string
- `X-ENVIRONMENT-ID` string

## Request body

- UpsertEntitiesRequestDto — Request body for creating or updating entities in bulk for a single customer
  - `entities` object[], required — List of entities to create or update (1-100 entries)
    - `id` string, required — The unique identifier for the entity
    - `typeRefId` string — The entity type refId this entity instantiates. Required when creating a new entity; on a re-upsert may be omitted to preserve the existing type. Governance returns 400 if missing on create.
    - `metadata` object — Free-form key/value metadata. Patch semantics: empty-string value removes a key, omitted keys are preserved.

## Response `200`

The list of upserted entity objects.

- UpsertEntitiesResponseDto — List of entities created or updated by an upsert request
  - `data` object[], required
    - `id` string, required — The unique identifier for the entity
    - `typeId` string, required — The entity type identifier this entity instantiates
    - `metadata` object, required — Free-form key/value metadata attached to the entity
    - `createdAt` string, date-time, required — Timestamp of when the record was created
    - `updatedAt` string, date-time, required — Timestamp of when the record was last updated
    - `archivedAt` string, date-time, nullable, required — Timestamp of when the record was deleted

## Other responses

- `400` — bad request.
- `401` — User is not authenticated.
- `403` — User is not allowed to access this resource.
- `404` — Entity not found.
- `429` — Too many requests.

## Changes

- **2026-06-08** `3acd63d6c861` — 2 info
  - added the new optional `header` request parameter `X-ACCOUNT-ID`
  - added the new optional `header` request parameter `X-ENVIRONMENT-ID`
- **2026-06-04** `4fa87d66426d` — 1 warning
  - added the new `PricingModelNotSupportedByBillingIntegration` enum value to the `code` response property for the response status `400`
- **2026-05-31** `0dece860f678` — 1 warning
  - added the new `DataExportIntegrationError` enum value to the `code` response property for the response status `400`
- **2026-05-28** `b181b166a2a5` — 1 warning
  - added the new `InvalidReceivedSignatureError` enum value to the `code` response property for the response status `400`
- **2026-05-25** `41a773d02dfd` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/stiggio/apis/stigg-api/changes/api/v1-beta/customers/:id/entities/put.md)

---

[API](https://skmtc.dev/stiggio/apis/stigg-api.md) · [All operations](https://skmtc.dev/stiggio/apis/stigg-api/llms.txt) · [OpenAPI document](https://skmtc.dev/stiggio/apis/stigg-api/revisions/de96c0c4633a?raw)
