You can automatically create boundaries from the pcurves on a surface. Any existing boundaries are deleted before creating new ones.
Ideally, the pcurves should lie in sensible positions to define unique boundaries, otherwise you'll have to use the boundary editing tools to change which pcurve belongs to which boundary.
If boundaries already exist, you are warned that they will be deleted.