Check if folder exists

Using the Files API to check if a folder exists before creating it…

If I use

https://api.assembly.com/v1/files?channelId=XXXX&path=FolderName

and the folder exists, it returns the files in that folder, and an empty result if there are no files.

But if the folder does not exist, it also returns an empty result, so I can’t tell the difference between a folder not existing and an empty folder.

The only way I can tell is to get all of the files in the channel and iterate through them where the object type = “folder” and the name = the name I am checking for existence.

Is there another way to do that that doesn’t require that?

Hi @Spring_Garden_Lendin Thank you for reaching out!

Unfortunately, there isn’t another way to check if a folder exists besides the approach you mentioned - retrieving all files in the channel and filtering for folders by object type.

I understand this isn’t ideal for your use case, and I’ll share this feedback with our platform team. A dedicated folder existence check or a folder-only endpoint would definitely streamline this workflow.

Please let me know if you have any other questions. Always happy to help! :grinning_face: