PapermarkDocs

Set link permissions

Replace the per-item file permissions of a dataroom link (full-replace semantics, matching the dashboard): the payload is the complete desired state, items not listed lose their override, and an empty array clears everything — hiding every item on this link. Ancestor folders of visible items are kept visible automatically. Rejected with `422` on links with `audience_type: "group"` — their group determines visibility; switch the link to `audience_type: "general"` first.

PUT
/v1/links/{id}/permissions

Authorization

bearerAuth links.write
AuthorizationBearer <token>

Dashboard-issued token (pm_live_...) or OAuth-issued access token.

In: header

Scope: links.write

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://api.papermark.com/v1/links/string/permissions" \  -H "Content-Type: application/json" \  -d '{    "permissions": [      {        "item_id": "string",        "item_type": "dataroom_document",        "can_view": true,        "can_download": true      }    ]  }'
{
  "data": [
    {
      "object": "link_permission",
      "item_id": "clxdd1234567890",
      "item_type": "dataroom_document",
      "can_view": true,
      "can_download": true,
      "can_download_original": true,
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "error": {
    "code": "bad_request",
    "message": "The request body is not valid JSON.",
    "doc_url": "https://www.papermark.com/docs/api/errors#bad_request",
    "details": null
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Missing bearer token. Include an `Authorization: Bearer <token>` header.",
    "doc_url": "https://www.papermark.com/docs/api/errors#unauthorized",
    "details": null
  }
}
{
  "error": {
    "code": "forbidden",
    "message": "Token is missing required scope: links.write.",
    "doc_url": "https://www.papermark.com/docs/api/errors#forbidden",
    "details": null
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Link link_abcd1234 not found.",
    "doc_url": "https://www.papermark.com/docs/api/errors#not_found",
    "details": null
  }
}
{
  "error": {
    "code": "unprocessable_entity",
    "message": "Invalid request body.",
    "doc_url": "https://www.papermark.com/docs/api/errors#unprocessable_entity",
    "details": {
      "formErrors": [],
      "fieldErrors": {
        "expires_at": [
          "Invalid datetime"
        ]
      }
    }
  }
}
{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Try again in 30s.",
    "doc_url": "https://www.papermark.com/docs/api/errors#rate_limit_exceeded",
    "details": null
  }
}