PUT api/2.0/files/file/{id}/links This function requires authentication

Description

Sets an external link to a file with the ID specified in the request.

Parameters
Name Description Type Example
id
sent in url
File ID number 1234
Internal
sent in body
Link scope Bool value true
Primary
sent in body
Primary link flag Bool value true
Example
PUT api/2.0/files/file/1234/links
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "Internal": true,
  "Primary": true
}
Returns

File security information

Example Response
{
  "status": 0,
  "response": {
    "Access": "ReadWrite",
    "IsLocked": true,
    "IsOwner": true,
    "CanEditAccess": true
  }
}