Skip to main content
POST
/
events
/
batch
cURL
curl --request POST \
  --url https://api.getenso.ai/events/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "events": [
    {
      "CustomerEntityId": "<string>",
      "metric": "<string>",
      "value": 123,
      "timestamp": "2023-11-07T05:31:56Z",
      "metadata": {},
      "eventId": "<string>",
      "JobId": "<string>",
      "jobId": "<string>"
    }
  ]
}
'
{
  "summary": {
    "success": 123,
    "failed": 123,
    "total": 123
  },
  "failedRecords": [
    {
      "index": 123,
      "error": "<string>",
      "code": 123,
      "statusCode": 123
    }
  ]
}

Error codes

CodeDescription
2001Customer entity ID required
2002Customer entity not found
2003events array is required

Authorizations

Authorization
string
header
required

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

Body

application/json

Batch events payload

events
object[]
required

List of events to be created

Response

Batch processed

summary
object
failedRecords
object[]