Remove shared link from folder

put
https://api.box.com/2.0
/folders/:folder_id

Removes a shared link from a folder.

Request

bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
12345

The unique identifier that represent a folder.

The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL https://*.app.box.com/folder/123 the folder_id is 123.

The root folder of a Box account is always represented by the ID 0.

Query Parameters

stringin queryrequired
shared_link

Explicitly request the shared_link fields to be returned for this item.

Request Body

Response

application/jsonFolder (Full)

Returns a basic representation of a folder, with the shared link removed.

application/jsonClient error

Returned when the access token provided in the Authorization header is not recognized or not provided.

application/jsonClient error

Returned if the user does not have all the permissions to complete the update.

application/jsonClient error

Returned if the folder is not found, or the user does not have access to the folder.

application/jsonClient error

Returned if the folder_id is not in a recognized format.

application/jsonClient error

Returns an error when the If-Match header does not match the current etag value of the folder. This indicates that the folder has changed since it was last requested.

application/jsonClient error

An unexpected client error.

put
Remove shared link from folder
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -i -X PUT "https://api.box.com/2.0/folders/32423234?fields=shared_link" \
     -H "authorization: Bearer <ACCESS_TOKEN>" \
     -d '{
       "shared_link": null
     }'
Java
BoxFolder folder = new BoxFolder(api, "12345");
BoxFolder.Info info = folder.getInfo();
info.removeSharedLink();
folder.updateInfo(info);
Python
folder_id = '11111'
client.folder(folder_id).remove_shared_link()
Node
client.folders.update('12345', {
  shared_link: null
}).then(folder => {
  // ...
})
iOS
client.folders.deleteSharedLink(forFolder: "11111") { (result: Result<Void, BoxSDKError>) in
    guard case .success = result else {
        print("Error removing folder shared link")
        return
    }

    print("Folder shared link removed")
}

Response Example

{
  "id": "12345",
  "type": "folder",
  "etag": "1",
  "shared_link": null
}