Skip to main content

Is it possible to configure the non-private custom URL in Shared Link Settings using the BOX API? I want to automate the process of linking files from local storage to BOX and setting a non-private custom URL using the BOX API. Since I couldn’t find information in the API reference, I would appreciate your guidance.

Hi @user193 , welcome to the forum.



It should be possible using the vanity name.



Something like this:



curl --location --request PUT 'https://api.box.com/2.0/files/1147571642464?fields=shared_link' \

--header 'Content-Type: application/json' \

--header 'Authorization: Bearer 1!lf...oLw.' \

--data '{

"shared_link": {

"access": "open",

"vanity_name": "about_box_platform",

"permissions": {

"can_download": true,

"can_preview": true,

"can_edit": true

}

}

}'



This requires that the enterprise administrator enables this feature in the admin console:





Let us know if this helps.



Best regards



Rui


Thank you for your polite reply. It’s good to know that the Enterprise version can handle it. This is very helpful information.


Reply