Change metadata (last-modified) with api

I am currently migrating a large amount of files and folders with a custom script. Unfortunately, the last-modified time is not always set correctly. Does the API have a function to change this metadata manually?