Adding selected objects to active keying set
I finally found in the scene panel that the data path should just be "location", so my code sould be:

import bpy

scene = bpy.context.scene

ks = scene.keying_sets.active

for obj in bpy.context.selected_objects:
    ksp = ks.paths.add(obj.id_data, 'location', index=-1)
    ksp = ks.paths.add(obj.id_data, 'rotation_euler', index=-1)
    # "rotation_quaternion" for quaternion mode


Now it works !