New Bevel API - custom curve
Add the modifier adjust settings



When using a custom profile, 2 points are created at (1, 0) and (0, 0).  Add points between these.

When finished adding points update the profile.

import bpy


pts = (
    (0.4, 0.7),
    (0.6, 0.3) 
    )
context = bpy.context
ob = context.object
bm = ob.modifiers.new(
        name="Bevo",
        type='BEVEL',
        )
bm.use_custom_profile = True

bm.segments = 4
bm.width = 0.4

points = bm.custom_profile.points

for p in pts:
    pt = points.add(*p)
    pt.handle_type_1 = 'AUTO' 
    pt.handle_type_2 = 'AUTO'
    pt.select = True

bm.custom_profile.update() 


To work out new features, recommend using the python console and auto complete.  The API is pretty consistent. This is akin to adding fcurve keyframe points, or bezier curve points.

&gt;&gt;&gt; bm = C.object.modifiers.new(name="Foo", type='BEVEL')
&gt;&gt;&gt; bm.custom_profile.points.
                             add(
                             as_bytes(
                             bl_rna


Yes also found the ordering tricky, without testing it appears the first and last points could be indices 0, 1