Skip to main content
PUT
/
api
/
v1-beta
/
customers
/
{id}
/
entities
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.entities.upsert('id', {
  entities: [
    {
      id: 'user-7f3a0c1d',
      typeRefId: 'user',
      metadata: { email: 'jane@acme.com', role: 'admin' },
    },
    {
      id: 'user-c4d1b2e9',
      typeRefId: 'user',
      metadata: { email: 'john@acme.com' },
    },
  ],
});

console.log(response.data);
{
  "data": [
    {
      "id": "user-7f3a0c1d",
      "typeId": "user",
      "metadata": {
        "email": "jane@acme.com",
        "role": "admin"
      },
      "createdAt": "2026-05-18T00:00:00.000Z",
      "updatedAt": "2026-05-18T00:00:00.000Z",
      "archivedAt": null
    },
    {
      "id": "user-c4d1b2e9",
      "typeId": "user",
      "metadata": {
        "email": "john@acme.com"
      },
      "createdAt": "2026-05-18T00:00:00.000Z",
      "updatedAt": "2026-05-18T00:00:00.000Z",
      "archivedAt": null
    }
  ]
}

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 entities 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 entities in bulk for a single customer

entities
UpsertEntity · object[]
required

List of entities to create or update (1-100 entries)

Required array length: 1 - 100 elements

Response

The list of upserted entity objects.

List of entities created or updated by an upsert request

data
Entity · object[]
required