Boil potatoes in salted water for 12-15 minutes until fork-tender. In a separate pot, gently simmer cod fillets 8-10 minutes until flaky. Drain both completely and let cool 5 minutes.
Mash the drained potatoes until smooth with no lumps. Flake the cod into bite-sized pieces using a fork and check for any bones. Combine both in a large mixing bowl.
Add beaten egg, mayonnaise, finely diced onion, chopped parsley, lemon juice, salt, and black pepper to the bowl. Mix gently until evenly distributed. Fold in breadcrumbs last, adding extra if the mixture feels too wet.
Shape the mixture into 8 equal patties, about 3 inches wide and 1 inch thick. Place on a plate, cover with plastic wrap, and refrigerate for 15 minutes to firm up the cakes.
Preheat air fryer to 375°F for 3 minutes. Lightly spray basket and fish cakes with oil. Arrange cakes in a single layer with 1-2 inches between each. Air fry for 6 minutes, flip gently, then cook another 6 minutes until golden brown and internal temperature reaches 145°F.