---
title: "Upsert entity types"
method: PUT
path: "/api/v1-beta/entity-types"
tags: ["Governance Entity Types"]
---

# Upsert entity types

`PUT /api/v1-beta/entity-types`

Batched create-or-update of entity types. Existing types matched by id are updated; new ids are created. Idempotent — re-submitting the same payload converges to the same state.

## Headers

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

## Request body

- UpsertEntityTypesRequestDto — Batched create-or-update of entity types. Idempotent — re-submitting the same payload converges.
  - `types` object[], required — Entity types to upsert (1–100 per request)
    - `id` string, required — The unique identifier for the entity
    - `displayName` string, required — The display name for the entity type
    - `description` string, nullable — What this entity type represents and what it is for governing. Omit to preserve the stored value, or send an empty string or null to clear it.
    - `attributionKeys` string[], required — Dimension keys used to attribute usage events to instances of this type (e.g. ["orgId"]). Empty array means no attribution.

## Response `200`

Entity types after upsert.

- UpsertEntityTypesResponseDto — Entity types after upsert.
  - `data` object[], required
    - `id` string, required — The unique identifier for the entity
    - `displayName` string, required — The display name for the entity type
    - `description` string, nullable, required — What this entity type represents and what it is for governing, or null when none is set
    - `attributionKeys` string[], required — Dimension keys used to attribute usage events to instances of this type (e.g. ["orgId"]). Empty array means no attribution.
    - `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

## Other responses

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

## Changes

- **2026-08-05** `ffc977f1c07e` — 2 info
  - added the new optional request property `types/items/description`
  - added the required property `data/items/description` to the response with the `200` status
- **2026-07-28** `913f273cc2f7` — 1 warning
  - added the new `ContractNotFound` enum value to the `code` response property for the response status `404`
- **2026-07-23** `b876edd1a4fc` — 5 warning
  - added the new `CreditOveragePriceCurrencyNotFound` enum value to the `code` response property for the response status `400`
  - added the new `InvalidCreditOverageBillingModel` enum value to the `code` response property for the response status `400`
  - added the new `InvoicePreviewNotAvailableForDraftContract` enum value to the `code` response property for the response status `400`
  - added the new `OveragePriceNotSupportedOnAddon` enum value to the `code` response property for the response status `400`
  - …1 more
- **2026-07-08** `58bb216ff8ce` — 1 warning
  - added the new `GovernanceNotEnabled` enum value to the `code` response property for the response status `403`
- **2026-07-08** `808e91157927` — 2 info
  - api tag `Governance Entity Types` added
  - api tag `Beta - EntityTypes` removed

[Full history](https://skmtc.dev/stiggio/apis/stigg-api/changes/api/v1-beta/entity-types/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-service-production.skmtc.workers.dev/v1/apis/stiggio/stigg-api/revisions/3e2c8cfcd035/schema)
