Aqara motion sensor p1, api settings dont saved?

sorry i’m new here, how would i set the duration to 10 seconds via curl ?
tried

curl 127.0.0.1:4530/api/CFBA4BD6A5/sensors/6 -d '{"config": {"duration": 10}}'

[{"error":{"address":"/sensors/6","description":"method, POST, not available for resource, /sensors/6","type":4}}]

never mind I have figured it out

curl -X PUT 127.0.0.1:4530/api/CFBA4BD6A5/sensors/6 -d '{"config": {"duration": 10}}'