How To Reset Curve Profile with Script
You can use the following. All is commented below:
import bpy

obj = bpy.context.object

# Get the modifier
bevel = obj.modifiers[&quot;Bevel&quot;]

# Get custom points
points = bevel.custom_profile.points

# Keep only 2
while len(points) &gt; 2:
    points.remove(points[1]) #Can't remove at 0 (don't know why)

# Reset locations
points[0].location = (1,0)
points[1].location = (0,1)

# Update the profile
bevel.custom_profile.update()

Note: the window won't update until you move the cursor over it.