---
title: "Upsert entities"
method: PUT
path: "/api/v1-beta/customers/{id}/entities"
tags: ["Governance 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
    - `displayName` string, nullable — Human-readable name for the entity. Omit to preserve the stored value, or send an empty string or null to clear it.
    - `entityTypeId` string — The entity type ID 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
    - `displayName` string, nullable, required — Human-readable name for the entity, or null when none is set — in which case clients display the entity ID
    - `entityTypeId` 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.

---

[API](https://skmtc.net/stiggio/apis/stigg-api.md) · [All operations](https://skmtc.net/stiggio/apis/stigg-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/stiggio/stigg-api/revisions/3e2c8cfcd035/schema)
