Question about API Segment

Your software
My Mautic version is: 3.2.4
My PHP version is: 7.4.14

Your problem
My problem is:

I have an automation that creates and sync segments via API, using as source the company directory (AD), Everything is working fine, but I would like to set up some of the segments as private, so will need to change the createdby attribute, from the admin user authenticated on the API to the standard user that will use the segment.
I tried adding createdby and createdByUser on the body when creating a segment, however, the segment is created but createdby is the API authenticated user and not the one provided on the API request.
Is there any way to change this attribute or another way to set a segment as private and choose the user that can useit?

Many Thanks

Just a workaround:
You can use basic authentication (login/psw) in your API calls. Doing so the right user will be the created by person.

Thanks for the reply, Thats could work. But I will need to reset the user password.
Is that possible via API?
I didn’t find the way using the users endpoint.

Not that I know of. You can create new users but can’t reset the psw.