Peel and thinly slice 2 medium red onions into half-moons.
Pack the sliced onions into a clean jar or airtight container.
In a small saucepan combine 1 cup vinegar, 1 cup water, 2 tablespoons sugar, and 1 1/2 teaspoons salt.
Add 1 teaspoon peppercorns, 1 bay leaf and optional spices (mustard seeds or red pepper flakes).
Heat the brine just until sugar and salt dissolve; do not boil vigorously.
Pour the hot brine directly over the onions, ensuring they are fully submerged.
Press the onions down with a spoon or weight so no air pockets remain.
Let the jar cool to room temperature uncovered for 30 minutes.
Seal the jar and refrigerate at least 1 hour for best flavor (30 minutes gives a lighter tang).
Use within 3–4 weeks; always refrigerate and use a clean utensil to remove onions.