2
votes

Is it possible to programmatically enable Desktop Sync for a folder via the Box.com API?

My Box application creates a folder at the root level upon installation. I'd like to this folder to be available via Desktop Sync for users who are using desktop clients.

1

1 Answers

3
votes

This can be accomplished by updating the sync_stateparameter on a folder, as documented here.

For example, to do this in cURL for folder with ID 123:

curl https://api.box.com/2.0/folders/123 \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d '{"sync_state": "synced"}' \
-x PUT