[obj.keyframe_insert, bpy.data.particles["ParticleSettings"].lifetime]; how to insert keyframe to an existed particle setting, e.g lifetime
Set on the object that has the property
Python console code.  A default particle system has been added to a Plane that has context.
The lifetime is set to 10 and keyframed on frame 1.
&gt;&gt;&gt; C.object
bpy.data.objects['Plane']

&gt;&gt;&gt; ps = C.object.particle_systems['ParticleSettings'].settings
&gt;&gt;&gt; ps
bpy.data.particles['ParticleSettings']

&gt;&gt;&gt; ps.lifetime
10.0

&gt;&gt;&gt; ps.keyframe_insert(&quot;lifetime&quot;, frame=1)
True

Notice the objects particle systems settings points to its data item in  bpy.data.particles which is the ID object that the action (typically bpy.data.actions['ParticleSettingsAction']) will belong to.