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

# Upsert assignments

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

Batched create-or-update of capability assignments. Existing assignments matched by (entityId, capabilityId) are updated; new pairs are created. On update, omitted fields (usageLimit, cadence) are preserved; on create both are required by the governance service.

## Path parameters

- `id` string, required

## Headers

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

## Request body

- UpsertAssignmentsRequestDto — Request body for creating or updating capability assignments in bulk for a single customer
  - `assignments` object[], required — Assignments to upsert (1–100 per request)
    - `entityId` string, required — The entity refId this assignment is attached to
    - `featureId` string — Feature refId this assignment grants. Mutually exclusive with `currencyId`.
    - `currencyId` string — Currency refId this assignment grants (credit budgets). Mutually exclusive with `featureId`.
    - `scopeEntityIds` string[]
    - `parentId` string, nullable — Parent entity refId in the hierarchy. Omit to leave the current parent untouched (a new node defaults to a root); `null` detaches to a root; a refId sets or changes the parent. Reparenting an existing node is leaf-only.
    - `usageLimit` number — Maximum usage allowed within one cadence window (required on create)
    - `cadence` 'MONTH' — Usage-reset cadence (required on create). Currently only `MONTH` is supported

## Response `200`

Assignments after upsert.

- UpsertAssignmentsResponseDto — Assignments after upsert.
  - `data` object[], required
    - `id` string, uuid, required — Synthetic UUID identifier — also the cursor anchor for paginated lists
    - `entityId` string, required — The entity refId this assignment is attached to
    - `featureId` string — Feature refId this assignment grants (present for feature capabilities).
    - `currencyId` string — Currency refId this assignment grants (present for credit capabilities).
    - `scopeEntityIds` string[], required — Dimension-scoped sub-budget key: the set of entity refIds this budget applies to. Empty is the node-wide budget that always matches; a non-empty set only applies when every listed entity is present in the resolved set (order-insensitive).
    - `parentId` string, nullable, required — Parent entity refId in the hierarchy, or `null` for a root.
    - `usageLimit` number, required — Maximum usage allowed within one cadence window
    - `cadence` 'MONTH', required — Usage-reset cadence. Currently only `MONTH` is supported
    - `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` — Assignment not found.
- `429` — Too many requests.

## Changes

- **2026-06-18** `de96c0c4633a` — 5 breaking, 5 info
  - the `data/items/currencyId` response property's minLength was decreased from `1` to `0` for the response status `200`
  - the `data/items/entityId` response property's minLength was decreased from `1` to `0` for the response status `200`
  - the `data/items/featureId` response property's minLength was decreased from `1` to `0` for the response status `200`
  - the `data/items/parentId` response property's minLength was decreased from `1` to `0` for the response status `200`
  - …6 more
- **2026-06-10** `2ecdbf877f12` — 1 breaking, 1 warning, 8 info
  - removed the required property `data/items/capabilityId` from the response with the `200` status
  - removed the request property `assignments/items/capabilityId`
  - added the new optional request property `assignments/items/currencyId`
  - added the new optional request property `assignments/items/featureId`
  - …6 more
- **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`

[Full history](https://skmtc.dev/stiggio/apis/stigg-api/changes/api/v1-beta/customers/:id/assignments/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)
