I’m currently engaged with the Box Platform and Box Webhook. I have a question regarding the folder creation event – does it trigger when all files within the folder are uploaded, or does it happen immediately upon creating the folder?
Furthermore, is it possible for me to promptly make an API call to retrieve the list of files in the folder and download them right after receiving the folder created event?
Sounds like you are talking about 2 different event triggers:
FOLDER.CREATED - is triggered when a folder is created.
FILE.UPLOADED - is triggered when a file is uploaded or moved to a folder.
These will happen at different times.
Suppose you create a web-hook monitoring these 2 events on a folder named Parent Folder, and the upload an entire structure of files and folders to Parent folder.
For each folder created, and for each file uploaded you will get a callback from the web-hook.
So when you get the FOLDER.CREATE callback, most likely the files wont be uploaded yet.
There is no way to get a call back when all files completed the upload, just the single file upload completion for each one.
If you intention is to download each file, then your callback service can do so.
Let us know a bit more about your use case.
In the mean time perhaps this article about web-hooks in box is useful:
We also have a guide available, you can check it out here: