Events

Create multiple usage events in batch.

post/events/batch

Request

Request body

Example request

{
  "events": [
    {
      "transaction_id": "txn_1234567890abcdef",
      "external_subscription_id": "sub_1234567890abcdef",
      "metric_code": "event_code_123456",
      "timestamp": "2023-10-01T12:00:00Z"
    }
  ]
}

Response

Events accepted for processing.

status'ACCEPTED'

Status indicating that the event has been accepted for processing

Example response

{
  "status": "ACCEPTED",
  "results": {
    "success_count": 100,
    "error_count": 5,
    "errors": [
      {
        "transaction_id": "txn_1234567890abcdef",
        "error_code": "invalid_data",
        "error_message": "The event data is invalid"
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.