---
title: "addWorkoutEvents(_:completion:)"
framework: healthkit
role: symbol
role_heading: Instance Method
path: "healthkit/hkworkoutbuilder/addworkoutevents(_:completion:)"
---

# addWorkoutEvents(_:completion:)

Adds a workout event to the builder.

## Declaration

```swift
func addWorkoutEvents(_ workoutEvents: [HKWorkoutEvent], completion: @escaping @Sendable (Bool, (any Error)?) -> Void)
```

```swift
func addWorkoutEvents(_ workoutEvents: [HKWorkoutEvent]) async throws
```

## Mentioned in

Running workout sessions

## See Also

### Adding events to the workout

- [workoutEvents](healthkit/hkworkoutbuilder/workoutevents.md)
