Preheat your air fryer to 400F. Meanwhile, dice the zucchini and peel and dice the onions. *The diced pieces should be at least twice the size of the holes in your air fryer basket.
In a bowl, toss the vegetables, oil, and seasonings together.
Arrange the mixture in a single layer in the air fryer basket. Close the basket and set the air fryer to cook for 20 minutes.
Halfway through cook time, shake the basket or turn the vegetables with a spoon or spatula. Close and allow to finish cooking, then season to taste if needed and serve.
Video
Notes
You can use 2 teaspoons of homemade or store-bought Italian seasoning as a substitute for the individual spices.
The total cook time to air fry zucchini depends on the size of your zucchini pieces. Keep an eye on it during the final 2-3 minutes to ensure that it doesn't burn.