point constraint keyframe problem

I have an empty selected that is a rigid body point constraint I want to add a keyframe to the enabled channel .
When I run this script :
import bpy
import bpy.ops
for obj in bpy.context.selected_objects:
bpy.context.scene.objects.active = obj

obj.keyframe_insert(data_path="rigid_body_constraint.enabled", frame=bpy.context.scene.frame_current)

I get this error
TypeError bpy _struct.keyfreme_insert()property"rigid_body_constraint.enabled"not

maybe
obj.rigid_body_constraint.keyframe_insert(data_path=“enabled”, …)
?

did you create a ridgid body constraint before? otherwise it’s probably None

that worked thanks