Actually, buried in the API docs is a sentence which reads
".. Only description, name, tags and costs may be updated after creation, with an additional costsDestructiveUpdate parameter allowed..."
So I may just be out of luck.
Anyhoot, I guess I'll have it tackle it from a different angle. I think I'll have another cronjob that to pre-create these folders based on {year}-{month} pattern in advanced using the folder create endpoint, so that my normal cronjob can call the query folder by name endpoint and grab the target folder IDs that way. After that, once a month, I'll have another cronjob to then query the folders I need to archive and using the folder update metadata endpoint by passing in the optional isArchive parameter to archive them. It's a bit more work but hopefully this would work.
... View more