Skip to main content
POST
/
api
/
v1
/
events
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.v1.events.report({
  events: [
    {
      customerId: 'customerId',
      eventName: 'x',
      idempotencyKey: 'x',
    },
  ],
});

console.log(response.data);
{
  "data": {}
}

Authorizations

X-API-KEY
string
header
required

Server API Key

Headers

X-API-KEY
string
required

API Key

Body

application/json

Report raw usage events. Batch up to 1000 events with dimensions.

events
ReportEvent · object[]
required

A list of usage events to report

Required array length: 1 - 1000 elements

Response

OK

Response object

data
EventResponse · object
required

Empty success response confirming that events were successfully ingested and queued for processing by Stigg's metering system.