@Roie Rachamim
Thank you for your question! I wasn't able to find a way to do this through the REST API, but I'll post my findings below
I created a certificate using the same create REST API you mentioned, making the "validity_months" (expiration date) equal to 297.
I ran a PATCH to try and update the validity period from 297 months to 100, the PATCH didn't error, however, the expiration date never changed.
I then went to the Issuance Policy of the certificate and was able to change the validity period.
I realized, updating this validity period doesn't actually update the "Expiration Date" of the certificate, so I tried to update the expiration date within the certificate but the option was greyed out for all of my certificates. Which leads me to believe updating the expiration date of a certificate isn't a supported feature at this time.
If you'd like to create a feature request for this action, please feel free to leverage our User Voice forum.
If you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.