Skip to main content
PUT
/
api
/
v1-beta
/
customers
/
{id}
/
assignments
JavaScript
import Stigg from '@stigg/typescript';

const client = new Stigg({
  apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});

const response = await client.v1Beta.customers.assignments.upsert('id', {
  assignments: [
    {
      entityId: 'workspace-001',
      capabilityId: 'compute-minutes',
      usageLimit: 1000,
      cadence: 'MONTH',
    },
    {
      entityId: 'workspace-002',
      capabilityId: 'compute-minutes',
      usageLimit: 2000,
      cadence: 'MONTH',
    },
  ],
});

console.log(response.data);
{
  "data": [
    {
      "id": "6f6b9c39-3a14-4a5e-9c6c-2a4f8d8d2f3f",
      "entityId": "workspace-001",
      "capabilityId": "compute-minutes",
      "usageLimit": 1000,
      "cadence": "MONTH",
      "createdAt": "2026-05-18T10:00:00.000Z",
      "updatedAt": "2026-05-18T10:00:00.000Z"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.stigg.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-KEY
string
header
required

Server API Key

Path Parameters

id
string
required

The customer identifier (owner) the assignments belong to

Required string length: 1 - 255
Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.@-]*$

Body

application/json

Request body for creating or updating capability assignments in bulk for a single customer

assignments
UpsertAssignment · object[]
required

Assignments to upsert (1–100 per request)

Required array length: 1 - 100 elements

Response

Assignments after upsert.

Assignments after upsert.

data
Assignment · object[]
required