---
title: "submitEvents(_:)"
framework: energykit
role: symbol
role_heading: Instance Method
path: "energykit/energyvenue/submitevents(_:)"
---

# submitEvents(_:)

Submits electrical load events to be used by EnergyKit to generate energy insights.

## Declaration

```swift
func submitEvents<Event>(_ events: [Event]) async throws where Event : ElectricalLoadEventProtocol
```

## Parameters

- `events`: An array of doc://com.apple.energykit/documentation/EnergyKit/ElectricalLoadEventProtocol conforming load events to send.

## Discussion

Discussion The submission may contain events for multiple devices. The system throws EnergyKitError.invalidLoadEvent if a load event is submitted for an incorrect EnergyVenue or if it’s submitted by an iPhone, iPad, or Mac that didn’t fetch the corresponding ElectricityGuidance.
