POST
/
events
/
ingest
JavaScript
import DodoPayments from 'dodopayments';

const client = new DodoPayments({
  bearerToken: 'My Bearer Token',
});

const response = await client.usageEvents.ingest({
  events: [{ customer_id: 'customer_id', event_id: 'event_id', event_name: 'event_name' }],
});

console.log(response.ingested_count);
{
  "ingested_count": 1
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200
application/json

Events ingested successfully

The response is of type object.