Remove shared link from file


Removes a shared link from a file.



Path Parameters

stringin pathrequired

The unique identifier that represent a file.

The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL https://* the file_id is 123.

Query Parameters

stringin queryrequired

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

Request Body


application/jsonFile (Standard)

Returns a basic representation of a file, 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 file is not found, or the user does not have access to the file.

application/jsonClient error

Returned if the file_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 file. This indicates that the file has changed since it was last requested.

application/jsonClient error

An unexpected client error.

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

Request Example

curl -i -X PUT "" \
     -H "Authorization: Bearer <ACCESS_TOKEN>" \
     -d '{
       "shared_link": null
client.files.deleteSharedLink(fileId: "11111") { (result: Result<Void, BoxSDKError>) in
    guard case .success = result else {
        print("Error removing file shared link")

    print("File shared link removed")

Response Example

  "id": "12345",
  "type": "file",
  "etag": "1",
  "shared_link": null