Skip to main content
Question

remove an item from favorites (collection) via API?

  • May 21, 2025
  • 2 replies
  • 40 views

Forum|alt.badge.img

Trying to figure-out the correct syntax for removing a file or folder from the user's Favorites (supposedly the only Collection currently supported in box).

 

Adding one via the REST API is straightforward.  However, removing it from the collection doesn't seem to work with any syntax I've tried.  Passing an empty string as the collection ID fails.

 

Does anyone know how to do this?

 

Thanks,

AJ

2 replies

Forum|alt.badge.img

This was weird but I passed in [] for the collections parameter and it seems to remove it

 

curl https://api.box.com/2.0/folders/FOLDER_ID \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d '{"collections": []}' \
-X PUT

 

 


Forum|alt.badge.img

I agree, I eventually tried this same syntax and it appears to work.  Since it's not really documented, I was kinda hoping for someone from box support/dev to weigh-in as to whether it's correct.

 

But again, in the meantime, I believe this works. (In case anyone is searching for the same info.)

 

Thanks for the reply!

-AJ