CloudPDF
DocsPricing
Start building

Update share

PATCH/v1/tenants/{tenantId}/shares/{shareId}v3.0.0-next.9

Edit a grant in place — every embedded copy of the token follows the row.

Authentication#

Any one of these credentials is accepted.

API token

The deployment's static root credential (CLOUDPDF_API_AUTH_TOKENS), valid on every surface.

Tenant token

Delegated tenant JWT, valid only under its own /v1/tenants/{tenantId}/ subtree — the path tenant must equal the token's tenant_id. Doc-scoped viewer tokens are rejected on every admin route.

Required scopeshares.manage

Parameters#

tenantIdpathstringrequired
shareIdpathstringrequired

Request body#

application/jsonSharesUpdateRequestrequired
scopestring[]
originsstring[]
passwordstring
sessionTtlSecondsinteger
disabledboolean
expiresAtinteger

A complete body with every required field. Strings stand in for your own values.

{
  "scope": [
    "scope"
  ],
  "origins": [
    "origins"
  ],
  "password": "password",
  "sessionTtlSeconds": 1,
  "disabled": true,
  "expiresAt": 1
}

SDK examples#

The selected SDK is remembered across the API reference. Values are examples; replace them with identifiers and input from your application.

import { CloudPDFClient } from "@cloudpdf/sdk";

const client = new CloudPDFClient({
  baseUrl: "https://yourhost.com/path/to/api",
  token: "<token>",
});

await client.shares.update({
  tenantId: "tenantId",
  shareId: "shareId"
});

Responses#

200OK
application/jsonSharesUpdate200Response
shareobject
idstring
tenantIdstring
docIdstring
layerNamestring
scopestring[]
originsstring[]
passwordProtectedboolean
sessionTtlSecondsnumber
disabledboolean
expiresAtnumber
exchangeCountnumber
lastExchangedAtnumber
createdBystring
createdAtnumber
updatedAtnumber
400Bad request
application/jsonSharesUpdate400Response
errorobject
codestring
messagestring
404Not found
application/jsonSharesUpdate404Response
errorobject
codestring
messagestring
defaultError
application/jsonAdminErrorPayload
errorobject
codestring
messagestring